随笔分类 - dfs+bfs
摘要:最近忙于写题和被虐,还有懒,好久没有更新博客了,昨天被虐了一整天,整个人都是迷茫状态,好好补cf吧 发现挺有意思的 这题就是cur点可以到cur-1,cur+1,a[cur]三个位置,求最短路径问题 题目数据量较大,当时没想到可以用bfs,也是好久没有用纯搜索了,时间复杂度不会算呀,我以为会超的or
阅读全文
摘要:FatMouse and Cheese Problem Description FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each gr
阅读全文
摘要:A Walk Through the Forest Problem Description Jimmy experiences a lot of stress at work these days, especially since his accident made working difficu
阅读全文
摘要:滑雪 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 88861 Accepted: 33344 Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑
阅读全文
摘要:Anagrams by Stack Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1513 Accepted Submission(s): 69
阅读全文
摘要:很水的题吧,不过以后注意环这种要考虑头尾情况 为了省力素数表范围打错了,太坑了 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <string>
阅读全文
摘要:脑子有点坑,不知道为什么,可能以前遇到阴影了,现在看到dfs暴力搜有种莫名的害怕,总结一下模板吧 这题还是没意思的,直接暴力搜,不过我写的很烂,可能就是这个原因吧,看了别人的模板,觉得不错。 学了个单词”lexicography“ 字典序,又吃了没文化的亏,wa一次 #include <iostre
阅读全文
摘要:Nightmare Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9424 Accepted Submission(s): 4551 Probl
阅读全文
摘要:Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24608 Accepted Submission(s): 8686 Problem
阅读全文
摘要:Oil Deposits Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22543 Accepted Submission(s): 12980
阅读全文
摘要:Asteroids! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4595 Accepted Submission(s): 2962 Inpu
阅读全文
摘要:Tempter of the Bone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 101603 Accepted Submission(s)
阅读全文

浙公网安备 33010602011771号