随笔分类 -  其他

摘要:传送门:https://atcoder.jp/contests/abc044/tasks/arc060_a 挺容易想到的dp,但是因为脑残改了一晚上,最后出错的地方自己都看笑了 //数据很小,复杂度最高但最好理解的三维dp也能过 1 #include<cstdio> 2 #include<cstri 阅读全文
posted @ 2020-02-08 21:00 Obake 阅读(221) 评论(0) 推荐(0)
摘要:整理板子的时候翻出来的题,放在一起写是因为都是Kruskal纯板子题。 1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 #include<algorithm> 5 #include<cmath> 6 #include<str 阅读全文
posted @ 2019-11-03 13:53 Obake 阅读(105) 评论(0) 推荐(0)
摘要:按不存在的惯例放个题目链接https://www.luogu.org/problem/P1339 点有2500个,边只有6200个,是稀疏图,于是决定学一下spfa spfa板子题,直接上代码了 心得就是稍微学了一下stl() 1 #include<cstdio> 2 #include<cstrin 阅读全文
posted @ 2019-08-07 22:26 Obake 阅读(102) 评论(0) 推荐(0)
摘要:AtCoder刚注册就随便点了个比赛来写,没想到被C题卡了一发tle一发wa,过于丢人,水个博客纪念一下。 传送门:https://atcoder.jp/contests/abc134/tasks/abc134_c 题意就是输入N个数字后按顺序每次输出除Ai外最大的数字。 一开始偷懒想着直接两个fo 阅读全文
posted @ 2019-07-23 17:18 Obake 阅读(247) 评论(0) 推荐(1)
摘要:本废物的第一篇博客,正好在写这道题,就拿来练练手了。也就写写这种基础题目了 传送门:https://www.luogu.org/problemnew/show/P1141 裸上bfs会TLE,我们可以发现同一个连通图上的点的答案应该是一样的。所以选择用连通图来优化一下,速度超级加倍。 代码如下: 1 阅读全文
posted @ 2019-07-17 19:45 Obake 阅读(435) 评论(2) 推荐(1)