03 2014 档案

摘要:DescriptionLittle Y finds there is a very interesting formula in mathematics:XYmod Z = KGivenX,Y,Z, we all know how to figure outKfast. However, givenX,Z,K, could you figure outYfast?InputInput data consists of no more than 20 test cases. For each test case, there would be only one line containing 3 阅读全文
posted @ 2014-03-29 23:27 Oyking 阅读(337) 评论(0) 推荐(0)
摘要:DescriptionGiven a prime P, 2 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 typedef long long LL; 8 9 const int SIZEH = 65537;10 11 struct hash_map {12 int head[SIZEH], size;13 int next[SIZEH];14 LL state[SIZEH], val[SIZEH];15 16 void init() {17 m... 阅读全文
posted @ 2014-03-28 21:29 Oyking 阅读(533) 评论(0) 推荐(0)
摘要:DescriptionProf. Kaykobad has given Nasa the duty of buying some food for the ACM contestents. Nasa decided to buyndifferent items. He then asked each of themcontestents how much of each item they want to eat. They could not give any logical answer, they only want as much as they wish! Nasa knows qu 阅读全文
posted @ 2014-03-26 00:30 Oyking 阅读(895) 评论(2) 推荐(0)
摘要:DescriptionThe widget factory produces several different kinds of widgets. Each widget is carefully built by a skilled widgeteer. The time required to build a widget depends on its type: the simple widgets need only 3 days, but the most complex ones may need as many as 9 days.The factory is currentl 阅读全文
posted @ 2014-03-20 23:47 Oyking 阅读(224) 评论(3) 推荐(0)
摘要:Shirai Kurokois a Senior One student. Almost everyone inAcademy Cityhave super powers, andKurokois good at using it. Her ability is "Teleporting", which can make people to transfer in the eleven dimension, and it shows like moving instantly in general people's eyes.In fact, the theory 阅读全文
posted @ 2014-03-20 11:36 Oyking 阅读(330) 评论(0) 推荐(0)
摘要:Problem Description You may not hear about Nubulsa, an island country on the Pacific Ocean. Nubulsa is an undeveloped country and it is threatened by 阅读全文
posted @ 2014-03-16 23:15 Oyking 阅读(994) 评论(0) 推荐(0)
摘要:Given a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectangle is the sum of all the elements in that rectangle. In this problem the sub-rectangle with the largest sum is referred to as themaximal sub-rectangle. A sub-rectangle is a 阅读全文
posted @ 2014-03-06 23:49 Oyking 阅读(348) 评论(0) 推荐(0)
摘要:Problem DescriptionDuring a programming contest, teams cannot sit close to each other, because then a team might copy the solution of another team. You are given the locations of the teams and the minimum required Euclidian distance between two teams. You have to find the number of pairs of teams th 阅读全文
posted @ 2014-03-05 01:03 Oyking 阅读(246) 评论(0) 推荐(0)
摘要:Our chemical biologists have invented a new very useful form of life calledstripies(in fact, they were first called in Russian -polosatiki, but the scientists had to invent an English name to apply for an international patent). The stripies are transparent amorphous amebiform creatures that live in 阅读全文
posted @ 2014-03-02 20:48 Oyking 阅读(309) 评论(0) 推荐(0)
摘要:The blocks in the city of Fishburg are of square form.Navenues running south to north andMstreets running east to west bound them. A helicopter took off in the most southwestern crossroads and flew along the straight line to the most northeastern crossroads. How many blocks did it fly above?Note.A b 阅读全文
posted @ 2014-03-01 18:43 Oyking 阅读(354) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示