比赛的时候,被题目误导了,题目最后说结果可能很大,要取模,那时就想直接求会TLE的!!! 赛后才知道,坑啊………… 代码如下: #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> #define ll long long #define M 80001 #define mod 1000000007 using names…
http://acm.hdu.edu.cn/showproblem.php?pid=4710 Balls Rearrangement Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 735 Accepted Submission(s): 305 Problem Description Bob has N balls and A b…
http://acm.hdu.edu.cn/showproblem.php?pid=4708 Rotation Lock Puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Alice was felling into a cave. She found a strange door with a number square m…