随笔分类 - math
摘要:Turn the pokersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 676Accepted Submission(s): 231Probl...
阅读全文
摘要:RatingTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 348Accepted Submission(s): 217Special Judge...
阅读全文
摘要:Cutting GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:2844Accepted:1036DescriptionUrej loves to play various types of dull games. He usual...
阅读全文
摘要:Georgia and BobTime Limit:1000MSMemory Limit:10000KTotal Submissions:7233Accepted:2173DescriptionGeorgia and Bob decide to play a self-invented game. ...
阅读全文
摘要:Euclid's GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:7418Accepted:3022DescriptionTwo players, Stan and Ollie, play, starting with two na...
阅读全文
摘要:A Funny GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:3861Accepted:2311DescriptionAlice and Bob decide to play a funny game. At the beginn...
阅读全文
摘要:Physics ExperimentTime Limit:1000MSMemory Limit:65536KTotal Submissions:784Accepted:266Special JudgeDescriptionSimon is doing a physics experiment withNidentical balls with the same radius ofRcentimeters. Before the experiment, allNballs are fastened within a vertical tube one by one and the lowest
阅读全文
摘要:The Water BowlsTime Limit:1000MSMemory Limit:65536KTotal Submissions:4088Accepted:1609DescriptionThe cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing cool water) or upside-down (a position which holds no water). Th
阅读全文
摘要:D. Upgrading Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have an array of positive integersa[1], a[2], ..., a[n]and a set ofbadprime numbersb1, b2, ..., bm. The prime numbers that do not occur in the setbare consideredgood. Thebeautyo
阅读全文
摘要:D. Toy Sumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Chris is very keen on his toy blocks. His teacher, however, wants Chris to solve more problems, so he decided to play a trick on Chris.There are exactlysblocks in Chris's set, ea
阅读全文
摘要:C. Unusual Producttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Chris is a huge fan of linear algebra. This time he has been given a homework about theunusual squareof a square matrix.Thedot productof two integer number vectorsxandyof siz
阅读全文
摘要:Cow AcrobatsTime Limit:1000MSMemory Limit:65536KTotal Submissions:2302Accepted:912DescriptionFarmer John's N (1 2 #include 3 #include 4 5 using namespace std; 6 7 #define maxn 50005 8 9 #define INF (1 << 30)10 11 struct node {12 int w,s;13 };14 15 node s[maxn];16 int n;17 18 bool cmp(n...
阅读全文
摘要:Dead FractionTime Limit:1000MSMemory Limit:30000KTotal Submissions:1762Accepted:568DescriptionMike is frantically scrambling to finish his thesis at the last minute. He needs to assemble all his research notes into vaguely coherent form in the next 3 days. Unfortunately, he notices that he had been
阅读全文
摘要:Raising Modulo NumbersTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4271Accepted: 2433DescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mathemat
阅读全文
摘要:D. Roman and Numberstime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputRoman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change his mind, Roman is ready to solve any mathematical probl
阅读全文
摘要:Pseudoprime numbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6044Accepted: 2421DescriptionFermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by p, the remainder is a. Some (but not ve
阅读全文
摘要:Semi-prime H-numbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7059Accepted: 3030DescriptionThis problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n+1 numbers. Here, we do only a bit of that.An H-number is a positive number whic
阅读全文
摘要:X-factor ChainsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5111Accepted: 1622DescriptionGiven a positive integer X, an X-factor chain of length m is a sequence of integers,1 = X0, X1, X2, …, Xm = XsatisfyingXi 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 #define m...
阅读全文
摘要:Prime PathTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10320Accepted: 5897DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a matter of securi
阅读全文
摘要:Prime NumberTime Limit : 1 sec, Memory Limit : 65536 KB Japanese version is herePrime NumberWrite a program which reads an integer n and prints the number of prime numbers which are less than or equal to n. A prime number is a natural number which has exactly two distinct natural number divisors: 1
阅读全文

浙公网安备 33010602011771号