题目地址:codeforces 292 B
用队列维护度数为1的点,也就是可以唯一确定的点,然后每次找v1,v2,并用v2来更新与之相连的点,如果更新后的点度数为1,就加入队列。若最后还有为”.”的,说明无解或解不唯一。
代码如下:#include
#include
#include
#include
#include...
分类:
编程语言 时间:
2015-02-20 22:04:45
阅读次数:
267
D. Drazil and Tiles
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Drazil created a following problem abou...
分类:
编程语言 时间:
2015-02-18 14:09:31
阅读次数:
287
Red and Black
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 24058
Accepted: 13007
Description
There is a rectangular room, covered with square tiles. E...
分类:
其他好文 时间:
2015-02-18 14:06:09
阅读次数:
133
B. Drazil and TilesDrazil created a following problem about putting 1?×?2 tiles into an n?×?m grid:"There is a grid with some cells that are empty and...
分类:
其他好文 时间:
2015-02-18 12:59:28
阅读次数:
152
Problem Description
The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed into a 4 by 4 frame with one tile m...
分类:
编程语言 时间:
2015-02-15 09:29:04
阅读次数:
1023
Problem Description
There is a large room in the Pyramid called Room-of-No-Return. Its floor is covered by rectangular tiles of equal size. The name of the room was chosen because of the very high ...
分类:
其他好文 时间:
2015-02-06 09:36:59
阅读次数:
185
Red and Black
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 23904
Accepted: 12927
Description
There is a rectangular room, covered with square tiles....
分类:
其他好文 时间:
2015-02-02 18:07:53
阅读次数:
111
DescriptionThere 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...
分类:
其他好文 时间:
2015-01-27 21:43:01
阅读次数:
170
uva 11210 Chinese Mahjong
Mahjong () is a game of Chinese origin usually played by four persons with tiles resembling dominoes and bearing various designs, which are drawn and discarded until o...
分类:
其他好文 时间:
2015-01-27 09:30:43
阅读次数:
273
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 c...
分类:
其他好文 时间:
2015-01-20 13:31:48
阅读次数:
148