03 2017 档案

摘要:https://vjudge.net/contest/156688#problem 为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房 阅读全文
posted @ 2017-03-31 20:42 walfy 阅读(290) 评论(0) 推荐(0) 编辑
摘要:vector当邻接表存图 C. Online Courses In BSU time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. 阅读全文
posted @ 2017-03-24 17:55 walfy 阅读(177) 评论(0) 推荐(0) 编辑
摘要:D. k-Interesting Pairs Of Integers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. k- 阅读全文
posted @ 2017-03-24 14:22 walfy 阅读(403) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/68966#problem/J 输出技巧很重要,也可以使用栈来保存后输出。 刚开始做就是没想到要排序 阅读全文
posted @ 2017-03-17 09:29 walfy 阅读(104) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/68966#problem/F 初始化就行了;dp【0】=0; 这题还要刚好装满背包,输出时进行判断 阅读全文
posted @ 2017-03-12 20:32 walfy 阅读(136) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/68966#problem/E dp【i】=a【i】这一步一定不能忘了!! 阅读全文
posted @ 2017-03-12 20:04 walfy 阅读(143) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include #include #include #include #include #include #include #include #define ll long long using namespace std; const int N=100; int dp[N][N]; int main() { char s1[... 阅读全文
posted @ 2017-03-12 18:46 walfy 阅读(422) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/150953#problem/D 此题关键 就是排序,刚开始按q排序结果想死都想不出来应该是q-p排 一维的dp 二维的dp 阅读全文
posted @ 2017-03-12 13:40 walfy 阅读(465) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/150953#problem/B 转化一下就行了,<5时要特判 阅读全文
posted @ 2017-03-12 12:25 walfy 阅读(181) 评论(0) 推荐(0) 编辑
摘要:今天复习背包,之前集训讲过,现在又忘了,昨天杭电校赛刚好有一题背包,居然不会做了,好尴尬,重新复习一下。 https://vjudge.net/contest/150953#problem/A 可以说是最基础的01背包了 最重要的就是状态转移方程了dp[j]=max(dp[j],dp[j-w[i]] 阅读全文
posted @ 2017-03-12 12:07 walfy 阅读(179) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/70017#problem/E 后半部分快速幂就能求出来,要注意03lld不然001是输出错误为1.前半部分用log10() 对于给定的一个数n,它可以写成10^a,其中这个a为浮点数,则n^k=(10^a)^k=10^a*k=(10^x)*(1 阅读全文
posted @ 2017-03-05 16:45 walfy 阅读(144) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/66569#problem/K 相当于模板吧,第一次写spfa的 阅读全文
posted @ 2017-03-04 22:54 walfy 阅读(208) 评论(0) 推荐(0) 编辑
摘要:自己写的模板,方便以后查看 求最大值的: 求区间和: 区间更新的: 阅读全文
posted @ 2017-03-04 22:50 walfy 阅读(144) 评论(0) 推荐(0) 编辑
摘要:做了半天都是超时,一直在想怎么用位运算减少时间,最后无奈看答案,发现居然有公式!!! 数论的题目好多都是套格式,知道公式一步到位,不知道想到死都想不出来 阅读全文
posted @ 2017-03-04 20:33 walfy 阅读(117) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/66989#problem/I 阅读全文
posted @ 2017-03-04 15:54 walfy 阅读(129) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/66989#problem/H 此题真是坑到爆!!说好的四舍五入害我改了一个多小时,不用四舍五入!!有好几个坑点,注意要交换l,r的位置,还有输出格式问题 阅读全文
posted @ 2017-03-04 13:23 walfy 阅读(538) 评论(0) 推荐(0) 编辑
摘要:链接:https://vjudge.net/contest/66989#problem/G 完完全全的水题,还是被坑了,一个return忘了写,de了半天bug!! 阅读全文
posted @ 2017-03-03 16:28 walfy 阅读(237) 评论(0) 推荐(0) 编辑
摘要:链接https://vjudge.net/contest/66989#problem/F 坑爹的线段树,一直用区间更新做,做了半天一点眉目都没有,只好搜题解,感觉好堕落,经常不会做就搜题解,以后一定要慢慢克服 阅读全文
posted @ 2017-03-03 15:37 walfy 阅读(1151) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://vjudge.net/contest/66989#problem/E 坑爹的线段树照着上一个线段树更新写的,结果发现有一个地方就是不对,找了半天,发现是延迟更新标记加错了!!!以后一定要小心这一点 不用query,用value【1】也能ac,但是时间要的多,不知道是为什么, 阅读全文
posted @ 2017-03-03 13:48 walfy 阅读(160) 评论(0) 推荐(0) 编辑
摘要:The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware 阅读全文
posted @ 2017-03-01 18:13 walfy 阅读(305) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示