Rectangles Time Limit: 5000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1503 Accepted Submission(s): 777 Problem Description You are developing a software for painting rectangles on the screen. The softwa…
Rectangles Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19110 Accepted Submission(s): 6187 Problem Description Given two rectangles and the coordinates of two points on the diagonals of ea…
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1509 Accepted Submission(s): 592 Problem Description There are n people standing in a line. Each of them has a unique id number. Now the Ragn…
Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description XXX is puzzled with the question below: 1, 2, 3, ..., n (1<=n<=400000) are placed in a line. There are m (1<=m<=1000) operations of two…
GCD Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4272 Accepted Submission(s): 1492 Problem Description Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y)…
E - The Boss on Mars Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4059 Description On Mars, there is a huge company called ACM (A huge Company on Mars), and it’s owned by a younger boss. Due…
H - Visible Trees Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 2841 Description There are many trees forming a m * n grid, the grid starts from (1,1). Farmer Sherlock is standing at (0,0) poi…
http://acm.split.hdu.edu.cn/showproblem.php?pid=4336 Card Collector Special Judge Problem Description In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people i…
http://acm.hdu.edu.cn/showproblem.php?pid=5768 Lucky7 Problem Description When ?? was born, seven crows flew in and stopped beside him. In its childhood, ?? had been unfortunately fall into the sea. While it was dying, seven dolphins arched its bod…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1796 处男容斥原理 纪念一下 TMD看了好久才明白DFS... 先贴代码后解释 #include<cstdio> #include<cstring> using namespace std; #define LL long long #define N 11 LL num[N],ans,n; int m,cnt; LL gcd(LL a,LL b) { int t; while…
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1695 题意:在[a,b]中的x,在[c,d]中的y,求x与y的最大公约数为k的组合有多少.(a=1, a <= b <= 100000, c=1, c <= d <= 100000, 0 <= k <= 100000) 思路:由于x与y的最大公约数为k,所以xx=x/k与yy=y/k一定互质.要从a/k和b/k之中选择互质的数,枚举1~b/k,当选择的yy小于等于a/k时,能够…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4135 Co-prime Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1176 Accepted Submission(s): 427 Problem Description Given a number N, you are a…
题目传送:http://acm.hdu.edu.cn/diy/contest_showproblem.php?cid=20918&pid=1002 Problem Description Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divided exactly by any integers…