摘要: #include <bits/stdc++.h> #define CLOSE ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define endl "\n" typedef long long LL; const int N = 1e5 + 阅读全文 »
posted @ 2024-02-05 16:32 可爱的卤蛋 阅读(11) 评论(1) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define CLOSE ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define endl "\n" typedef long long LL; const int N = 1e4 + 阅读全文 »
posted @ 2024-02-04 16:02 可爱的卤蛋 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define CLOSE ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define endl "\n" typedef long long LL; const int N = 30 * 6 阅读全文 »
posted @ 2024-02-04 15:23 可爱的卤蛋 阅读(11) 评论(0) 推荐(0) 编辑
摘要: /* 反向考虑,反向建图,考虑从x号点出发,可以到达哪些点,我们从n~1开始枚举 如果某一个点被更新到,呢么这个点一定不会被后面的点更新,就直接可以标记掉,从n号点出发可以到达5号点,呢么从n-1号点出发就 可以直接跳过5号点,还有5号点能到达的点。 复杂度是O(n),这样的想法很常见 */ #in 阅读全文 »
posted @ 2024-02-03 16:26 可爱的卤蛋 阅读(8) 评论(1) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define CLOSE ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) const int N = 200010, M = 2 * 20010, mod = 1e9 + 7; using na 阅读全文 »
posted @ 2024-02-03 15:42 可爱的卤蛋 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> const int N = 1e5 + 10, M = 2 * N, mod = 1e9 + 7; using namespace std; int h[N], e[M], ne[M], idx = 0; int n, s, siz[N]; bool 阅读全文 »
posted @ 2024-02-03 15:03 可爱的卤蛋 阅读(6) 评论(0) 推荐(0) 编辑
摘要: /* 差不多的思路,很容易想到按照兔子血量降序排序 之后按照箭的攻击力降序排序,然后把可以杀死兔子的箭全放入小根堆中,选择一个Q币最小的用 */ #include <bits/stdc++.h> #define CLOSE ios::sync_with_stdio(false);cin.tie(0) 阅读全文 »
posted @ 2024-02-02 16:17 可爱的卤蛋 阅读(32) 评论(0) 推荐(0) 编辑
摘要: /* abddea aeddba 先预处理队列,a['c'],表示c所有出现的位置,用一个pop一次。 找到了右边最近的出现位置k,则看k前面还剩几个元素,剩几个元素答案加几, 在把k位置删除。 */ #include <bits/stdc++.h> #define CLOSE ios::sync_ 阅读全文 »
posted @ 2024-02-02 14:21 可爱的卤蛋 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define CLOSE ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define endl "\n" typedef long long LL; const int N = 1e6 + 阅读全文 »
posted @ 2024-02-01 15:14 可爱的卤蛋 阅读(25) 评论(3) 推荐(0) 编辑
摘要: /* https://www.acwing.com/solution/content/44886/ 看acwing */ #include <bits/stdc++.h> #define CLOSE ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) 阅读全文 »
posted @ 2024-02-01 15:08 可爱的卤蛋 阅读(44) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示