摘要:
Problem Description There is a n×m board, a chess want to go to the position (n,m) from the position (1,1).The chess is able to go to position (x2,y2) 阅读全文
摘要:
P is a permutation of the integers from 1 to N(index starting from 1).Here is the code of Bubble Sort in C++. After the sort, the array is in increasi 阅读全文
摘要:
Bo is a "Life Winner".He likes playing chessboard games with his girlfriend G.The size of the chessboard is N×M.The top left corner is numbered(1,1) a 阅读全文
摘要:
Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there 阅读全文
摘要:
Professor Zhang draws n points on the plane, which are conveniently labeled by 1,2,...,n. The i-th point is at (xi,yi). Professor Zhang wants to know 阅读全文
摘要:
#include <iostream>using namespace std; const int maxnum = 100;const int maxint = 999999; void Dijkstra(int n, int v, int *dist, int *prev, int c[maxn 阅读全文
摘要:
long long int c[600][600];void init(){ memset(c, 0, sizeof(c)); for (int i = 0; i <= 505; i++) { c[i][1] = i; c[i][0] = 1; } for (int i = 2; i <= 500; 阅读全文