Ural做题记录
文章平均质量分 82
2013暑假集训Ural做题记录
Shicheng_Yang
这个作者很懒,什么都没留下…
展开
-
Ural 1167. Bicolored Horses DP
1167. Bicolored HorsesTime limit: 1.0 secondMemory limit: 64 MBEvery day, farmer Ion (this is a Romanian name) takes out all his horses, so they may run and play. When they are done, far原创 2013-08-21 15:36:25 · 1275 阅读 · 0 评论 -
Ural 1132. Square Root 二次剩余
1132. Square RootTime limit: 1.0 secondMemory limit: 64 MBThe number x is called a square root of a modulo n (root(a,n)) if x*x = a (mod n). Write the program to find the square root o原创 2013-08-19 17:43:12 · 1197 阅读 · 0 评论 -
Ural 1456. Jedi Riddle 2 整数的阶
1456. Jedi Riddle 2Time limit: 0.25 secondMemory limit: 64 MBBackgroundEveryone wants to be respected and famous. At that many of us forget that most people became respected and famous原创 2013-08-19 11:26:58 · 764 阅读 · 0 评论 -
Ural 1554. Multiplicative Functions 狄利克雷卷积
1554. Multiplicative FunctionsTime limit: 2.0 secondMemory limit: 64 MBIn number theory, a multiplicative function is an arithmetic function F(n) of the positive integer nwith property t原创 2013-08-19 09:46:19 · 1789 阅读 · 0 评论 -
Ural 1268. Little Chu 求原根
1268. Little ChuTime limit: 0.25 secondMemory limit: 64 MBThe favorite occupation of Little Chu is to sleep. Strictly speaking, he is busy with nothing but sleeping. Sometimes he wakes u原创 2013-08-15 18:35:12 · 829 阅读 · 0 评论 -
Ural 1428. Jedi Riddle 二分求幂
1428. Jedi RiddleTime limit: 1.0 secondMemory limit: 64 MBBackgroundSystem administrator Vasily Slipman, also known as Jedi Master, was an outstanding jester. He enciphered gigabyte ar原创 2013-08-15 10:02:54 · 661 阅读 · 0 评论 -
Ural 1585. Penguins
1585. PenguinsTime limit: 1.0 secondMemory limit: 64 MBProgrammer Denis has been dreaming of visiting Antarctica since his childhood. However, there are no regular flights to Antarctica原创 2013-08-14 20:58:49 · 773 阅读 · 0 评论 -
Ural 1698. Square Country 5 记忆化搜索
1698. Square Country 5Time limit: 2.0 secondMemory limit: 64 MBThe first arithmetical operation taught to the children of the Square country is the calculation of squares of positive int原创 2013-08-14 20:26:18 · 883 阅读 · 0 评论 -
Ural 1593. Square Country. Version 2 Lagrange 定理
1593. Square Country. Version 2Time limit: 1.0 secondMemory limit: 64 MBThere live square people in a square country. Everything in this country is square also. Thus, the Square Parliame原创 2013-08-14 20:05:06 · 1139 阅读 · 0 评论 -
Ural 1097. Square Country 2
1097. Square Country 2Time limit: 1.0 secondMemory limit: 64 MBThe Square Parliament of the Square country (recall the corresponding problem from the USU 2001 personal contest) has decre原创 2013-08-14 18:30:23 · 1279 阅读 · 0 评论 -
Ural 1748. The Most Complex Number DFS+反素数
1748. The Most Complex NumberTime limit: 1.0 secondMemory limit: 64 MBLet us define a complexity of an integer as the number of its divisors. Your task is to find the most complex intege原创 2013-08-14 17:00:14 · 1000 阅读 · 0 评论 -
Ural 1486. Equal Squares 字符串hash
1486. Equal SquaresTime limit: 2.0 secondMemory limit: 16 MBDuring a discussion of problems at the Petrozavodsk Training Camp, Vova and Sasha argued about who of them could in 300 minute原创 2013-08-14 14:51:40 · 1607 阅读 · 0 评论 -
Ural 1446. Sorting Hat
1446. Sorting HatTime limit: 1.0 secondMemory limit: 64 MBAt the start of each school year, a very important event happens at Hogwarts. Each of the first-year wizards and witches is assi原创 2013-08-14 10:11:53 · 897 阅读 · 0 评论 -
Ural 1706. Cipher Message 2 后缀数组
1706. Cipher Message 2Time limit: 3.0 secondMemory limit: 64 MBMüller had been suspecting for a long time that Stierlitz had been sending cipher messages to the USSR from time to time. A原创 2013-08-14 09:54:52 · 827 阅读 · 0 评论 -
Ural 1713. Key Substrings 后缀数组
1713. Key SubstringsTime limit: 2.0 secondMemory limit: 64 MBAlthough the program committee works as one team, heated debates arise frequently enough. For example, there is no agreement原创 2013-08-12 21:09:56 · 861 阅读 · 1 评论 -
Ural 1017. Staircases
1017. StaircasesTime limit: 1.0 secondMemory limit: 64 MBOne curious child has a set of N little bricks (5 ≤ N ≤ 500). From these bricks he builds different staircases. Staircase consist原创 2013-08-12 10:10:29 · 2300 阅读 · 2 评论 -
Ural 1073. Square Country 背包
1073. Square CountryTime limit: 1.0 secondMemory limit: 64 MBThere live square people in a square country. Everything in this country is square also. Thus, the Square Parliament has pass原创 2013-08-12 09:35:09 · 686 阅读 · 0 评论 -
Ural 1260. Nudnik Photographer DP
1260. Nudnik PhotographerTime limit: 1.0 secondMemory limit: 64 MBIf two people were born one after another with one second difference and one of them is a child, then the other one is a原创 2013-08-12 09:01:42 · 850 阅读 · 0 评论 -
Ural 1353. Milliard Vasya's Function 暴搜
1353. Milliard Vasya's FunctionTime limit: 1.0 secondMemory limit: 64 MBVasya is the beginning mathematician. He decided to make an important contribution to the science and to become fa原创 2013-08-11 21:33:31 · 867 阅读 · 0 评论 -
Ural 1203. Scientific Conference
1203. Scientific ConferenceTime limit: 1.0 secondMemory limit: 64 MBFunctioning of a scientific conference is usually divided into several simultaneous sections. For example, there may b原创 2013-08-11 21:24:02 · 1305 阅读 · 0 评论 -
Ural 1146. Maximum Sum DP经典
1146. Maximum SumTime limit: 1.0 secondMemory limit: 64 MBGiven a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectang原创 2013-08-11 20:34:19 · 848 阅读 · 0 评论 -
Ural 1119. Metro DP+精度
1119. MetroTime limit: 0.5 secondMemory limit: 64 MBMany of SKB Kontur programmers like to get to work by Metro because the main office is situated quite close the station Uralmash. So,原创 2013-08-11 19:51:48 · 1123 阅读 · 0 评论 -
Ural 1286. Starship Travel
1286. Starship TravelTime limit: 1.0 secondMemory limit: 64 MBIt is well known that a starship equipped with class B hyperengine is able to travel from any planet to any other planet. Bu原创 2013-08-06 09:54:11 · 1033 阅读 · 0 评论 -
Ural 1430. Crime and Punishment
1430. Crime and PunishmentTime limit: 0.5 secondMemory limit: 64 MBBackgroundPetty bureaucrat Victor Thiefton was disposed towards stealing from his childhood. But one thing is to lega原创 2013-08-05 16:50:00 · 1059 阅读 · 0 评论 -
Ural 1028. Stars 线段树单点更新
1028. StarsTime limit: 0.25 secondMemory limit: 64 MBAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the原创 2013-08-05 15:23:13 · 788 阅读 · 0 评论 -
Ural 1141. RSA Attack 扩展欧几里得算法
1141. RSA AttackTime limit: 1.0 secondMemory limit: 64 MBThe RSA problem is the following: given a positive integer n that is a product of two distinct odd primes p and q, a positive int原创 2013-08-03 15:53:30 · 1374 阅读 · 0 评论 -
Ural 1225. Flags DP
1225. FlagsTime limit: 1.0 secondMemory limit: 64 MBOn the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue and原创 2013-08-03 13:52:48 · 1688 阅读 · 0 评论 -
Ural 1009. K-based Numbers DP
1009. K-based NumbersTime limit: 1.0 secondMemory limit: 64 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if itsK-based notation doesn’t c原创 2013-08-02 21:43:48 · 1286 阅读 · 0 评论 -
Ural 1356. Something Easier 哥德巴赫猜想
1356. Something EasierTime limit: 1.0 secondMemory limit: 64 MB“How do physicists define prime numbers? Very easily: prime numbers are the number 2 and all the odd numbers greater than 2原创 2013-08-01 15:32:23 · 752 阅读 · 0 评论 -
Ural 1091. Tmutarakan Exams 排列组合+容斥原理+质因数分解
1091. Tmutarakan ExamsTime limit: 1.0 secondMemory limit: 64 MBUniversity of New Tmutarakan trains the first-class specialists in mental arithmetic. To enter the University you should ma原创 2013-08-01 10:15:19 · 807 阅读 · 0 评论 -
Ural 1355. Bald Spot Revisited 质因数分解
1355. Bald Spot RevisitedTime limit: 1.0 secondMemory limit: 64 MBA student dreamt that he walked along the town where there were lots of pubs. He drank a mug of ale in each pub. All the原创 2013-07-31 20:56:35 · 781 阅读 · 0 评论 -
Ural 1204. Idempotents 扩展欧几里得算法
1204. IdempotentsTime limit: 1.0 secondMemory limit: 64 MBThe number x is called an idempotent modulo n ifx*x = x (mod n)Write the program to find all idempotents modulo n, w原创 2013-07-31 19:29:37 · 1128 阅读 · 0 评论 -
Ural 1049. Brave Balloonists 求因子的个数
1049. Brave BalloonistsTime limit: 2.0 secondMemory limit: 64 MBTen mathematicians are flying on a balloon over the Pacific ocean. When they are crossing the equator they decide to celeb原创 2013-07-31 18:40:58 · 900 阅读 · 0 评论 -
Ural 1352. Mersenne Primes 梅森素数
1352. Mersenne PrimesTime limit: 1.0 secondMemory limit: 64 MBDefinition. If the number 2N−1 is prime then it is called a Mersenne prime number.For example, 22−1 — the first Mersen原创 2013-07-30 21:38:28 · 1200 阅读 · 0 评论 -
Ural 1086. Cryptography 筛素数
1086. CryptographyTime limit: 2.0 secondMemory limit: 64 MBWhile preparing this problem set the jury has run into the following problem: it was necessary to send by e-mail the texts of t原创 2013-07-30 15:46:54 · 1230 阅读 · 2 评论 -
Ural 1118. Nontrivial Numbers 求因子和
1118. Nontrivial NumbersTime limit: 2.0 secondMemory limit: 64 MBSpecialists of SKB Kontur have developed a unique cryptographic algorithm for needs of information protection while trans原创 2013-07-30 15:15:01 · 1293 阅读 · 0 评论 -
Ural 1104. Don’t Ask Woman about Her Age
1104. Don’t Ask Woman about Her AgeTime limit: 1.0 secondMemory limit: 64 MBMrs Little likes digits most of all. Every year she tries to make the best number of the year. She tries to be原创 2013-07-30 14:05:52 · 1110 阅读 · 0 评论 -
Ural 1465. Pawn Game nim博弈
1465. Pawn GameTime limit: 1.0 secondMemory limit: 64 MBIn their free time, Santa Claus Petrovich and Santa Claus Egorych play the following game. Pawns are arranged on a board 3×3 in th原创 2013-07-30 14:01:20 · 944 阅读 · 0 评论 -
Ural 1126. Magnetic Storms 单调队列
1126. Magnetic StormsTime limit: 0.5 secondMemory limit: 64 MBThe directory of our kindergarten decided to be attentive to the children's health and not to let them walk outdoors during原创 2013-07-29 21:43:22 · 710 阅读 · 0 评论 -
Ural 1158. Censored! AC自动机+大数
1158. Censored!Time limit: 2.0 secondMemory limit: 64 MBThe alphabet of Freeland consists of exactly N letters. Each sentence of Freeland language (also known as Freish) consists of exac原创 2013-07-29 20:21:11 · 864 阅读 · 0 评论