There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can move only on black til…
Red and Black Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, h…
第一篇博客,格式惨不忍睹.首先感谢一下鼓励我写博客的大佬@Titordong其次就是感谢一群大佬激励我不断前行@Chunibyo@Tiancfq因为室友tanty强烈要求出现,附上他的名字. Catch That Cow(POJ3278) BFS入门题,然鹅我还是WA了四五发,因为没注意,位置0是可以访问的.再者就是初始位置在push之后,要标记为已经访问. 图片挺不错,我们地大(武汉)的旖旎风光,放松一下. 题目链接:POJ3278 Description Farmer John has be…
Plague Inc. is a famous game, which player develop virus to ruin the world. JSZKC wants to model this game. Let's consider the world has N\times MN×M cities. The world has NN rows and MMcolumns. The city in the XX row and the YY column has coordinate…
题目代号:HDU 1312 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1312 Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20820 Accepted Submission(s): 12673 Problem Description There i…
这个拆边+队列操作实在是太秒了 队列头结点存的是一个存点集的vector,1到这个点集经过的路径权值是一样的,所以向下一层拓展时,先依次走一遍每个点的0边,再走1边...以此类推,能保证最后走出来的路径是最优的 /* 拆边+将每个点的边按权值排序+BFS */ #include<bits/stdc++.h> #include<vector> using namespace std; #define N 1000005 #define ll long long #define mod…
Find a way Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5401 Accepted Submission(s): 1823 Problem Description Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally.…