AFO
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《为什么还是九十分》回复:
是不是需要向上取整
在讨论《求问HA一等线》回复:
133
在讨论《关于考试时间&DPor贪心》回复:
@[Z_Each](luogu://user/743764) 看数据范围
在讨论《95pts玄关求调!!》回复:
@[dahuiji](luogu://user/479667) 感谢,已关注
``` #include #include #include using namespace std; typedef unsigned long long ULL; int main() { int n, m, c, k; cin >> n >> m >> c >> k; ULL cow = 0; for(int i…
在文章《题解:P14307 【MX-J27-T4】点灯》发表评论:
qp
在文章《题解:P14307 【MX-J27-T4】点灯》发表评论:
qp
在讨论《求dalao给考前建议》回复:
@[Lastheart](luogu://user/979476) 主要是题目太多,不知道从哪里开始做
在讨论《求dalao给考前建议》回复:
@[NobleNumbat](luogu://user/1255621) tql,可惜我是蒟蒻QWQ
在讨论《求dalao给考前建议》回复:
@[NobleNumbat](luogu://user/1255621)@[Lastheart](luogu://user/979476)@[Lastheart](luogu://user/979476) 不是,第二次
在讨论《哪位大神能说一下此题是什么算法?》回复:
@[CXCgood](luogu://user/1559156) 双指针
在讨论《入门赛、SCP-S、SCP-J 作弊名单(棕294封54)》回复:
@[lax2008](luogu://user/1618217)你怎么棕了
在讨论《求调必关》回复:
@[ECMXP](luogu://user/1860422)
在讨论《求调必关》回复:
#### 可以试一下BFS感觉会更简单 ``` #include #include #include #include #include using namespace std; const int N = 1e5 + 10; int n, Q, m, root = 0; int h[N], e[N q; depth[…
在讨论《60pts,码风良好,求调!》回复:
这么强怎么不去参加NOI
在讨论《60pts,码风良好,求调!》回复:
你牛逼
在讨论《60pts,码风良好,求调!》回复:
TTT
``` #include using namespace std; const int N = 2010; typedef pair PII; int n, s, t; int dist[N]; bool st[N]; int h[N], e[N * 4], ne[N * 4], w[N * 4], idx; stru…
在讨论《码风良好,90,求调!》回复:
已关注
在讨论《码风良好,90,求调!》回复:
Orz
``` #include using namespace std; const int N = 1e5 + 10; typedef long long LL; struct Node { int l, r; LL sum, add; }tr[N*4]; int n, m; int w[N]; void pushup(i…
在讨论《求调!!!》回复:
不知道为什么TLE了
``` #include using namespace std; struct grass { long long s, p; }; bool cmp(const grass& a, const grass& b) { return a.p > n >> b; vector gra(n); for (int i =…
``` // 确保图联通 > 求最大值 #include using namespace std; const int N = 2e5 + 10; typedef long long LL; int T; int main() { ios::sync_with_stdio(false); cin.tie(0); cin…
``` #include #include #include #include using namespace std; const int N = 100010, M = 300010; typedef long long LL; int n, m; int h[N], hs[N], e[M], ne[M], w[M…
## $A*$ 算法是一种剪枝的BFS算法(它适用于只要没有负权回路的题中,且一定要保证有解) #### $A*$与一般的$BFS$算法不同之处在于它用到了优先队列。 #### 同时$A*$算法用优先队列记录了,从起点到当前点的真是距离 + 从当前点到终点的估计距离、 ### 它的基本模板是: ``` while(!q…
``` #include #include #include #include using namespace std; const int N = 10010, M = 5010; int ans; int n, m; int s[N], d[N]; int level[N]; int h[N], e[N], ne[…
``` #include #include #include using namespace std; const int N = 50010; int n, m; int d[N], dist[N]; int h[N], e[N], ne[N], w[N], idx; void add(int a, int b, i…
``` #include using namespace std; int p[1010], a, m; struct edge{ int a, b, w; }edges[200010]; int find(int x) { if(x != p[x]) return p[x] = find(p[x]);//路径压缩 r…