Codeforces Round 209 (Div. 2)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
359 Codeforces Round 209 (Div. 2) FINISHED False 7200 354319197 Nov. 2, 2013, 8 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3208 ) C Prime Number PROGRAMMING math number theory 2000

B'Simon has a prime number x and an array of non-negative integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an. Simon loves fractions very much. Today he wrote out number on a piece of paper. After Simon led all fractions to a common denominator and summed them up, he got a fraction: , where number t equals xa1 xe2 x80 x89+ xe2 x80 x89a2 xe2 x80 x89+ xe2 x80 x89... xe2 x80 x89+ xe2 x80 x89an. Now Simon wants to reduce the resulting fraction. Help him, find the greatest common divisor of numbers s and t. As GCD can be rather large, print it as a remainder after dividing it by number 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line contains two positive integers n and x (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, 2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the size of the array and the prime number. The second line contains n space-separated integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89... xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89an xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Print a single number -- the answer to the problem modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). In the first sample . Thus, the answer to the problem is 8. In the second sample, . The answer to the problem is 27, as 351 xe2 x80 x89= xe2 x80 x8913 xc2 xb727, 729 xe2 x80 x89= xe2 x80 x8927 xc2 xb727. In the third sample the answer to the problem is 1073741824 mod 1000000007 xe2 x80 x89= xe2 x80 x8973741817. In the fourth sample . Thus, the answer to the problem is 1.'...

Tutorials

Editorial Codeforces Round #209 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58350550 hatsuyuki15 C Aug. 5, 2019, 4:59 p.m. OK D TESTS 36 77 13414400 2000
5025166 Ramp C Nov. 7, 2013, 7:42 p.m. OK Delphi TESTS 36 46 16076800 2000
4988427 triple_e C Nov. 4, 2013, 6:51 p.m. OK FPC TESTS 36 31 512000 2000
4988396 triple_e C Nov. 4, 2013, 6:45 p.m. OK FPC TESTS 36 31 512000 2000
4987312 LMHT C Nov. 4, 2013, 3:53 p.m. OK FPC TESTS 36 31 512000 2000
4988462 triple_e C Nov. 4, 2013, 6:57 p.m. OK FPC TESTS 36 31 614400 2000
5057604 PTNK011215 C Nov. 11, 2013, 5:36 a.m. OK FPC TESTS 36 31 819200 2000
5020257 sxyznoip C Nov. 7, 2013, 6 a.m. OK FPC TESTS 36 31 819200 2000
5057518 ptnk021215 C Nov. 11, 2013, 5:16 a.m. OK FPC TESTS 36 31 921600 2000
5057497 Unreal C Nov. 11, 2013, 5:10 a.m. OK FPC TESTS 36 31 921600 2000
4977994 Nik_Storm_2010 C Nov. 3, 2013, 9:55 a.m. OK FPC TESTS 36 31 921600 2000
5057512 ptnk021215 C Nov. 11, 2013, 5:14 a.m. OK FPC TESTS 36 31 1024000 2000
5033982 liuwenjia C Nov. 9, 2013, 6:31 a.m. OK GNU C TESTS 36 31 409600 2000
4970956 zeosutt C Nov. 2, 2013, 2:03 p.m. OK GNU C TESTS 36 31 819200 2000
4968890 tjandra C Nov. 2, 2013, 10:56 a.m. OK GNU C TESTS 36 31 819200 2000
5096699 Stomach_ache C Nov. 14, 2013, 11:31 a.m. OK GNU C TESTS 36 31 1638400 2000
4966214 daguodunluobo C Nov. 2, 2013, 9:34 a.m. OK GNU C TESTS 36 31 2457600 2000
4964514 LayCurse C Nov. 2, 2013, 9 a.m. OK GNU C TESTS 36 31 3993600 2000
40393491 453908766 C July 16, 2018, 3:01 a.m. OK GNU C TESTS 36 46 819200 2000
40393624 453908766 C July 16, 2018, 3:07 a.m. OK GNU C TESTS 36 61 819200 2000
4968790 ihave33cm C Nov. 2, 2013, 10:49 a.m. OK GNU C++ TESTS 36 15 409600 2000
4969295 diamondlx C Nov. 2, 2013, 11:30 a.m. OK GNU C++ TESTS 36 15 1228800 2000
4966433 bill125 C Nov. 2, 2013, 9:39 a.m. OK GNU C++ TESTS 36 15 2969600 2000
4971196 FancyCoder C Nov. 2, 2013, 2:27 p.m. OK GNU C++ TESTS 36 15 3993600 2000
22571162 vjudge5 C Nov. 28, 2016, 10:41 a.m. OK GNU C++ TESTS 36 30 204800 2000
7432598 NickH C Aug. 12, 2014, 6:15 a.m. OK GNU C++ TESTS 36 30 819200 2000
29521491 vjudge2 C Aug. 17, 2017, 8:05 a.m. OK GNU C++ TESTS 36 31 204800 2000
22571253 vjudge4 C Nov. 28, 2016, 10:46 a.m. OK GNU C++ TESTS 36 31 204800 2000
22571207 vjudge3 C Nov. 28, 2016, 10:43 a.m. OK GNU C++ TESTS 36 31 204800 2000
22570943 vjudge4 C Nov. 28, 2016, 10:30 a.m. OK GNU C++ TESTS 36 31 204800 2000
4966280 howsiwei C Nov. 2, 2013, 9:35 a.m. OK GNU C++0x TESTS 36 15 409600 2000
4968187 savinov C Nov. 2, 2013, 10:20 a.m. OK GNU C++0x TESTS 36 15 2969600 2000
4978350 Shik C Nov. 3, 2013, 10:47 a.m. OK GNU C++0x TESTS 36 31 409600 2000
4963153 sokian C Nov. 2, 2013, 8:32 a.m. OK GNU C++0x TESTS 36 31 819200 2000
5001218 walk_upon C Nov. 6, 2013, 7:09 a.m. OK GNU C++0x TESTS 36 31 921600 2000
4993115 basic C Nov. 5, 2013, 12:34 p.m. OK GNU C++0x TESTS 36 31 1024000 2000
4979896 puru C Nov. 3, 2013, 2:21 p.m. OK GNU C++0x TESTS 36 31 2560000 2000
4984246 itytwt C Nov. 4, 2013, 7:29 a.m. OK GNU C++0x TESTS 36 31 2969600 2000
5023803 fanzhengchen C Nov. 7, 2013, 3:28 p.m. OK GNU C++0x TESTS 36 31 3072000 2000
4970145 JayYe C Nov. 2, 2013, 12:50 p.m. OK GNU C++0x TESTS 36 31 4608000 2000
13186163 dreamoon_love_AA C Sept. 23, 2015, 12:53 p.m. OK GNU C++11 TESTS 36 31 409600 2000
18827007 NewAcount C June 30, 2016, 4:05 p.m. OK GNU C++11 TESTS 36 31 819200 2000
15070449 alkos C Dec. 28, 2015, 12:30 p.m. OK GNU C++11 TESTS 36 31 819200 2000
12601622 MAS1 C Aug. 19, 2015, 10:47 a.m. OK GNU C++11 TESTS 36 31 819200 2000
62119509 vjudge3 C Oct. 8, 2019, 2:16 p.m. OK GNU C++11 TESTS 36 31 1228800 2000
10484895 Yousry C March 27, 2015, 9:11 a.m. OK GNU C++11 TESTS 36 31 1638400 2000
10914125 NourElRashidy C April 27, 2015, 11:13 p.m. OK GNU C++11 TESTS 36 31 2867200 2000
17399401 loyolman C April 20, 2016, 12:41 p.m. OK GNU C++11 TESTS 36 31 3072000 2000
19398715 phycode C July 25, 2016, 8:12 a.m. OK GNU C++11 TESTS 36 31 3174400 2000
15572108 aka.Sohieb C Jan. 25, 2016, 11:34 a.m. OK GNU C++11 TESTS 36 31 4403200 2000
31181943 cscscs C Oct. 10, 2017, 6:03 a.m. OK GNU C++14 TESTS 36 31 1536000 2000
33857148 Zxyelf C Jan. 2, 2018, 3:02 a.m. OK GNU C++14 TESTS 36 31 2252800 2000
25455032 vjudge5 C March 13, 2017, 1:42 p.m. OK GNU C++14 TESTS 36 31 2355200 2000
25539661 vjudge5 C March 16, 2017, 6:09 a.m. OK GNU C++14 TESTS 36 31 3481600 2000
28749340 r3gz3n C July 21, 2017, 12:06 p.m. OK GNU C++14 TESTS 36 31 3891200 2000
35526038 pavankatta C Feb. 20, 2018, 3:38 p.m. OK GNU C++14 TESTS 36 31 5836800 2000
33847439 kefear C Jan. 1, 2018, 1 p.m. OK GNU C++14 TESTS 36 31 6451200 2000
67667941 mota_haathi C Dec. 26, 2019, 6:43 p.m. OK GNU C++14 TESTS 36 46 409600 2000
58172467 Nice_to_meet_you C Aug. 2, 2019, 11:53 a.m. OK GNU C++14 TESTS 36 46 409600 2000
60425065 China_1 C Sept. 12, 2019, 7:41 a.m. OK GNU C++14 TESTS 36 46 819200 2000
44442576 sagami C Oct. 17, 2018, 12:43 p.m. OK GNU C++17 TESTS 36 46 614400 2000
58804968 mike2000 C Aug. 14, 2019, 8:36 a.m. OK GNU C++17 TESTS 36 46 819200 2000
53606633 make_master C May 1, 2019, 10:44 a.m. OK GNU C++17 TESTS 36 46 819200 2000
44346051 __________ C Oct. 15, 2018, 7:23 a.m. OK GNU C++17 TESTS 36 46 1126400 2000
67439136 ivanilos C Dec. 22, 2019, 6:29 p.m. OK GNU C++17 TESTS 36 46 1228800 2000
45968644 YJH143 C Nov. 19, 2018, 2:48 p.m. OK GNU C++17 TESTS 36 46 1228800 2000
45968127 YJH143 C Nov. 19, 2018, 2:35 p.m. OK GNU C++17 TESTS 36 46 1228800 2000
59922821 yan.silva C Sept. 3, 2019, 1:02 a.m. OK GNU C++17 TESTS 36 46 2048000 2000
48473013 Harolinch C Jan. 16, 2019, 10:59 p.m. OK GNU C++17 TESTS 36 46 2252800 2000
63989871 swapnil159 C Nov. 1, 2019, 12:48 p.m. OK GNU C++17 TESTS 36 46 2457600 2000
4968401 autotaker C Nov. 2, 2013, 10:29 a.m. OK Haskell TESTS 36 46 7577600 2000
4993466 zaytsevgu C Nov. 5, 2013, 1:12 p.m. OK Haskell TESTS 36 530 27545600 2000
40386738 453908766 C July 15, 2018, 7:08 p.m. OK Haskell TESTS 36 545 31744000 2000
6361005 xiaowuc1 C April 14, 2014, 11:27 p.m. OK Java 6 TESTS 36 108 0 2000
5480191 rashidk3 C Dec. 20, 2013, 10:24 a.m. OK Java 6 TESTS 36 171 2252800 2000
4981271 llaki C Nov. 3, 2013, 6 p.m. OK Java 6 TESTS 36 187 1126400 2000
4991477 mahmoudhanafi C Nov. 5, 2013, 8:29 a.m. OK Java 6 TESTS 36 202 1024000 2000
5128156 wackloner C Nov. 16, 2013, 10:33 p.m. OK Java 6 TESTS 36 218 2150400 2000
4980367 alibaba C Nov. 3, 2013, 3:19 p.m. OK Java 6 TESTS 36 234 2355200 2000
5495076 atubo C Dec. 23, 2013, 3:16 a.m. OK Java 6 TESTS 36 343 307200 2000
5080341 mkirsche C Nov. 12, 2013, 11:16 p.m. OK Java 6 TESTS 36 358 6451200 2000
4964632 vvenkai C Nov. 2, 2013, 9:02 a.m. OK Java 7 TESTS 36 93 102400 2000
4975632 erickd C Nov. 3, 2013, 4:33 a.m. OK Java 7 TESTS 36 93 409600 2000
5028992 Saguntoz C Nov. 8, 2013, 11:59 a.m. OK Java 7 TESTS 36 109 0 2000
5028982 Saguntoz C Nov. 8, 2013, 11:57 a.m. OK Java 7 TESTS 36 109 0 2000
4973100 KNIGHT0X300 C Nov. 2, 2013, 6:11 p.m. OK Java 7 TESTS 36 109 102400 2000
4973359 xDEMONx C Nov. 2, 2013, 6:51 p.m. OK Java 7 TESTS 36 109 409600 2000
4969767 mingotlik C Nov. 2, 2013, 12:16 p.m. OK Java 7 TESTS 36 109 409600 2000
5027367 sfl C Nov. 8, 2013, 6:56 a.m. OK Java 7 TESTS 36 109 4198400 2000
17826702 DukeOfYork C May 10, 2016, 3:05 a.m. OK Java 7 TESTS 36 109 39116800 2000
4984645 zeonsgtr C Nov. 4, 2013, 9:35 a.m. OK Java 7 TESTS 36 124 0 2000
28021521 coderbond007 C June 25, 2017, 11:48 a.m. OK Java 8 TESTS 36 124 20582400 2000
21550846 uwi C Oct. 17, 2016, 8:02 p.m. OK Java 8 TESTS 36 140 20480000 2000
41631773 Ajudiya_13 C Aug. 15, 2018, 6:44 p.m. OK Java 8 TESTS 36 155 0 2000
41587488 rahulkhairwar C Aug. 14, 2018, 12:10 p.m. OK Java 8 TESTS 36 155 0 2000
32053488 sjain281297 C Nov. 4, 2017, 12:51 p.m. OK Java 8 TESTS 36 155 0 2000
12560352 BlazWin C Aug. 16, 2015, 12:05 p.m. OK Java 8 TESTS 36 155 0 2000
32241744 NRK7 C Nov. 12, 2017, 11:23 a.m. OK Java 8 TESTS 36 155 2457600 2000
52149212 Verdusk C April 1, 2019, 10:55 a.m. OK Java 8 TESTS 36 155 2560000 2000
13504290 abear888 C Oct. 9, 2015, 6:23 a.m. OK Java 8 TESTS 36 156 0 2000
19868035 MedoN11 C Aug. 14, 2016, 12:05 p.m. OK Java 8 TESTS 36 156 25702400 2000
27006704 og.kostya C May 11, 2017, 5:42 a.m. OK MS C# TESTS 36 62 1228800 2000
4975095 dwoolley3 C Nov. 3, 2013, 2:32 a.m. OK MS C# TESTS 36 62 12288000 2000
4975083 dwoolley3 C Nov. 3, 2013, 2:29 a.m. OK MS C# TESTS 36 62 12390400 2000
4975035 dwoolley3 C Nov. 3, 2013, 2:19 a.m. OK MS C# TESTS 36 62 12390400 2000
4975025 dwoolley3 C Nov. 3, 2013, 2:18 a.m. OK MS C# TESTS 36 62 12390400 2000
4975021 dwoolley3 C Nov. 3, 2013, 2:17 a.m. OK MS C# TESTS 36 62 12390400 2000
4984693 Guliash C Nov. 4, 2013, 9:46 a.m. OK MS C# TESTS 36 93 21811200 2000
8559326 azukun C Nov. 5, 2014, 2:46 p.m. OK MS C# TESTS 36 202 17612800 2000
21106204 DigitalArtistKz C Oct. 2, 2016, 5:43 a.m. OK MS C# TESTS 36 202 21401600 2000
5026436 zsh C Nov. 8, 2013, 3:14 a.m. OK MS C++ TESTS 36 31 307200 2000
5026413 zsh C Nov. 8, 2013, 3:08 a.m. OK MS C++ TESTS 36 31 307200 2000
4971217 Tom. C Nov. 2, 2013, 2:29 p.m. OK MS C++ TESTS 36 31 307200 2000
4971144 Tom. C Nov. 2, 2013, 2:22 p.m. OK MS C++ TESTS 36 31 307200 2000
5019398 2012551524 C Nov. 7, 2013, 2:09 a.m. OK MS C++ TESTS 36 31 614400 2000
5500618 dreams C Dec. 24, 2013, 7:21 a.m. OK MS C++ TESTS 36 31 716800 2000
4985390 Afshin_Pir C Nov. 4, 2013, 11:32 a.m. OK MS C++ TESTS 36 31 716800 2000
4975243 jeemy C Nov. 3, 2013, 3 a.m. OK MS C++ TESTS 36 31 716800 2000
4967018 riceCornSorghum C Nov. 2, 2013, 9:50 a.m. OK MS C++ TESTS 36 31 716800 2000
59115468 vjudge1 C Aug. 20, 2019, 1:17 a.m. OK MS C++ TESTS 36 31 819200 2000
62031525 vjudge3 C Oct. 7, 2019, 1:10 a.m. OK MS C++ 2017 TESTS 36 77 4915200 2000
69108696 SendThemToHell C Jan. 19, 2020, 1:54 p.m. OK MS C++ 2017 TESTS 36 108 819200 2000
4978333 kurakun C Nov. 3, 2013, 10:44 a.m. OK Ocaml TESTS 36 234 9523200 2000
21759183 Yash_ C Oct. 24, 2016, 8:36 p.m. OK PyPy 2 TESTS 36 124 7884800 2000
40746536 aeternalis1 C July 25, 2018, 3:01 p.m. OK PyPy 2 TESTS 36 218 14438400 2000
44268104 omarnvidia C Oct. 13, 2018, 5:37 p.m. OK PyPy 3 TESTS 36 233 17203200 2000
11892777 CountZero C July 2, 2015, 7:22 a.m. OK PyPy 3 TESTS 36 420 14438400 2000
5460942 yugle7 C Dec. 18, 2013, 1:38 p.m. OK Python 2 TESTS 36 109 6348800 2000
4987050 nealzane C Nov. 4, 2013, 3:13 p.m. OK Python 2 TESTS 36 124 5836800 2000
4965380 RainDreamer C Nov. 2, 2013, 9:17 a.m. OK Python 2 TESTS 36 124 5939200 2000
5213187 sickplay C Nov. 24, 2013, 2:09 p.m. OK Python 2 TESTS 36 140 6348800 2000
4993600 isurugieri C Nov. 5, 2013, 1:29 p.m. OK Python 2 TESTS 36 140 12492800 2000
14348333 pabloestrela C Nov. 19, 2015, 6:38 p.m. OK Python 2 TESTS 36 155 5939200 2000
14348306 motioncrazy C Nov. 19, 2015, 6:37 p.m. OK Python 2 TESTS 36 155 5939200 2000
35861792 ______u______ C March 2, 2018, 10:10 p.m. OK Python 2 TESTS 36 155 10342400 2000
35861607 ______n______ C March 2, 2018, 10:06 p.m. OK Python 2 TESTS 36 155 10342400 2000
35861179 _____i_____ C March 2, 2018, 9:57 p.m. OK Python 2 TESTS 36 155 10342400 2000
9210477 minimario C Dec. 20, 2014, 8:25 p.m. OK Python 3 TESTS 36 109 9216000 2000
5460922 yugle7 C Dec. 18, 2013, 1:35 p.m. OK Python 3 TESTS 36 109 9728000 2000
37575000 nowyyz C April 24, 2018, 2:09 p.m. OK Python 3 TESTS 36 124 16281600 2000
5032200 __ivan__ C Nov. 8, 2013, 8:46 p.m. OK Python 3 TESTS 36 140 9932800 2000
62326850 cho89163 C Oct. 10, 2019, 6:52 p.m. OK Python 3 TESTS 36 155 9216000 2000
5184370 Muller20 C Nov. 21, 2013, 11:27 a.m. OK Python 3 TESTS 36 156 9523200 2000
42135287 Mk_Python_v1 C Aug. 26, 2018, 10:57 p.m. OK Python 3 TESTS 36 171 9011200 2000
9210492 minimario C Dec. 20, 2014, 8:27 p.m. OK Python 3 TESTS 36 171 9216000 2000
44268049 omarnvidia C Oct. 13, 2018, 5:36 p.m. OK Python 3 TESTS 36 233 8908800 2000
4987337 Feu C Nov. 4, 2013, 3:56 p.m. OK Python 3 TESTS 36 327 33177600 2000
5241975 MuiNV54 C Nov. 26, 2013, 10:10 a.m. OK Ruby TESTS 36 202 6758400 2000
4969594 stas_sl C Nov. 2, 2013, 11:58 a.m. OK Ruby TESTS 36 343 18227200 2000

remove filters

Back to search problems