Codeforces Round 478 (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
975 Codeforces Round 478 (Div. 2) FINISHED False 7200 212342124 May 1, 2018, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9856 ) C Valhalla Siege PROGRAMMING binary search 1400

B"Ivar the Boneless is a great leader. He is trying to capture Kattegat from Lagertha. The war has begun and wave after wave Ivar's warriors are falling in battle. Ivar has n warriors, he places them on a straight line in front of the main gate, in a way that the i -th warrior stands right after (i-1) -th warrior. The first warrior leads the attack. Each attacker can take up to a_i arrows before he falls to the ground, where a_i is the i -th warrior's strength. Lagertha orders her warriors to shoot k_i arrows during the i -th minute, the arrows one by one hit the first still standing warrior. After all Ivar's warriors fall and all the currently flying arrows fly by, Thor smashes his hammer and all Ivar's warriors get their previous strengths back and stand up to fight again. In other words, if all warriors die in minute t , they will all be standing to fight at the end of minute t . The battle will last for q minutes, after each minute you should tell Ivar what is the number of his standing warriors. The first line contains two integers n and q ( 1 <= n, q <= q 200 ,000 ) -- the number of warriors and the number of minutes in the battle. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^9 ) that represent the warriors' strengths. The third line contains q integers k_1, k_2, ldots, k_q ( 1 <= q k_i <= q 10^{14} ), the i -th of them represents Lagertha's order at the i -th minute: k_i arrows will attack the warriors. Output q lines, the i -th of them is the number of standing warriors after the i -th minute. In the first example: "...

Tutorials

Codeforces Round #478 (Div. 2), Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
43701787 vanda C Oct. 2, 2018, 7 p.m. OK Clang++17 Diagnostics TESTS 35 717 1536000 1400
38340274 admire.japan C May 17, 2018, 6:53 a.m. OK D TESTS 35 234 22425600 1400
38642310 rr_ C May 26, 2018, 7:33 p.m. OK D TESTS 35 234 31846400 1400
37811545 Glushen C May 1, 2018, 2:56 p.m. OK D TESTS 35 249 8601600 1400
37817711 ia7ck C May 1, 2018, 3:45 p.m. OK D TESTS 35 249 26521600 1400
37809075 arukuka C May 1, 2018, 2:42 p.m. OK D TESTS 35 264 26521600 1400
37811698 ruban C May 1, 2018, 2:57 p.m. OK Delphi TESTS 35 202 61644800 1400
37875038 rabbitcxk C May 4, 2018, 4:54 a.m. OK FPC TESTS 35 514 6246400 1400
39214854 Kemal.A C June 13, 2018, 11:36 a.m. OK FPC TESTS 35 529 3174400 1400
38907482 chaorenhaha C June 3, 2018, 2:46 a.m. OK FPC TESTS 35 530 4710400 1400
37813107 ayatsevich C May 1, 2018, 3:06 p.m. OK FPC TESTS 35 530 6246400 1400
38907494 chaorenhaha C June 3, 2018, 2:47 a.m. OK FPC TESTS 35 530 11059200 1400
38907472 chaorenhaha C June 3, 2018, 2:46 a.m. OK FPC TESTS 35 545 4710400 1400
37811766 AHTOH._. C May 1, 2018, 2:57 p.m. OK FPC TESTS 35 545 4710400 1400
37813643 ndhuy C May 1, 2018, 3:10 p.m. OK FPC TESTS 35 576 6246400 1400
47944006 ilya_kas C Jan. 4, 2019, 6:22 p.m. OK FPC TESTS 35 748 4812800 1400
52218552 Kyuu C April 2, 2019, 4:48 a.m. OK FPC TESTS 35 763 1638400 1400
37812739 _pepperoni C May 1, 2018, 3:04 p.m. OK GNU C TESTS 35 171 6451200 1400
38007277 mahabir10 C May 7, 2018, 9:29 p.m. OK GNU C TESTS 35 187 4915200 1400
37919938 MajAK C May 6, 2018, 5:52 a.m. OK GNU C TESTS 35 187 4915200 1400
37815171 MaitVanga__Sandwip C May 1, 2018, 3:22 p.m. OK GNU C TESTS 35 187 4915200 1400
37810557 freyes C May 1, 2018, 2:50 p.m. OK GNU C TESTS 35 187 5734400 1400
38988827 C1ariS C June 6, 2018, 8:51 a.m. OK GNU C TESTS 35 202 4812800 1400
37852401 sitara_lives C May 3, 2018, 3:07 a.m. OK GNU C TESTS 35 202 4915200 1400
37809722 rainboy C May 1, 2018, 2:45 p.m. OK GNU C TESTS 35 202 4915200 1400
37818545 DanielixS C May 1, 2018, 3:53 p.m. OK GNU C TESTS 35 202 5734400 1400
40932310 ReaLNero1 C July 30, 2018, 1:43 a.m. OK GNU C++ TESTS 35 77 3174400 1400
38150564 Scut82 C May 13, 2018, 1:53 a.m. OK GNU C++ TESTS 35 77 6758400 1400
39321036 luogu_bot5 C June 16, 2018, 11:35 p.m. OK GNU C++ TESTS 35 93 4812800 1400
37809035 65536 C May 1, 2018, 2:41 p.m. OK GNU C++ TESTS 35 93 18329600 1400
37818792 czqsdalao C May 1, 2018, 3:56 p.m. OK GNU C++ TESTS 35 108 6758400 1400
37985928 Kananix C May 7, 2018, 5:47 a.m. OK GNU C++ TESTS 35 108 8601600 1400
39236130 primy C June 14, 2018, 8:32 a.m. OK GNU C++ TESTS 35 109 1433600 1400
38345233 Michael_Li C May 17, 2018, 10:40 a.m. OK GNU C++ TESTS 35 109 4812800 1400
37834393 redbag C May 2, 2018, 8:34 a.m. OK GNU C++ TESTS 35 109 5120000 1400
38150544 Scut82 C May 13, 2018, 1:51 a.m. OK GNU C++ TESTS 35 109 5939200 1400
63102120 kaiboy C Oct. 22, 2019, 1:36 a.m. OK GNU C11 TESTS 35 780 1638400 1400
66609027 Rahimmia C Dec. 10, 2019, 8:09 p.m. OK GNU C11 TESTS 35 795 6451200 1400
37809287 A.Freeman C May 1, 2018, 2:43 p.m. OK GNU C11 TESTS 35 997 4915200 1400
37815077 york135 C May 1, 2018, 3:21 p.m. OK GNU C11 TESTS 35 1045 9728000 1400
38261178 falcon_9 C May 15, 2018, 8:24 a.m. OK GNU C11 TESTS 35 1060 5222400 1400
69147635 vrsashly C Jan. 19, 2020, 4:52 p.m. OK GNU C++11 TESTS 35 93 1638400 1400
38532609 New-ErA C May 22, 2018, 11:06 a.m. OK GNU C++11 TESTS 35 93 4812800 1400
37813511 HolyK C May 1, 2018, 3:09 p.m. OK GNU C++11 TESTS 35 93 8294400 1400
66084840 vjudge5 C Dec. 1, 2019, 3:43 a.m. OK GNU C++11 TESTS 35 93 24064000 1400
53891497 aprill C May 9, 2019, 12:46 a.m. OK GNU C++11 TESTS 35 93 32051200 1400
50055806 vjudge4 C Feb. 17, 2019, 10:15 a.m. OK GNU C++11 TESTS 35 93 32051200 1400
40746934 FlowerBlack C July 25, 2018, 3:14 p.m. OK GNU C++11 TESTS 35 108 1433600 1400
46781499 luogu_bot2 C Dec. 9, 2018, 2:54 a.m. OK GNU C++11 TESTS 35 108 1638400 1400
37812744 SleepZzz C May 1, 2018, 3:04 p.m. OK GNU C++11 TESTS 35 108 5120000 1400
37816424 1247 C May 1, 2018, 3:33 p.m. OK GNU C++11 TESTS 35 108 11571200 1400
37814057 lionadis C May 1, 2018, 3:13 p.m. OK GNU C++14 TESTS 35 108 6656000 1400
54382548 vishnu_m C May 19, 2019, 11:38 a.m. OK GNU C++14 TESTS 35 124 1638400 1400
46113217 iShibly C Nov. 23, 2018, 12:47 p.m. OK GNU C++14 TESTS 35 171 1638400 1400
63934403 Theofratus C Oct. 31, 2019, 3:22 p.m. OK GNU C++14 TESTS 35 171 2457600 1400
37857409 knowbody C May 3, 2018, 9:01 a.m. OK GNU C++14 TESTS 35 171 5017600 1400
52059811 RedNova C March 30, 2019, 11:03 p.m. OK GNU C++14 TESTS 35 186 1638400 1400
69459659 Yakudza C Jan. 24, 2020, 10:09 a.m. OK GNU C++14 TESTS 35 186 2457600 1400
58261449 amphilyon C Aug. 4, 2019, 12:27 p.m. OK GNU C++14 TESTS 35 186 3174400 1400
45222368 s1ddharth3 C Nov. 2, 2018, 10:38 p.m. OK GNU C++14 TESTS 35 186 4812800 1400
46050466 minson123 C Nov. 22, 2018, 6:58 a.m. OK GNU C++14 TESTS 35 186 5632000 1400
53959099 vjudge3 C May 10, 2019, 1:13 p.m. OK GNU C++17 TESTS 35 156 3174400 1400
50706775 vjudge2 C March 3, 2019, 4:39 a.m. OK GNU C++17 TESTS 35 171 1536000 1400
45906111 Jaihk662 C Nov. 18, 2018, 8:29 a.m. OK GNU C++17 TESTS 35 171 3174400 1400
53959064 i_lower C May 10, 2019, 1:12 p.m. OK GNU C++17 TESTS 35 171 3174400 1400
42484128 TheRedLegend C Sept. 5, 2018, 7:54 a.m. OK GNU C++17 TESTS 35 171 3993600 1400
50706769 ystudyu C March 3, 2019, 4:39 a.m. OK GNU C++17 TESTS 35 186 1536000 1400
48874513 wronganswer C Jan. 24, 2019, 7:33 a.m. OK GNU C++17 TESTS 35 186 2662400 1400
51034684 pustaczek C March 8, 2019, 2:37 p.m. OK GNU C++17 TESTS 35 186 3174400 1400
37813751 latvian C May 1, 2018, 3:11 p.m. OK GNU C++17 TESTS 35 186 6553600 1400
37808758 Rinne C May 1, 2018, 2:40 p.m. OK GNU C++17 TESTS 35 186 7065600 1400
37878778 aitorortiz C May 4, 2018, 9:10 a.m. OK Go TESTS 35 529 49356800 1400
45489241 icpc_loser C Nov. 9, 2018, 6:21 p.m. OK Java 8 TESTS 35 171 3481600 1400
60362343 elkadymohammed01 C Sept. 10, 2019, 6:53 p.m. OK Java 8 TESTS 35 187 0 1400
44370391 apurvaj C Oct. 15, 2018, 6:41 p.m. OK Java 8 TESTS 35 202 0 1400
64557322 chojh1222 C Nov. 9, 2019, 4:30 a.m. OK Java 8 TESTS 35 217 0 1400
37807066 Yugioh C May 1, 2018, 2:32 p.m. OK Java 8 TESTS 35 217 20787200 1400
37804425 uwi C May 1, 2018, 2:22 p.m. OK Java 8 TESTS 35 217 20787200 1400
46793034 Pratik_Rajani C Dec. 9, 2018, 8:53 a.m. OK Java 8 TESTS 35 218 0 1400
39655799 AQT C June 25, 2018, 5:02 p.m. OK Java 8 TESTS 35 218 0 1400
39039964 Tarun C June 8, 2018, 8:30 a.m. OK Java 8 TESTS 35 218 0 1400
37816639 ntviet18 C May 1, 2018, 3:35 p.m. OK Java 8 TESTS 35 218 20684800 1400
37858045 bingdu1996 C May 3, 2018, 9:33 a.m. OK JavaScript TESTS 35 1028 57344000 1400
37858665 bingdu1996 C May 3, 2018, 10:11 a.m. OK JavaScript TESTS 35 1107 56627200 1400
37894676 exs C May 5, 2018, 2:49 a.m. OK Kotlin TESTS 35 1528 31334400 1400
37880696 exs C May 4, 2018, 10:58 a.m. OK Kotlin TESTS 35 1809 31334400 1400
56006115 og.kostya C June 24, 2019, 3:37 p.m. OK Mono C# TESTS 35 139 4608000 1400
37808832 koyaaniqatsi C May 1, 2018, 2:40 p.m. OK Mono C# TESTS 35 280 56422400 1400
37808621 kuuso C May 1, 2018, 2:39 p.m. OK Mono C# TESTS 35 296 55705600 1400
51932675 nemars C March 28, 2019, 11:10 a.m. OK Mono C# TESTS 35 343 54272000 1400
37814392 gonchenko C May 1, 2018, 3:16 p.m. OK Mono C# TESTS 35 686 51916800 1400
37827114 YiZhang-Paul C May 1, 2018, 11:28 p.m. OK Mono C# TESTS 35 951 84070400 1400
37844187 Zaczero C May 2, 2018, 3:30 p.m. OK Mono C# TESTS 35 1060 58572800 1400
37813099 valekru C May 1, 2018, 3:06 p.m. OK Mono C# TESTS 35 1060 63897600 1400
38062688 Dmitriy73 C May 9, 2018, 6:28 a.m. OK Mono C# TESTS 35 1076 50278400 1400
37903603 antuan3000 C May 5, 2018, 10:57 a.m. OK Mono C# TESTS 35 1092 59289600 1400
65619849 vjudge3 C Nov. 24, 2019, 5:47 a.m. OK MS C++ TESTS 35 140 3993600 1400
65617006 vjudge5 C Nov. 24, 2019, 4:18 a.m. OK MS C++ TESTS 35 155 1638400 1400
50056162 vjudge5 C Feb. 17, 2019, 10:26 a.m. OK MS C++ TESTS 35 155 3174400 1400
50044832 vjudge3 C Feb. 17, 2019, 5:11 a.m. OK MS C++ TESTS 35 155 3379200 1400
63533210 vjudge5 C Oct. 27, 2019, 7:19 a.m. OK MS C++ TESTS 35 155 4812800 1400
50051495 vjudge2 C Feb. 17, 2019, 8:21 a.m. OK MS C++ TESTS 35 155 4812800 1400
65618859 vjudge3 C Nov. 24, 2019, 5:25 a.m. OK MS C++ TESTS 35 155 16076800 1400
50054500 vjudge5 C Feb. 17, 2019, 9:37 a.m. OK MS C++ TESTS 35 156 3174400 1400
65617764 vjudge4 C Nov. 24, 2019, 4:48 a.m. OK MS C++ TESTS 35 156 3993600 1400
50057374 vjudge5 C Feb. 17, 2019, 11:02 a.m. OK MS C++ TESTS 35 156 4812800 1400
68784443 youneselarjouni C Jan. 14, 2020, 2:50 p.m. OK MS C++ 2017 TESTS 35 264 1638400 1400
68848511 sphkemlane C Jan. 15, 2020, 8:10 a.m. OK MS C++ 2017 TESTS 35 265 1638400 1400
68780256 youneselarjouni C Jan. 14, 2020, 2:41 p.m. OK MS C++ 2017 TESTS 35 265 1638400 1400
68787909 vjudge3 C Jan. 14, 2020, 2:56 p.m. OK MS C++ 2017 TESTS 35 280 1638400 1400
68673390 vjudge4 C Jan. 12, 2020, 5:36 p.m. OK MS C++ 2017 TESTS 35 576 3174400 1400
68322887 onipp C Jan. 6, 2020, 3:39 p.m. OK MS C++ 2017 TESTS 35 576 7577600 1400
61431141 pansh1n C Sept. 28, 2019, 2:46 p.m. OK MS C++ 2017 TESTS 35 623 8601600 1400
65619882 vjudge1 C Nov. 24, 2019, 5:48 a.m. OK MS C++ 2017 TESTS 35 904 19456000 1400
68416990 vjudge4 C Jan. 8, 2020, 7:23 p.m. OK MS C++ 2017 TESTS 35 1185 1843200 1400
59239913 V4V C Aug. 21, 2019, 7:08 p.m. OK MS C++ 2017 TESTS 35 1216 3174400 1400
38014396 secondwtq C May 8, 2018, 7:39 a.m. OK Ocaml TESTS 35 374 16896000 1400
37803395 alexwice C May 1, 2018, 2:16 p.m. OK PyPy 2 TESTS 35 530 63897600 1400
38109652 Ehzyo C May 11, 2018, 9:09 a.m. OK PyPy 2 TESTS 35 546 68096000 1400
37811517 WyattWismer C May 1, 2018, 2:55 p.m. OK PyPy 2 TESTS 35 623 64819200 1400
37817387 wolffd C May 1, 2018, 3:42 p.m. OK PyPy 2 TESTS 35 951 72499200 1400
37912083 atharva456 C May 5, 2018, 5:27 p.m. OK PyPy 2 TESTS 35 1855 56012800 1400
37820871 tanmay28 C May 1, 2018, 4:59 p.m. OK PyPy 2 TESTS 35 1871 62976000 1400
41250030 Onesh0t C Aug. 5, 2018, 3:32 p.m. OK PyPy 2 TESTS 35 1934 35020800 1400
37805391 zacker-22 C May 1, 2018, 2:25 p.m. OK PyPy 2 TESTS 35 1981 53452800 1400
45392858 omarnvidia C Nov. 7, 2018, 12:02 a.m. OK PyPy 3 TESTS 35 872 53657600 1400
38089159 nowyyz C May 10, 2018, 10:51 a.m. OK PyPy 3 TESTS 35 919 65638400 1400
65249848 r57shell C Nov. 17, 2019, 11:42 a.m. OK PyPy 3 TESTS 35 935 38707200 1400
37806033 Teferi C May 1, 2018, 2:27 p.m. OK PyPy 3 TESTS 35 1044 81305600 1400
37881074 pavlekn C May 4, 2018, 11:17 a.m. OK PyPy 3 TESTS 35 1045 66457600 1400
59380313 xuzhengqi C Aug. 24, 2019, 2:29 a.m. OK PyPy 3 TESTS 35 1060 42086400 1400
63655923 kaif_7 C Oct. 28, 2019, 12:42 p.m. OK PyPy 3 TESTS 35 1076 41984000 1400
63301254 In_nI C Oct. 24, 2019, 2:21 p.m. OK PyPy 3 TESTS 35 1091 57548800 1400
37814552 sungun1996 C May 1, 2018, 3:17 p.m. OK PyPy 3 TESTS 35 1106 63692800 1400
38909899 homoeconomicus C June 3, 2018, 5:12 a.m. OK PyPy 3 TESTS 35 1106 79462400 1400
37824488 nealzane C May 1, 2018, 7:30 p.m. OK Python 2 TESTS 35 717 33484800 1400
37804914 packwolf C May 1, 2018, 2:23 p.m. OK Python 2 TESTS 35 779 25088000 1400
37845278 tnowakow C May 2, 2018, 4:24 p.m. OK Python 2 TESTS 35 998 25804800 1400
50514305 gaidash C Feb. 26, 2019, 5:07 a.m. OK Python 2 TESTS 35 1138 18944000 1400
37811598 frostn C May 1, 2018, 2:56 p.m. OK Python 2 TESTS 35 1637 29286400 1400
37865784 LanceTheDragonTrainer C May 3, 2018, 2:57 p.m. OK Python 2 TESTS 35 1809 25292800 1400
37865639 LanceTheDragonTrainer C May 3, 2018, 2:51 p.m. OK Python 2 TESTS 35 1824 25292800 1400
37812424 atryapa C May 1, 2018, 3:01 p.m. OK Python 3 TESTS 35 608 36761600 1400
38214971 zhangxun C May 14, 2018, 1:22 p.m. OK Python 3 TESTS 35 639 34099200 1400
37834677 Devil. C May 2, 2018, 8:49 a.m. OK Python 3 TESTS 35 685 37273600 1400
37834182 Devil. C May 2, 2018, 8:23 a.m. OK Python 3 TESTS 35 685 37785600 1400
37814167 Kelang C May 1, 2018, 3:14 p.m. OK Python 3 TESTS 35 717 33382400 1400
57808876 spellstaker C July 26, 2019, 4:20 p.m. OK Python 3 TESTS 35 826 26214400 1400
37817435 michael98liu C May 1, 2018, 3:42 p.m. OK Python 3 TESTS 35 904 37785600 1400
55819976 darkshadow07 C June 20, 2019, 8:06 a.m. OK Python 3 TESTS 35 982 23961600 1400
57138016 Annvv C July 16, 2019, 9:41 a.m. OK Python 3 TESTS 35 1028 21504000 1400
49312828 MightyLazyBones C Feb. 1, 2019, 8:52 a.m. OK Python 3 TESTS 35 1091 22016000 1400
37923500 kichi C May 6, 2018, 8:31 a.m. OK Rust TESTS 35 186 20992000 1400
37923976 Hillmouse C May 6, 2018, 8:48 a.m. OK Rust TESTS 35 217 21299200 1400
37813777 Leonardone C May 1, 2018, 3:11 p.m. OK Rust TESTS 35 1372 15974400 1400
37819685 nieru C May 1, 2018, 4:03 p.m. OK Scala TESTS 35 1933 65843200 1400

remove filters

Back to search problems