Codeforces Round 259 (Div. 1)

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
453 Codeforces Round 259 (Div. 1) FINISHED False 7200 330705004 Aug. 1, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4809 ) B Little Pony and Harmony Chest PROGRAMMING bitmasks brute force dp 2200

B"Princess Twilight went to Celestia and Luna's old castle to research the chest from the Elements of Harmony. A sequence of positive integers bi is harmony if and only if for every two elements of the sequence their greatest common divisor equals 1. According to an ancient book, the key of the chest is a harmony sequence bi which minimizes the following expression: You are given sequence ai, help Princess Twilight to find the key. The first line contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of elements of the sequences a and b. The next line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8930). Output the key -- sequence bi that minimizes the sum described above. If there are multiple optimal sequences, you can output any of them."...

Tutorials

Codeforces Round #259 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
7346487 dkmike B Aug. 4, 2014, 4:16 p.m. OK D TESTS 27 1622 216371200 2200
7315360 Gassa B Aug. 1, 2014, 4:28 p.m. OK D TESTS 27 1918 74444800 2200
7352410 hos.lyric B Aug. 5, 2014, 12:17 p.m. OK D TESTS 27 2339 56832000 2200
59648443 fluffyowl B Aug. 29, 2019, 7:04 a.m. OK D TESTS 27 2979 0 2200
10536331 AHTuTTuTyX B March 31, 2015, 7:12 p.m. OK Delphi TESTS 27 1169 159232000 2200
7700043 Vitaha B Sept. 7, 2014, 1:12 p.m. OK Delphi TESTS 27 1559 46489600 2200
7321474 Fedosik B Aug. 1, 2014, 6:57 p.m. OK FPC TESTS 27 811 169984000 2200
7311884 weizhaohui B Aug. 1, 2014, 3:54 p.m. OK FPC TESTS 27 1824 53555200 2200
9923719 Glaceon08 B Feb. 19, 2015, 9:10 a.m. OK FPC TESTS 27 1933 53043200 2200
7326270 vodanhna B Aug. 2, 2014, 8:18 a.m. OK FPC TESTS 27 2090 203059200 2200
7314462 vodanhna B Aug. 1, 2014, 4:17 p.m. OK FPC TESTS 27 2168 203059200 2200
7445851 CpasT B Aug. 14, 2014, 1:25 p.m. OK FPC TESTS 27 2791 212275200 2200
7326015 Hwhitetooth B Aug. 2, 2014, 7:49 a.m. OK FPC TESTS 27 3541 107212800 2200
7328663 MrJigan1488 B Aug. 2, 2014, 1:08 p.m. OK FPC TESTS 27 3837 117760000 2200
7348861 hjhee B Aug. 5, 2014, 2:40 a.m. OK GNU C TESTS 27 499 173363200 2200
7317204 luoruixuan B Aug. 1, 2014, 4:54 p.m. OK GNU C TESTS 27 1123 55193600 2200
7323176 shravas B Aug. 2, 2014, 12:35 a.m. OK GNU C TESTS 27 1747 240435200 2200
7322539 sgtlaugh B Aug. 1, 2014, 9:27 p.m. OK GNU C TESTS 27 2464 118169600 2200
8510295 vjudge4 B Nov. 1, 2014, 9:49 a.m. OK GNU C++ TESTS 27 31 204800 2200
8509419 vjudge1 B Nov. 1, 2014, 7:39 a.m. OK GNU C++ TESTS 27 31 204800 2200
7317610 vlady B Aug. 1, 2014, 5 p.m. OK GNU C++ TESTS 27 31 204800 2200
7314804 adurysk B Aug. 1, 2014, 4:21 p.m. OK GNU C++ TESTS 27 46 1740800 2200
7314855 mR.ilchi B Aug. 1, 2014, 4:21 p.m. OK GNU C++ TESTS 27 77 29388800 2200
7318022 Neroysq B Aug. 1, 2014, 5:06 p.m. OK GNU C++ TESTS 27 77 40448000 2200
7318573 hiepsieunhan B Aug. 1, 2014, 5:14 p.m. OK GNU C++ TESTS 27 78 22118400 2200
7319710 HUST_LAZ B Aug. 1, 2014, 5:27 p.m. OK GNU C++ TESTS 27 93 102400 2200
7316803 azizkhan B Aug. 1, 2014, 4:48 p.m. OK GNU C++ TESTS 27 108 0 2200
7315726 Divanshu B Aug. 1, 2014, 4:33 p.m. OK GNU C++ TESTS 27 109 3174400 2200
8324795 zhj B Oct. 20, 2014, 12:44 a.m. OK GNU C++0x TESTS 27 31 921600 2200
7318606 gustav B Aug. 1, 2014, 5:15 p.m. OK GNU C++0x TESTS 27 61 512000 2200
9572427 heyihong B Jan. 27, 2015, 1:41 p.m. OK GNU C++0x TESTS 27 77 10547200 2200
7333172 jokkebk B Aug. 2, 2014, 10:38 p.m. OK GNU C++0x TESTS 27 78 204800 2200
7321030 Bobgy B Aug. 1, 2014, 6:27 p.m. OK GNU C++0x TESTS 27 78 13516800 2200
7318067 gchebanov B Aug. 1, 2014, 5:07 p.m. OK GNU C++0x TESTS 27 93 102400 2200
7333149 jokkebk B Aug. 2, 2014, 10:27 p.m. OK GNU C++0x TESTS 27 93 204800 2200
7316371 rais.fathin38 B Aug. 1, 2014, 4:42 p.m. OK GNU C++0x TESTS 27 124 9420800 2200
7319882 ecnerwala B Aug. 1, 2014, 5:29 p.m. OK GNU C++0x TESTS 27 140 55193600 2200
7413294 jsannemo B Aug. 10, 2014, 11:37 a.m. OK GNU C++0x TESTS 27 155 6553600 2200
59872222 rainboy B Sept. 1, 2019, 8:03 p.m. OK GNU C11 TESTS 27 1107 53043200 2200
35135212 tfg B Feb. 10, 2018, 7:13 p.m. OK GNU C++11 TESTS 27 46 2867200 2200
37484680 vjudge2 B April 20, 2018, 11:22 a.m. OK GNU C++11 TESTS 27 62 13414400 2200
17261494 garbageguy B April 10, 2016, 8:10 a.m. OK GNU C++11 TESTS 27 62 13721600 2200
27000447 Cache B May 10, 2017, 5:07 p.m. OK GNU C++11 TESTS 27 93 20992000 2200
45335777 TrumPence B Nov. 5, 2018, 5:34 p.m. OK GNU C++11 TESTS 27 124 5632000 2200
62595340 Hongzy B Oct. 15, 2019, 1:15 a.m. OK GNU C++11 TESTS 27 124 9318400 2200
21461163 SYury B Oct. 15, 2016, 3:33 p.m. OK GNU C++11 TESTS 27 171 31334400 2200
55538665 dsfsioskjlasdewio B June 13, 2019, 6:06 p.m. OK GNU C++11 TESTS 27 187 55193600 2200
12782198 KhaledEltahan B Aug. 30, 2015, 10:08 p.m. OK GNU C++11 TESTS 27 202 53555200 2200
35219018 IHate24CharactersLimit B Feb. 13, 2018, 9:16 p.m. OK GNU C++11 TESTS 27 202 83251200 2200
27880054 Yousef_Salama B June 18, 2017, 8:26 a.m. OK GNU C++14 TESTS 27 156 8601600 2200
26186398 Planaria B April 7, 2017, 7:45 a.m. OK GNU C++14 TESTS 27 171 55398400 2200
22059438 crathva B Nov. 5, 2016, 3:29 p.m. OK GNU C++14 TESTS 27 187 53145600 2200
39739313 YogeshKurmi B June 28, 2018, 10:11 a.m. OK GNU C++14 TESTS 27 202 53555200 2200
29962239 pedroteosousa B Sept. 1, 2017, 12:50 a.m. OK GNU C++14 TESTS 27 218 0 2200
40583284 sqrtdecompton B July 20, 2018, 3:56 p.m. OK GNU C++14 TESTS 27 218 8908800 2200
46620196 gnaib2803 B Dec. 4, 2018, 5:25 p.m. OK GNU C++14 TESTS 27 218 112332800 2200
52347282 -1- B April 5, 2019, 1:11 p.m. OK GNU C++14 TESTS 27 233 54374400 2200
21514400 hdi B Oct. 17, 2016, 8:33 a.m. OK GNU C++14 TESTS 27 265 108032000 2200
52076432 -1- B March 31, 2019, 10:15 a.m. OK GNU C++14 TESTS 27 280 163328000 2200
68667883 AgonyXcalibur B Jan. 12, 2020, 3:46 p.m. OK GNU C++17 TESTS 27 31 204800 2200
37558183 Jubair_2147483647 B April 23, 2018, 7:22 p.m. OK GNU C++17 TESTS 27 46 13107200 2200
54511208 Juve45 B May 23, 2019, 7:13 a.m. OK GNU C++17 TESTS 27 140 14438400 2200
62401505 swunHJ B Oct. 12, 2019, 7:33 a.m. OK GNU C++17 TESTS 27 186 82739200 2200
52351372 -1- B April 5, 2019, 2:43 p.m. OK GNU C++17 TESTS 27 233 54374400 2200
52346008 -1- B April 5, 2019, 12:42 p.m. OK GNU C++17 TESTS 27 249 54272000 2200
52225898 yassin_ B April 2, 2019, 9:26 a.m. OK GNU C++17 TESTS 27 265 27340800 2200
52225838 yassin_ B April 2, 2019, 9:24 a.m. OK GNU C++17 TESTS 27 265 27340800 2200
38590650 takamoto B May 24, 2018, 3:19 p.m. OK GNU C++17 TESTS 27 280 204800 2200
52208891 -1- B April 1, 2019, 6:35 p.m. OK GNU C++17 TESTS 27 296 163328000 2200
7319090 tanakh B Aug. 1, 2014, 5:21 p.m. OK Haskell TESTS 27 3400 75776000 2200
7316384 ika B Aug. 1, 2014, 4:42 p.m. OK Java 6 TESTS 27 1294 50278400 2200
7322399 danbanica B Aug. 1, 2014, 8:59 p.m. OK Java 6 TESTS 27 1403 50995200 2200
7349821 haruki57 B Aug. 5, 2014, 6:52 a.m. OK Java 6 TESTS 27 2027 139264000 2200
8287919 xiaowuc1 B Oct. 17, 2014, 11:24 p.m. OK Java 6 TESTS 27 3993 135168000 2200
7319008 dai1741 B Aug. 1, 2014, 5:20 p.m. OK Java 7 TESTS 27 296 0 2200
7355158 haminhngoc B Aug. 5, 2014, 5:58 p.m. OK Java 7 TESTS 27 390 0 2200
7336988 uwi B Aug. 3, 2014, 9:46 a.m. OK Java 7 TESTS 27 764 50892800 2200
7321126 chinh7 B Aug. 1, 2014, 6:34 p.m. OK Java 7 TESTS 27 857 52224000 2200
17509049 yrjie B April 25, 2016, 12:53 p.m. OK Java 7 TESTS 27 919 100352000 2200
7318546 dusty.and.rusty B Aug. 1, 2014, 5:14 p.m. OK Java 7 TESTS 27 935 94720000 2200
7341243 kirasam B Aug. 4, 2014, 2:25 a.m. OK Java 7 TESTS 27 966 50892800 2200
7310858 Petr B Aug. 1, 2014, 3:47 p.m. OK Java 7 TESTS 27 982 51097600 2200
7347210 taratam B Aug. 4, 2014, 6:37 p.m. OK Java 7 TESTS 27 1419 135065600 2200
7319049 THE_QUEEN_IN_THE_NORTH B Aug. 1, 2014, 5:20 p.m. OK Java 7 TESTS 27 1434 139980800 2200
31881383 jwozniak B Oct. 30, 2017, 4:59 a.m. OK Java 8 TESTS 27 467 0 2200
7325321 hama-du B Aug. 2, 2014, 6:17 a.m. OK Java 8 TESTS 27 545 1740800 2200
49067185 wadissimo B Jan. 27, 2019, 6:21 p.m. OK Java 8 TESTS 27 577 67072000 2200
17516319 yrjie B April 26, 2016, 1:47 a.m. OK Java 8 TESTS 27 623 81612800 2200
17516487 yrjie B April 26, 2016, 2:23 a.m. OK Java 8 TESTS 27 639 81612800 2200
7318611 IgorKoval B Aug. 1, 2014, 5:15 p.m. OK Java 8 TESTS 27 826 921600 2200
17509172 yrjie B April 25, 2016, 1 p.m. OK Java 8 TESTS 27 966 81612800 2200
7362309 MinakoKojima B Aug. 6, 2014, 4:27 p.m. OK Java 8 TESTS 27 998 53248000 2200
34535486 tmwilliamlin168 B Jan. 25, 2018, 4:36 a.m. OK Java 8 TESTS 27 998 92057600 2200
7362396 MinakoKojima B Aug. 6, 2014, 4:40 p.m. OK Java 8 TESTS 27 1029 53145600 2200
46171500 peregrinus B Nov. 24, 2018, 1:05 p.m. OK Mono C# TESTS 27 2448 236339200 2200
46171160 peregrinus B Nov. 24, 2018, 12:55 p.m. OK Mono C# TESTS 27 3337 207564800 2200
7334894 gualex B Aug. 3, 2014, 6 a.m. OK MS C# TESTS 27 592 30003200 2200
7334905 gualex B Aug. 3, 2014, 6:02 a.m. OK MS C# TESTS 27 654 16179200 2200
7338817 gualex B Aug. 3, 2014, 2:28 p.m. OK MS C# TESTS 27 1091 16281600 2200
7334870 gualex B Aug. 3, 2014, 5:56 a.m. OK MS C# TESTS 27 1185 56422400 2200
22664673 og.kostya B Dec. 2, 2016, 7:21 p.m. OK MS C# TESTS 27 1450 109568000 2200
7315880 azukun B Aug. 1, 2014, 4:35 p.m. OK MS C# TESTS 27 2043 175923200 2200
7683183 scanhex B Sept. 4, 2014, 3:49 p.m. OK MS C# TESTS 27 2058 108646400 2200
18868769 Spi B July 3, 2016, 2:27 p.m. OK MS C# TESTS 27 3759 165273600 2200
7507851 mjy0503 B Aug. 19, 2014, 11:34 a.m. OK MS C++ TESTS 27 31 102400 2200
40988180 ReaLNero1 B July 30, 2018, 9:47 p.m. OK MS C++ TESTS 27 46 102400 2200
7345846 TonySnark B Aug. 4, 2014, 2:37 p.m. OK MS C++ TESTS 27 218 53043200 2200
7362751 pacu B Aug. 6, 2014, 5:51 p.m. OK MS C++ TESTS 27 280 53043200 2200
7350902 AleksanderBalobanov B Aug. 5, 2014, 9:05 a.m. OK MS C++ TESTS 27 311 120217600 2200
57501813 vjudge1 B July 22, 2019, 10:29 a.m. OK MS C++ TESTS 27 327 192409600 2200
57496831 vjudge2 B July 22, 2019, 8:48 a.m. OK MS C++ TESTS 27 343 192409600 2200
7315053 lemonsqueeze B Aug. 1, 2014, 4:23 p.m. OK MS C++ TESTS 27 358 61542400 2200
7328587 audin1000 B Aug. 2, 2014, 1:01 p.m. OK MS C++ TESTS 27 358 106086400 2200
7317020 chanme B Aug. 1, 2014, 4:52 p.m. OK MS C++ TESTS 27 436 94617600 2200
7324414 kurakun B Aug. 2, 2014, 3:45 a.m. OK Ocaml TESTS 27 2994 160256000 2200
7332882 kurakun B Aug. 2, 2014, 8:50 p.m. OK Ocaml TESTS 27 3026 160256000 2200
7332874 kurakun B Aug. 2, 2014, 8:48 p.m. OK Ocaml TESTS 27 3790 160256000 2200
7323932 kurakun B Aug. 2, 2014, 2:37 a.m. OK Ocaml TESTS 27 3899 160256000 2200
60246187 pajenegod B Sept. 8, 2019, 2:50 a.m. OK PyPy 2 TESTS 27 3931 106803200 2200

remove filters

Back to search problems