xht37's blog

xht37's blog

  • 关于我
  • 记录
  • 笔记
  • 游记
  • 题解

AtCoder Grand Contest 026 题解

07月14日 题解 没有评论 DP,二分,区间 DP,博弈论,数论,状压,笛卡尔树,组合计数,贪心

AtCoder Grand Contest 026 Colorful Slimes 2 对于每个同色连续段,设长度为 $c$,则对答案有贡献 $\lfloor \frac c2 \rfloor$。 const int N = 107; int n, a[N], ans; int main() { rd(n), rda(a,...

AtCoder Grand Contest 027 题解

07月12日 题解 没有评论 DP,数论,构造,组合计数,调和级数,贪心

AtCoder Grand Contest 027 Candy Distribution Again 排序后从小到大贪心的选。 const int N = 107; int n, x, a[N], s; int main() { rd(n, x), rda(a, n); sort(a + 1, a + n + 1); for (...

AtCoder Grand Contest 028 题解

07月11日 题解 没有评论 DP,前缀和/差分,区间 DP,数论,线段树,组合计数,记忆化搜索,贪心

AtCoder Grand Contest 028 Two Abbreviations 答案显然要么为 $-1$ 要么为 $\text{lcm}(n,m)$,判一下就好了。 const int N = 1e5 + 7; int n, m, d; char a[N], b[N]; int main() { rd(n, m), d = ...

AtCoder Grand Contest 029 题解

07月10日 题解 没有评论 DP,二分,二分图,博弈论,构造,树形 DP,网络流,贪心

AtCoder Grand Contest 029 Irreversible operation 最后的字符串一定是所有 W 在 B 前面,于是考虑对应位置下标差之和即可。 const int N = 2e5 + 7; int n, p[N], t; char s[N]; ll ans; int main() { ...

AtCoder Grand Contest 030 题解

07月09日 题解 没有评论 DP,前缀和/差分,构造,概率期望,组合计数,贪心

AtCoder Grand Contest 030 Poisonous Cookies $ans = \min(a+b+1,c) + b$。 int main() { ll a, b, c; rd(a, b, c); print(min(a + b + 1, c) + b); return 0; } Tree Burning 贪心,...

AtCoder Grand Contest 031 题解

07月08日 题解 没有评论 DP,并查集,数论,构造,组合计数,网络流,群论,费用流

AtCoder Grand Contest 031 Colorful Subsequence 对于每种字符,可以选某一个或者不选,最后去掉空的。 const int N = 1e5 + 7; int n; char s[N]; int main() { rd(n), rds(s, n); map<char...

AtCoder Grand Contest 032 题解

07月06日 题解 没有评论 DP,二分,构造,概率期望,欧拉回路,组合计数,贪心

AtCoder Grand Contest 032 Limited Insertion 倒着考虑,每次找到最大的 $i$ 满足 $a_i = i$ 然后删掉,如果不存在则无解。 const int N = 107; int n, a[N], ans[N]; int main() { rd(n), rda(a, n...

AtCoder Grand Contest 033 题解

07月05日 题解 没有评论 DP,Two Pointers,前缀和/差分,博弈论,组合计数,贪心

AtCoder Grand Contest 033 Darker and Darker 怎么 AGC 还有这种垃圾题啊。 const int N = 1e3 + 7; const int dx[] = {1,-1,0,0}; const int dy[] = {0,0,1,-1}; int n, m, d[N][N], ans; queue<pi&g...

AtCoder Grand Contest 034 题解

07月04日 题解 没有评论 DP,FWT,二分,曼哈顿距离,树形 DP,概率期望,组合计数,网络流,贪心,费用流

AtCoder Grand Contest 034 Kenken Race 分 $c < d$ 和 $c>d$ 讨论一下,后者合法多一个限制:存在 $i \in [b,d]$ 满足 $i-1,i,i+1$ 都是空的。 const int N = 2e5 + 7; int n, a, b, c, d; char s[N];...

AtCoder Grand Contest 035 题解

07月03日 题解 没有评论 DP,区间 DP,容斥,构造,组合计数

AtCoder Grand Contest 035 XOR Circle 随便判一下。 const int N = 1e5 + 7; int n, a[N]; int main() { rd(n), rda(a, n); map<int, int> c; for (int i = 1; i <= n; i++) ++c[a...

  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 6
  • 7

文章分类

  • 游记 (9)
  • 记录 (6)
  • 笔记 (27)
  • 题解 (167)

热门文章

随机推荐

  • CF679E Bear and Bad Powers of 42 题解
  • ARC093E Bichrome Spanning Tree
  • Ozon Tech Challenge 2020 (Div.1 + Div.2, Rated, T-shirts + prizes!) 题解
  • CF582E Boolean Function 题解
  • JOISC 2018 题解
  • CF573E Bear and Bowling 题解
  • ARC089F ColoringBalls 题解
  • EA 的练习赛 题解
  • 计算几何 学习笔记
  • 2011~2018 年 NOIP 真题分析

标签云

AC 自动机 bitset DP Hash Trie Two Pointers 二分 二分图 交互题 凸包 前缀和/差分 区间 DP 单调栈 单调队列 博弈论 可持久化 基环树 容斥 并查集 扫描线 换根 DP 数论 曼哈顿距离 最小生成树 最短路 构造 树形 DP 树状数组 树链剖分 根号分治 概率期望 欧拉回路 状压 生成函数 矩阵 线段树 组合计数 网络流 背包 计算几何 记忆化搜索 调和级数 贪心 费用流 随机化

友情链接

  • PinkRabbit
  • RiverFun
  • M_sea
  • xzz
  • Itst
  • Owen_codeisking
  • yyb
  • Siyuan
  • EternalAlexander
  • lk
  • LJC00118
  • memset0
  • StudyingFather
  • wjyyy
  • Dew
  • zgjjj
  • ouuan
  • KS
  • EI
  • Winniechen
  • ViXbob
  • chhokmah
  • zsy
  • dysyn1314
  • icy

Powered by WordPress. Theme by JieStyle Two |