Codeforces Round 519 by Botan Investments

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
1043 Codeforces Round 519 by Botan Investments FINISHED False 7200 191082299 Oct. 28, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6293 ) B Lost Array PROGRAMMING implementation #919 1300

B"Bajtek, known for his unusual gifts, recently got an integer array x_0, x_1, ldots, x_{k-1} . Unfortunately, after a huge array-party with his extraordinary friends, he realized that he'd lost it. After hours spent on searching for a new toy, Bajtek found on the arrays producer's website another array a of length n + 1 . As a formal description of a says, a_0 = 0 and for all other i ( 1 <= i <= n ) a_i = x_{(i-1) bmod k} + a_{i-1} , where p bmod q denotes the remainder of division p by q . For example, if the x = [1, 2, 3] and n = 5 , then: So, if the x = [1, 2, 3] and n = 5 , then a = [0, 1, 3, 6, 7, 9] . Now the boy hopes that he will be able to restore x from a ! Knowing that 1 <= k <= n , help him and find all possible values of k -- possible lengths of the lost array. The first line contains exactly one integer n ( 1 <= n <= 1000 ) -- the length of the array a , excluding the element a_0 . The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^6 ). Note that a_0 is always 0 and is not given in the input. The first line of the output should contain one integer l denoting the number of correct lengths of the lost array. The second line of the output should contain l integers -- possible lengths of the lost array in increasing order. In the first example, any k is suitable, since a is an arithmetic progression. Possible arrays x : In the second example, Bajtek's array can have three or five elements. Possible arrays x : For example, k = 4 is bad, since it leads to 6 + x_0 = 8 and 0 + x_0 = 1 , which is an obvious contradiction. In the third example, only k = n is good. Array [1, 4, -2] satisfies the requirements. Note that x_i may be negative. "...

Tutorials

Codeforces Round #519 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
45072737 ACtrain B Oct. 29, 2018, 8:52 p.m. OK Clang++17 Diagnostics TESTS 71 46 6553600 1300
44999909 Gassa B Oct. 28, 2018, 3:46 p.m. OK D TESTS 71 31 4198400 1300
45002228 ruban B Oct. 28, 2018, 3:54 p.m. OK Delphi TESTS 71 46 109670400 1300
45050964 AHTOH._. B Oct. 29, 2018, 10:40 a.m. OK FPC TESTS 71 31 0 1300
45060369 cbl_nhathuy B Oct. 29, 2018, 2:31 p.m. OK FPC TESTS 71 31 0 1300
45470178 Khanh_Moriaty B Nov. 9, 2018, 9:05 a.m. OK FPC TESTS 71 31 0 1300
45061152 luogu_bot5 B Oct. 29, 2018, 2:54 p.m. OK FPC TESTS 71 31 0 1300
45010767 grifguitar B Oct. 28, 2018, 4:36 p.m. OK FPC TESTS 71 31 102400 1300
45010986 hua_xzx B Oct. 28, 2018, 4:38 p.m. OK FPC TESTS 71 46 0 1300
45008068 TShT B Oct. 28, 2018, 4:21 p.m. OK FPC TESTS 71 46 16076800 1300
69092501 mth1908 B Jan. 19, 2020, 10:43 a.m. OK GNU C11 TESTS 71 30 0 1300
51938379 NoSoul B March 28, 2019, 1:27 p.m. OK GNU C11 TESTS 71 31 0 1300
57812145 ash070397 B July 26, 2019, 5:52 p.m. OK GNU C11 TESTS 71 31 0 1300
55393925 1816020205 B June 10, 2019, 10:58 a.m. OK GNU C11 TESTS 71 31 0 1300
45155881 FiveHeroes B Nov. 1, 2018, 1:36 a.m. OK GNU C11 TESTS 71 31 0 1300
45391861 raj98 B Nov. 6, 2018, 10:20 p.m. OK GNU C11 TESTS 71 31 0 1300
45431447 tonychoper27 B Nov. 8, 2018, 4:03 a.m. OK GNU C11 TESTS 71 31 0 1300
46278645 vjudge2 B Nov. 27, 2018, 12:14 p.m. OK GNU C11 TESTS 71 31 0 1300
47792630 mdfaabrar257 B Dec. 31, 2018, 2:27 p.m. OK GNU C11 TESTS 71 31 0 1300
48931348 preet_02 B Jan. 25, 2019, 12:38 p.m. OK GNU C11 TESTS 71 31 0 1300
45000587 wucstdio B Oct. 28, 2018, 3:48 p.m. OK GNU C++11 TESTS 71 30 0 1300
45346477 YXH B Nov. 6, 2018, 3:39 a.m. OK GNU C++11 TESTS 71 30 0 1300
45191988 shiautsung B Nov. 2, 2018, 3:22 a.m. OK GNU C++11 TESTS 71 30 0 1300
59223186 programmisstt B Aug. 21, 2019, 12:56 p.m. OK GNU C++11 TESTS 71 31 0 1300
69840407 solver11 B Jan. 30, 2020, 1 p.m. OK GNU C++11 TESTS 71 31 0 1300
68727418 Rostux B Jan. 13, 2020, 6:26 p.m. OK GNU C++11 TESTS 71 31 0 1300
68214652 neerav1515 B Jan. 4, 2020, 9:49 p.m. OK GNU C++11 TESTS 71 31 0 1300
61320652 Mohammed_Almasry B Sept. 26, 2019, 12:28 p.m. OK GNU C++11 TESTS 71 31 0 1300
59601414 YLWang B Aug. 28, 2019, 6:15 a.m. OK GNU C++11 TESTS 71 31 0 1300
59601411 YLWang B Aug. 28, 2019, 6:15 a.m. OK GNU C++11 TESTS 71 31 0 1300
45270395 Ehanla0 B Nov. 4, 2018, 8:16 a.m. OK GNU C++14 TESTS 71 15 0 1300
45004221 lXTobiXl B Oct. 28, 2018, 4:02 p.m. OK GNU C++14 TESTS 71 15 0 1300
45874540 vjudge4 B Nov. 17, 2018, 11:24 a.m. OK GNU C++14 TESTS 71 15 0 1300
52532577 papabless B April 9, 2019, 2:04 p.m. OK GNU C++14 TESTS 71 30 0 1300
46944451 smitpatel1010 B Dec. 12, 2018, 6:51 p.m. OK GNU C++14 TESTS 71 30 0 1300
46829076 Spiritum B Dec. 9, 2018, 8:32 p.m. OK GNU C++14 TESTS 71 30 0 1300
45686351 gustavoleal B Nov. 13, 2018, 6:32 p.m. OK GNU C++14 TESTS 71 30 0 1300
45486527 czochinio B Nov. 9, 2018, 5:21 p.m. OK GNU C++14 TESTS 71 30 0 1300
69232708 tytanium B Jan. 21, 2020, 10:07 a.m. OK GNU C++14 TESTS 71 30 0 1300
66442014 zafkiel B Dec. 7, 2019, 8:15 a.m. OK GNU C++14 TESTS 71 30 0 1300
45411669 vjudge2 B Nov. 7, 2018, 12:21 p.m. OK GNU C++17 TESTS 71 15 307200 1300
45051202 sayangdipto123 B Oct. 29, 2018, 10:46 a.m. OK GNU C++17 TESTS 71 15 307200 1300
44999137 kimden B Oct. 28, 2018, 3:44 p.m. OK GNU C++17 TESTS 71 15 307200 1300
49831191 rutul204 B Feb. 12, 2019, 2 p.m. OK GNU C++17 TESTS 71 30 0 1300
51852549 sohel_sec B March 26, 2019, 8:53 a.m. OK GNU C++17 TESTS 71 30 0 1300
46465045 King B Dec. 2, 2018, 1:50 a.m. OK GNU C++17 TESTS 71 30 204800 1300
45036757 .MARAJUL. B Oct. 29, 2018, 8:09 a.m. OK GNU C++17 TESTS 71 30 204800 1300
46826760 code_kika B Dec. 9, 2018, 6:58 p.m. OK GNU C++17 TESTS 71 30 204800 1300
45653806 ruterute1 B Nov. 13, 2018, 4:32 a.m. OK GNU C++17 TESTS 71 30 307200 1300
47972603 Galaxy_Nova B Jan. 5, 2019, 3:45 p.m. OK GNU C++17 TESTS 71 30 307200 1300
45003453 megaspazz B Oct. 28, 2018, 3:59 p.m. OK Go TESTS 71 31 0 1300
45191277 itytwt B Nov. 2, 2018, 2:30 a.m. OK Go TESTS 71 46 0 1300
45004284 life_is_not_bed_of_roses B Oct. 28, 2018, 4:02 p.m. OK Go TESTS 71 46 0 1300
45013154 StructDeStruct B Oct. 28, 2018, 4:52 p.m. OK Go TESTS 71 62 0 1300
45000295 Martynas B Oct. 28, 2018, 3:47 p.m. OK Go TESTS 71 62 0 1300
45006173 peter_jerry_ye B Oct. 28, 2018, 4:11 p.m. OK Haskell TESTS 71 62 12800000 1300
45015111 jedikni B Oct. 28, 2018, 5:05 p.m. OK Haskell TESTS 71 530 8499200 1300
46992485 donli B Dec. 14, 2018, 5:51 a.m. OK Java 8 TESTS 71 109 0 1300
55373332 YousseF_Diaa B June 9, 2019, 4:45 p.m. OK Java 8 TESTS 71 109 0 1300
48390886 xodiac B Jan. 14, 2019, 3:16 p.m. OK Java 8 TESTS 71 109 0 1300
47443382 Tarun B Dec. 24, 2018, 4:10 a.m. OK Java 8 TESTS 71 109 0 1300
46047060 happybelly B Nov. 22, 2018, 3:28 a.m. OK Java 8 TESTS 71 109 0 1300
45410046 Psp_98 B Nov. 7, 2018, 11:40 a.m. OK Java 8 TESTS 71 109 0 1300
45285387 tusharjape007 B Nov. 4, 2018, 4:18 p.m. OK Java 8 TESTS 71 109 0 1300
45142203 NMouad21 B Oct. 31, 2018, 3:04 p.m. OK Java 8 TESTS 71 109 0 1300
45098318 Jarik B Oct. 30, 2018, 12:46 p.m. OK Java 8 TESTS 71 109 0 1300
45064691 wflms20110333 B Oct. 29, 2018, 4:29 p.m. OK Java 8 TESTS 71 109 0 1300
45012680 dimoff66 B Oct. 28, 2018, 4:49 p.m. OK JavaScript TESTS 71 46 1331200 1300
45220110 Livace B Nov. 2, 2018, 8:24 p.m. OK JavaScript TESTS 71 77 2252800 1300
45013791 Ahmadjon B Oct. 28, 2018, 4:56 p.m. OK Kotlin TESTS 71 155 102400 1300
45115296 SlavaG B Oct. 30, 2018, 8:58 p.m. OK Kotlin TESTS 71 202 307200 1300
45115377 SlavaG B Oct. 30, 2018, 9:01 p.m. OK Kotlin TESTS 71 202 409600 1300
45007842 LESS_FILLING B Oct. 28, 2018, 4:20 p.m. OK Mono C# TESTS 71 61 102400 1300
55673931 og.kostya B June 17, 2019, 9:20 a.m. OK Mono C# TESTS 71 61 102400 1300
45004239 Coder_D B Oct. 28, 2018, 4:02 p.m. OK Mono C# TESTS 71 61 102400 1300
45006853 clolin B Oct. 28, 2018, 4:14 p.m. OK Mono C# TESTS 71 61 3072000 1300
45004066 Zvigintsev B Oct. 28, 2018, 4:01 p.m. OK Mono C# TESTS 71 62 0 1300
69222413 mban259 B Jan. 21, 2020, 5:28 a.m. OK Mono C# TESTS 71 62 0 1300
45117249 Alex_Simonyan B Oct. 30, 2018, 10:49 p.m. OK Mono C# TESTS 71 62 102400 1300
45230978 nastya1199 B Nov. 3, 2018, 7 a.m. OK Mono C# TESTS 71 62 102400 1300
45108590 T-D-K B Oct. 30, 2018, 5:20 p.m. OK Mono C# TESTS 71 62 102400 1300
45029298 eki B Oct. 29, 2018, 2 a.m. OK Mono C# TESTS 71 62 102400 1300
46142325 vjudge5 B Nov. 24, 2018, 7:12 a.m. OK MS C++ TESTS 71 31 0 1300
46200254 vjudge3 B Nov. 25, 2018, 10:55 a.m. OK MS C++ TESTS 71 31 0 1300
46144895 vjudge4 B Nov. 24, 2018, 7:32 a.m. OK MS C++ TESTS 71 31 0 1300
46203771 vjudge3 B Nov. 25, 2018, 1:03 p.m. OK MS C++ TESTS 71 31 0 1300
50645056 vjudge5 B March 1, 2019, 3:26 p.m. OK MS C++ TESTS 71 31 0 1300
51779226 vjudge5 B March 24, 2019, 2:48 a.m. OK MS C++ TESTS 71 31 0 1300
51787107 vjudge3 B March 24, 2019, 11:09 a.m. OK MS C++ TESTS 71 31 0 1300
46139462 vjudge4 B Nov. 24, 2018, 6:44 a.m. OK MS C++ TESTS 71 31 0 1300
64203879 vjudge1 B Nov. 4, 2019, 12:16 p.m. OK MS C++ TESTS 71 31 0 1300
46139508 vjudge4 B Nov. 24, 2018, 6:45 a.m. OK MS C++ TESTS 71 31 0 1300
50505407 dslom B Feb. 25, 2019, 7:24 p.m. OK MS C++ 2017 TESTS 71 31 0 1300
45100030 Phloyd B Oct. 30, 2018, 1:28 p.m. OK PascalABC.NET TESTS 71 46 2252800 1300
45004431 bsgnl952 B Oct. 28, 2018, 4:03 p.m. OK PascalABC.NET TESTS 71 62 1433600 1300
45072851 Arcadii B Oct. 29, 2018, 8:56 p.m. OK PascalABC.NET TESTS 71 78 307200 1300
45013916 rsFalse B Oct. 28, 2018, 4:57 p.m. OK Perl TESTS 71 124 307200 1300
45027649 mayakin B Oct. 28, 2018, 11:50 p.m. OK PHP TESTS 71 171 409600 1300
44999146 exoji2e B Oct. 28, 2018, 3:44 p.m. OK PyPy 2 TESTS 71 124 307200 1300
45007903 LaiMeiyun B Oct. 28, 2018, 4:20 p.m. OK PyPy 2 TESTS 71 139 409600 1300
45004852 c1729 B Oct. 28, 2018, 4:05 p.m. OK PyPy 2 TESTS 71 140 204800 1300
45004819 NicotineAddict B Oct. 28, 2018, 4:05 p.m. OK PyPy 2 TESTS 71 140 204800 1300
45000064 astrom.lars B Oct. 28, 2018, 3:46 p.m. OK PyPy 2 TESTS 71 140 307200 1300
45003892 rkstalker B Oct. 28, 2018, 4:01 p.m. OK PyPy 2 TESTS 71 140 307200 1300
44999904 pajenegod B Oct. 28, 2018, 3:46 p.m. OK PyPy 2 TESTS 71 140 307200 1300
45010888 potpath B Oct. 28, 2018, 4:37 p.m. OK PyPy 2 TESTS 71 140 409600 1300
45013755 _kawaii_neko_ B Oct. 28, 2018, 4:56 p.m. OK PyPy 2 TESTS 71 140 512000 1300
45002428 sarthakmanna B Oct. 28, 2018, 3:55 p.m. OK PyPy 2 TESTS 71 140 819200 1300
45084278 soto_nlp B Oct. 30, 2018, 6:09 a.m. OK PyPy 3 TESTS 71 139 102400 1300
45425848 Abdulrahman_Nasser B Nov. 7, 2018, 8:45 p.m. OK PyPy 3 TESTS 71 140 102400 1300
45001874 araragitsukihi B Oct. 28, 2018, 3:53 p.m. OK PyPy 3 TESTS 71 140 102400 1300
45185376 sasasagagaga B Nov. 1, 2018, 7:39 p.m. OK PyPy 3 TESTS 71 140 204800 1300
48608479 toysheeyeyraku B Jan. 20, 2019, 12:09 p.m. OK PyPy 3 TESTS 71 140 204800 1300
46237004 bandi.enkh B Nov. 26, 2018, 4:09 a.m. OK PyPy 3 TESTS 71 140 204800 1300
45009568 notbot B Oct. 28, 2018, 4:29 p.m. OK PyPy 3 TESTS 71 140 204800 1300
45009303 Patwari26 B Oct. 28, 2018, 4:28 p.m. OK PyPy 3 TESTS 71 140 204800 1300
45002994 sound_of_silence B Oct. 28, 2018, 3:57 p.m. OK PyPy 3 TESTS 71 140 204800 1300
45006164 I.Gleb B Oct. 28, 2018, 4:11 p.m. OK PyPy 3 TESTS 71 140 307200 1300
44999714 nwi B Oct. 28, 2018, 3:46 p.m. OK Python 2 TESTS 71 186 0 1300
45003882 yvzdrmzksr B Oct. 28, 2018, 4:01 p.m. OK Python 2 TESTS 71 186 307200 1300
45022715 wangkan2001 B Oct. 28, 2018, 7:47 p.m. OK Python 2 TESTS 71 187 409600 1300
45006568 fatpuffer B Oct. 28, 2018, 4:13 p.m. OK Python 2 TESTS 71 187 409600 1300
45651088 vjudge5 B Nov. 13, 2018, 1:26 a.m. OK Python 2 TESTS 71 202 204800 1300
45006599 realcharliesultan B Oct. 28, 2018, 4:13 p.m. OK Python 2 TESTS 71 234 204800 1300
45004988 jasonliang B Oct. 28, 2018, 4:05 p.m. OK Python 2 TESTS 71 249 204800 1300
45008740 1252187392 B Oct. 28, 2018, 4:24 p.m. OK Python 2 TESTS 71 280 204800 1300
45007085 abhishekm71 B Oct. 28, 2018, 4:16 p.m. OK Python 2 TESTS 71 311 204800 1300
45083033 thuglife69 B Oct. 30, 2018, 5:03 a.m. OK Python 2 TESTS 71 311 2150400 1300
45035704 Ya.Rim_4 B Oct. 29, 2018, 7:34 a.m. OK Python 3 TESTS 71 109 204800 1300
45107475 Vanster B Oct. 30, 2018, 4:52 p.m. OK Python 3 TESTS 71 109 307200 1300
68225325 nealzane B Jan. 5, 2020, 6:53 a.m. OK Python 3 TESTS 71 109 307200 1300
45425856 Abdulrahman_Nasser B Nov. 7, 2018, 8:46 p.m. OK Python 3 TESTS 71 109 307200 1300
45127562 HaoYi B Oct. 31, 2018, 8:47 a.m. OK Python 3 TESTS 71 109 2150400 1300
46027201 Sodaine B Nov. 21, 2018, 11:55 a.m. OK Python 3 TESTS 71 124 204800 1300
45477678 llbra8z B Nov. 9, 2018, 1:14 p.m. OK Python 3 TESTS 71 124 204800 1300
45124147 eugalt B Oct. 31, 2018, 7 a.m. OK Python 3 TESTS 71 124 204800 1300
45022958 eugalt B Oct. 28, 2018, 7:53 p.m. OK Python 3 TESTS 71 124 204800 1300
45006152 bergus B Oct. 28, 2018, 4:11 p.m. OK Python 3 TESTS 71 124 204800 1300
45003938 AnandVeeramani B Oct. 28, 2018, 4:01 p.m. OK Ruby TESTS 71 155 3481600 1300
45083383 Dx18 B Oct. 30, 2018, 5:23 a.m. OK Rust TESTS 71 31 0 1300
45009265 xaep B Oct. 28, 2018, 4:28 p.m. OK Rust TESTS 71 31 0 1300
45109406 flygrounder B Oct. 30, 2018, 5:43 p.m. OK Rust TESTS 71 46 102400 1300
45018123 yakamoto B Oct. 28, 2018, 5:27 p.m. OK Scala TESTS 71 483 0 1300
45006511 wrick B Oct. 28, 2018, 4:13 p.m. OK Scala TESTS 71 592 0 1300
45005088 amirrr B Oct. 28, 2018, 4:06 p.m. OK Scala TESTS 71 670 0 1300

remove filters

Back to search problems