题目链接 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…
我发这题只是想说明:有时候确实需要用水题来找找自信的~ 代码如下: #include <stdio.h> #include <algorithm> #include <string.h> using namespace std; typedef long long ll; +] = {,,,,,,,,,,,,,,,,,,,,}; +]; void init() { ;i<=;i++) num[i] = + num[i-]; num[] = ; ;i<=;i+…
p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-size: 10.5000pt } h1 { margin-top: 5.0000pt; margin-bottom: 5.0000pt; text-align: center; font-family: 宋体; color: rgb(26,92,200); font-weight: bold; fo…
题目链接: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…
Problem Description 谁画8画的好,画的快,今后就发的快,学业发达,事业发达,祝大家发,发,发. Input 输入的第一行为一个整数N,表示后面有N组数据. 每组数据中有一个字符和一个整数,字符表示画笔,整数(>=5)表示高度. Output 画横线总是一个字符粗,竖线随着总高度每增长6而增加1个字符宽.当总高度从5增加到6时,其竖线宽度从1增长到2.下圈高度不小于上圈高度,但应尽量接近上圈高度,且下圈的内径呈正方形. 每画一个"8"应空一行,但最前和最后都无空…
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…