A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41972 Accepted: 14286 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey ar…
http://poj.org/problem?id=2488 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two squares in one directi…
A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 35868 Accepted: 12227 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey ar…
A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41936 Accepted: 14269 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey ar…
poj-2488 题意:一个人要走遍一个不大于8*8的国际棋盘,他只能走日字,要输出一条字典序最小的路径 题解: (1)题目上说的"The knight can start and end on any square of the board.",是个坑点,其实要走字典序最小只需从A1开始遍历就行,因为从任意一点开始,只要能遍历完整个地图,那么A1也可以: (2)要使字典序最小,那么遍历顺序一定要注意 int dr[8]={-1,1,-2,2,-2,2,-1,1};int dc[8]=…
来之不易的2017第一发ac http://poj.org/problem?id=2386 Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 31474 Accepted: 15724 Description Due to recent rains, water has pooled in various places in Farmer John's field, which is repr…
E. e-Government time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output The best programmers of Embezzland compete to develop a part of the project called "e-Government" — the system of automa…