摘要:A. Sereja and Coat Racktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSereja owns a restaurant fornpeople. The restaurant hall has a coat rack withnhooks. Each restaurant visitor can use a hook to hang his clothes on it. Using thei-th hook costsa
阅读全文
摘要:#include #include #include #include #include int sum;int n,m;int a[100010];int l[100010];int s[100010];int map[100010];int main(){ while(~scanf("%d%d",&n,&m)) { memset(a,0,sizeof(a)); memset(l,0,sizeof(l)); memset(s,0,sizeof(s));; for(int i = 1;i = 1;i --) { ...
阅读全文
摘要:Count the rectanglesTimeLimit:2 Second MemoryLimit:64 MegabyteTotalsubmit:64 Accepted:36 DescriptionYou are given numbers of rectangles made of '1's and '0's.Calculate how many small rectangles which have four '1's on the four corners.InputThere are several test cases, each t
阅读全文
摘要:PhotoTimeLimit:2 Second MemoryLimit:64 MegabyteTotalsubmit:33 Accepted:13 DescriptionFJ wants to take pictures of his N cows (2 #include #include #include #include using namespace std;int can_be[1010][1010];int map[10010];int the_last_sum;int n,k;int a,b;struct Node{ int x; int posi;}v[10010];in...
阅读全文
摘要:Breed ProximityTimeLimit:2 Second MemoryLimit:64 MegabyteTotalsubmit:46 Accepted:10 DescriptionFarmer John's N cows (1 #include #include #include #include using namespace std;int map[51010];int can_be[1100000];int the_last_max;int n,k;int main(){ while(~scanf("%d%d",&n,&k)) { m
阅读全文
摘要:Zhuge Liang's PasswordTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 17Accepted Submission(s): 14 Problem Description In the ancient three kingdom period, Zhuge Liang was the most famous and smart military leader. His enemy was Sima Yi, the m
阅读全文
摘要:Climbing WormTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10329Accepted Submission(s): 6841 Problem DescriptionAn inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a mi
阅读全文
摘要:Climbing WormTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10288Accepted Submission(s): 6815Problem DescriptionAn inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minu
阅读全文
摘要:ReversiTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1065Accepted Submission(s): 435Problem DescriptionReversi, also called Othello, is a two-sided game.Each of the two sides corresponds to one player; they are referred to here as light and dark
阅读全文
摘要:Self NumbersTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5495Accepted Submission(s): 2431 Problem DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define
阅读全文
摘要:Robot MotionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5274Accepted Submission(s): 2454Problem DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid dow
阅读全文