HDU 1222 Wolf and Rabbit (最大公约数)解题报告 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=88159#problem/G 题目: Description There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must hide in one of the holes…
Problem Description There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must hide in one of the holes. A wolf searches the rabbit in anticlockwise order. The first hole he get into is the one signed with 0. Then he will…
Description There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must hide in one of the holes. A wolf searches the rabbit in anticlockwise order. The first hole he get into is the one signed with 0. Then he will get into…
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must hide in one of the holes. A wolf searches the rabbit in anti…
Wolf and Rabbit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9485 Accepted Submission(s): 4857 Problem Description There is a hill with n holes around. The holes are signed from 0 to n-1.…
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9848 Accepted Submission(s): 5011 Problem Description There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must hi…
链接:传送门 题意:狼抓兔子,狼从 0 出发沿逆时针寻找兔子,每走一步的距离为 m ,所有洞窟的编号为 0 - n-1 ,问是否存在一个洞窟使得兔子能够安全躲过无数次狼的搜捕. 思路:简单的拓展欧几里德,设 st 为兔子洞窟编号( 0 <= st < n ),很简单就可以得到一个方程 0 + m * x = n * y + st,化简一下得到 m * x - n * y = st,如果这个方程有解,那么兔子一定能被狼抓到.方程有解的条件是 st % d == 0 ,当 d == 1 时,显然是…
HDU 1000 A + B Problem I/O HDU 1001 Sum Problem 数学 HDU 1002 A + B Problem II 高精度加法 HDU 1003 Maxsum 贪心 HDU 1004 Let the Balloon Rise 字典树,map HDU 1005 Number Sequence 求数列循环节 HDU 1007 Quoit Design 最近点对 HDU 1008 Elevator 模拟 HDU 1010 Tempter of th…