Help Me with the Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3510   Accepted: 2251 Description Your task is to read a picture of a chessboard position and print it in the chess notation. Input The input consists of an ASCII-art…
Emag eht htiw Em Pleh Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2806   Accepted: 1865 Description This problem is a reverse case of the problem 2996. You are given the output of the problem H and your task is to find the correspond…
Hangover Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 103896   Accepted: 50542 Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're a…
487-3279 Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 247781   Accepted: 44015 Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phras…
Borg Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8905   Accepted: 2969 Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to descr…
Highways Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 23033   Accepted: 10612 Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Fl…
http://poj.org/problem?id=1321 注意是在'#'的地方放棋子 矩阵大小不过8*8,即使是8!的时间复杂度也足以承受,可以直接dfs求解 dfs时标注当前点的行和列已被访问,接着搜索行列都未被访问的新点,注意搜索完毕之后标注当前点的行和列未被访问 #include <cstdio> #include <cstring> using namespace std; int n,k; char maz[8][9]; int e[8][8],len[8]; boo…
kruskal思想,排序后暴力枚举从任意边开始能够组成的最小生成树 #include <cstdio> #include <algorithm> using namespace std; const int maxn = 101; const int maxe = maxn * maxn / 2; struct edge{ int f,t,c; bool operator <(edge e2)const { return c<e2.c; } }e[maxe]; int…
Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 19697   Accepted: 10800 Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representatio…
Agri-Net Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 41230   Accepted: 16810 Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He nee…