题目链接 Problem Description A number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whistle, each student simultaneously gives half of his or her can…
Candy Sharing Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4448 Accepted Submission(s): 2718 Problem Description A number of students sit in a circle facing their teacher in the cente…
题目链接:https://cn.vjudge.net/problem/HDU-1034 水题 代码 #include <cstdio> #include <algorithm> int n; long long stu[10000+5], max, min; int func(void){ int tmp[2]={stu[0]/=2, 0}; for (int i=0; i<n; i++){ tmp[1]=stu[i+1]/=2; stu[(i+1)%n]+=tmp[0];…
Candy Sharing Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4425 Accepted Submission(s): 2698 Problem Description A number of students sit in a circle facing their teacher in the cent…
Higher Math Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2219 Accepted Submission(s): 1219 Problem Description You are building a house. You’d prefer if all the walls have a precise right…
这里是杭电hdu上的链接:http://acm.hdu.edu.cn/showproblem.php?pid=3999 Problem Description: As we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely: 1. insert a key k to a empty tree, then the tree becom…
Eddy's research I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5793 Accepted Submission(s): 3459 Problem Description Eddy's interest is very extensive, recently he is interested in prime n…