DescriptionOrganizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contest result satisfy the following two terms:1. All of the teams solve at least one problem. 2. The
DescriptionConsider a single-elimination football tournament involving 2n teams, denoted 1, 2, …, 2n. In each round of the tournament, all teams still in the tournament are placed in a list in order of increasing index. Then, the first team in the
n 0th day, there are n-1 people and 1 bloodsucker. Every day, two and only two of them meet. Nothing will happen if they are of the same species, that is, a people meets a people or a bloodsucker meets a bloodsucker. Otherwise, people may be
Conquer a New RegionTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 647 Accepted Submission(s): 174Problem DescriptionThe wheel of the history rolling forward, our king conquered a new
Recently poet Mr. po encountered a serious problem, rumor said some of his early poems are written by others. This brought a lot of trouble to Mr. po, so one day he went to his best friend MasterO for help. MasterO handed over a small wooden box
CodeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1746 Accepted: 655DescriptionKEY Inc., the leading company in security hardware, has developed a new kind of safe. To unlock it, you don't need a key but you are required to enter the
DescriptionWshxzt is a lovely girl. She likes apple very much. One day HX takes her to an apple tree. There are N nodes in the tree. Each node has an amount of apples. Wshxzt starts her happy trip at one node. She can eat up all the apples in the
Problem DescriptionA balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box with weight indicated by the digit. When a pivot is placed at some digit of the
CatenymsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8414 Accepted: 2212DescriptionA catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of the second. For example,
Problem DescriptionHere is a function f(x): int f ( int x ) { if ( x == 0 ) return 0; return f ( x / 10 ) + x % 10; } Now, you want to know, in a given interval [A, B] (1 <= A <= B <= 109), how many integer x that mod f(x)
Play GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 35 Accepted Submission(s): 24Problem DescriptionAlice and Bob are playing a game. There are two piles of cards. There are N cards in
DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) in order to make arbitrary decisions such as who gets
題意:有3個重複持續時間,周期天數分別為23、28、33。對於某一年,已知某年這3個周期的某一峰值分別是當年的第p、e、i天,問從第d天開始到最近一個滿足3個周期都達到峰值的日期還有多少天。資料比較小,直接打表可過:# include <stdio.h>int tab[40][40][40]; int cal(int num){if (num <= 0) return num + 21252 ;return num ;}int main (){int p,e,i,d,T,
Problem DescriptionAkemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl).Homura wants to help her friend Madoka save the world. But because of the plot of the Boss Incubator, she is trapped in a labyrinth called LOOPS.The planform of the LOOPS