The Donkey of Gui Zhou Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4740 Description There was no donkey in the province of Gui Zhou, China. A trouble maker shipped one and put it in the forest which could be…
Problem Description There was no donkey ,) , the down-right cell ,N-) and the cell below the up-left cell ,)..... A × grid is shown below: The donkey lived happily until it saw a tiger far away. The donkey had never seen a tiger ,and the tiger had ne…
1.扯犊子超多if else 判断的代码,华丽丽的TLE. #include<stdio.h> #include<string.h> #define N 1010 int map[N][N]; ][]= {,,,,,-,-,}; struct Node { int x,y; int f; }; int main() { int n; Node tig,don; while(scanf("%d",&n)!=EOF&&n) { memset(…
Problem Description There was no donkey in the province of Gui Zhou, China. A trouble maker shipped one and put it in the forest which could be considered as an N×N grid. The coordinates of the up-left cell is (0,0) , the down-right cell is (N-1,N-1)…
题目链接 老虎左拐,老鼠右拐,碰到不能走的拐一次,如果还不能走就停下,自己走过的不能走,求相遇的坐标或-1 一个停下之后,另一个还可以走 #include <cstdio> #include <cstring> using namespace std; #define N 1005 struct node { int x,y; }p[N*N],q[N*N]; int visi[N][N],xy[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; int n; in…
The Donkey of Gui Zhou Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 389 Accepted Submission(s): 153 Problem Description There was no donkey in the province of Gui Zhou, China. A trouble m…