Educational Codeforces Round 129 (Rated for 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
1681 Educational Codeforces Round 129 (Rated for Div. 2) FINISHED False 7200 83949863 May 23, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20265 ) B Card Trick PROGRAMMING implementation math 800

B"Monocarp has just learned a new card trick, and can't wait to present it to you. He shows you the entire deck of n cards. You see that the values of cards from the topmost to the bottommost are integers a_1, a_2, ... , a_n , and all values are different. Then he asks you to shuffle the deck m times. With the j -th shuffle, you should take b_j topmost cards and move them under the remaining (n - b_j) cards without changing the order. And then, using some magic, Monocarp tells you the topmost card of the deck. However, you are not really buying that magic. You tell him that you know the topmost card yourself. Can you surprise Monocarp and tell him the topmost card before he shows it? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of cards in the deck. The second line contains n pairwise distinct integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ) -- the values of the cards. The third line contains a single integer m ( 1 <= m <= 2 cdot 10^5 ) -- the number of shuffles. The fourth line contains m integers b_1, b_2, ... , b_m ( 1 <= b_j <= n - 1 ) -- the amount of cards that are moved on the j -th shuffle. The sum of n over all testcases doesn't exceed 2 cdot 10^5 . The sum of m over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the value of the card on the top of the deck after the deck is shuffled m times. In the first testcase, each shuffle effectively swaps two cards. After three swaps, the deck will be [2, 1] . In the second testcase, the second shuffle cancels what the first shuffle did. First, three topmost cards went underneath the last card, then that card went back below the remaining three cards. So the deck remai"...

Tutorials

103163

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
158347953 nesco B May 25, 2022, 4 a.m. OK C# 10 TESTS 7 93 29593600 800
158405606 AFiFY B May 25, 2022, 3:55 p.m. OK C# 10 TESTS 7 108 33587200 800
158332788 extremall B May 24, 2022, 7:37 p.m. OK C# 8 TESTS 7 170 30617600 800
158284067 Imarion B May 24, 2022, 9:43 a.m. OK C# 8 TESTS 7 187 29593600 800
158315075 RFSS_ B May 24, 2022, 3:49 p.m. OK Clang++17 Diagnostics TESTS 7 1544 10547200 800
158384374 manoj_2022 B May 25, 2022, 11:46 a.m. OK Clang++17 Diagnostics TESTS 7 1668 1638400 800
158300074 jimjim17 B May 24, 2022, 1:04 p.m. OK GNU C11 TESTS 7 78 819200 800
158267734 eliot_ B May 24, 2022, 5:54 a.m. OK GNU C11 TESTS 7 78 819200 800
158280183 GsquareT B May 24, 2022, 8:51 a.m. OK GNU C11 TESTS 7 78 819200 800
158267310 SP2003 B May 24, 2022, 5:48 a.m. OK GNU C11 TESTS 7 78 1228800 800
158322040 AJINKYA11 B May 24, 2022, 5:07 p.m. OK GNU C11 TESTS 7 78 1638400 800
158315329 AJINKYA11 B May 24, 2022, 3:52 p.m. OK GNU C11 TESTS 7 78 2355200 800
158381171 i_love_6b62 B May 25, 2022, 11:06 a.m. OK GNU C11 TESTS 7 93 819200 800
158381281 i_love_6b62 B May 25, 2022, 11:08 a.m. OK GNU C11 TESTS 7 93 819200 800
158400508 udhavvarma03 B May 25, 2022, 3:01 p.m. OK GNU C11 TESTS 7 93 819200 800
158544156 crrrankyyy B May 26, 2022, 3:30 p.m. OK GNU C11 TESTS 7 93 1638400 800
158358664 kk19212 B May 25, 2022, 6:58 a.m. OK GNU C++14 TESTS 7 15 2662400 800
158381202 i_love_6b62 B May 25, 2022, 11:07 a.m. OK GNU C++14 TESTS 7 62 819200 800
158336431 albertbow B May 24, 2022, 9:01 p.m. OK GNU C++14 TESTS 7 78 819200 800
158341608 TimmyL B May 25, 2022, 12:33 a.m. OK GNU C++14 TESTS 7 93 819200 800
158379337 dengziyue B May 25, 2022, 10:42 a.m. OK GNU C++14 TESTS 7 93 819200 800
158381343 Modklc B May 25, 2022, 11:08 a.m. OK GNU C++14 TESTS 7 93 819200 800
158396460 cyrxdzj B May 25, 2022, 2:11 p.m. OK GNU C++14 TESTS 7 93 819200 800
158493464 classic B May 26, 2022, 5:44 a.m. OK GNU C++14 TESTS 7 93 819200 800
158378500 lingying B May 25, 2022, 10:31 a.m. OK GNU C++14 TESTS 7 93 819200 800
158355895 zltzlt B May 25, 2022, 6:22 a.m. OK GNU C++14 TESTS 7 93 819200 800
158339759 rajpaltanwale B May 24, 2022, 10:57 p.m. OK GNU C++17 TESTS 7 15 41676800 800
158282971 frostylight B May 24, 2022, 9:26 a.m. OK GNU C++17 TESTS 7 30 3686400 800
158277531 godhands B May 24, 2022, 8:16 a.m. OK GNU C++17 TESTS 7 30 3686400 800
158274694 fearlessgao B May 24, 2022, 7:37 a.m. OK GNU C++17 TESTS 7 46 819200 800
158381233 i_love_6b62 B May 25, 2022, 11:07 a.m. OK GNU C++17 TESTS 7 62 819200 800
158556827 hilfreich B May 26, 2022, 6:09 p.m. OK GNU C++17 TESTS 7 62 1536000 800
158362741 yassatamer99 B May 25, 2022, 7:56 a.m. OK GNU C++17 TESTS 7 93 819200 800
158574731 Lizel B May 27, 2022, 2:24 a.m. OK GNU C++17 TESTS 7 93 819200 800
158513237 Mahm2od B May 26, 2022, 9:58 a.m. OK GNU C++17 TESTS 7 93 819200 800
158499942 12313b B May 26, 2022, 7:06 a.m. OK GNU C++17 TESTS 7 93 819200 800
158536022 boxnos B May 26, 2022, 2:11 p.m. OK GNU C++17 (64) TESTS 7 15 1331200 800
158343470 CartesianTree B May 25, 2022, 1:51 a.m. OK GNU C++17 (64) TESTS 7 15 26931200 800
158498341 xiece666 B May 26, 2022, 6:46 a.m. OK GNU C++17 (64) TESTS 7 30 1843200 800
158290718 Newaz10 B May 24, 2022, 11:12 a.m. OK GNU C++17 (64) TESTS 7 46 819200 800
158298269 froggyzhang B May 24, 2022, 12:44 p.m. OK GNU C++17 (64) TESTS 7 46 819200 800
158335017 xanaxrehabclub B May 24, 2022, 8:25 p.m. OK GNU C++17 (64) TESTS 7 46 819200 800
158291356 _Yeager_ B May 24, 2022, 11:20 a.m. OK GNU C++17 (64) TESTS 7 61 819200 800
158351783 Owmicron B May 25, 2022, 5:19 a.m. OK GNU C++17 (64) TESTS 7 61 819200 800
158276055 lijiatu10086 B May 24, 2022, 7:56 a.m. OK GNU C++17 (64) TESTS 7 61 819200 800
158381506 Chirag_Ujjwal B May 25, 2022, 11:10 a.m. OK GNU C++17 (64) TESTS 7 61 1638400 800
158360212 luogu_bot4 B May 25, 2022, 7:20 a.m. OK GNU C++20 (64) TESTS 7 31 1638400 800
158280472 SeanMcgrath B May 24, 2022, 8:55 a.m. OK GNU C++20 (64) TESTS 7 31 5324800 800
158482070 adithegreat B May 26, 2022, 2:05 a.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158498609 Flavanoid B May 26, 2022, 6:49 a.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158413309 Abdullah_Faisal B May 25, 2022, 5:28 p.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158552038 raghad__ns B May 26, 2022, 5:08 p.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158570945 HossamHamza0_0 B May 26, 2022, 11:55 p.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158498720 Flavanoid B May 26, 2022, 6:51 a.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158463964 thenromanov B May 25, 2022, 7:32 p.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158473970 omar.alaraby B May 25, 2022, 9:29 p.m. OK GNU C++20 (64) TESTS 7 46 819200 800
158320723 Death_on_2_Legs B May 24, 2022, 4:52 p.m. OK Haskell TESTS 7 326 85094400 800
158314692 sf14t B May 24, 2022, 3:45 p.m. OK Java 11 TESTS 7 187 0 800
158296312 poopoop B May 24, 2022, 12:20 p.m. OK Java 11 TESTS 7 187 0 800
158276587 javaking B May 24, 2022, 8:03 a.m. OK Java 11 TESTS 7 187 0 800
158490749 dhruvil8804 B May 26, 2022, 5:02 a.m. OK Java 11 TESTS 7 217 0 800
158354078 nbhakar B May 25, 2022, 5:55 a.m. OK Java 11 TESTS 7 218 0 800
158583236 kartik__sethi B May 27, 2022, 5:51 a.m. OK Java 11 TESTS 7 233 0 800
158556958 KarMa_ B May 26, 2022, 6:11 p.m. OK Java 11 TESTS 7 233 0 800
158343317 mgueye B May 25, 2022, 1:46 a.m. OK Java 11 TESTS 7 233 0 800
158345180 krishnagskr983 B May 25, 2022, 2:41 a.m. OK Java 11 TESTS 7 248 0 800
158440879 SaberXpro B May 25, 2022, 6:17 p.m. OK Java 11 TESTS 7 249 0 800
158496798 wcjAccept B May 26, 2022, 6:27 a.m. OK Java 8 TESTS 7 109 0 800
158271635 slow.coder B May 24, 2022, 6:54 a.m. OK Java 8 TESTS 7 124 0 800
158337443 dev_14 B May 24, 2022, 9:30 p.m. OK Java 8 TESTS 7 140 2764800 800
158267545 CodingJatt B May 24, 2022, 5:51 a.m. OK Java 8 TESTS 7 155 2764800 800
158384825 anshulchou_123 B May 25, 2022, 11:52 a.m. OK Java 8 TESTS 7 155 2764800 800
158539206 akshay23codes B May 26, 2022, 2:42 p.m. OK Java 8 TESTS 7 155 3584000 800
158346994 Zicode B May 25, 2022, 3:33 a.m. OK Java 8 TESTS 7 155 3584000 800
158457341 param_2001 B May 25, 2022, 7:04 p.m. OK Java 8 TESTS 7 156 2764800 800
158401652 ved20 B May 25, 2022, 3:12 p.m. OK Java 8 TESTS 7 171 2764800 800
158403414 coderama B May 25, 2022, 3:32 p.m. OK Java 8 TESTS 7 171 2764800 800
158522541 Reasat-T.C B May 26, 2022, 11:46 a.m. OK JavaScript TESTS 7 233 35942400 800
158279098 ripity B May 24, 2022, 8:37 a.m. OK Kotlin 1.6 TESTS 7 296 10137600 800
158289531 WildTan B May 24, 2022, 10:58 a.m. OK Kotlin 1.6 TESTS 7 780 28774400 800
158287628 mohamedbakr B May 24, 2022, 10:33 a.m. OK Mono C# TESTS 7 171 37683200 800
158385482 bkifhr8 B May 25, 2022, noon OK MS C++ 2017 TESTS 7 108 3993600 800
158381317 bkifhr10 B May 25, 2022, 11:08 a.m. OK MS C++ 2017 TESTS 7 109 1638400 800
158387640 diajutcum B May 25, 2022, 12:26 p.m. OK MS C++ 2017 TESTS 7 124 819200 800
158285204 xsc B May 24, 2022, 9:59 a.m. OK MS C++ 2017 TESTS 7 265 819200 800
158312896 De_nis B May 24, 2022, 3:25 p.m. OK MS C++ 2017 TESTS 7 265 2048000 800
158388279 Still_Theory B May 25, 2022, 12:34 p.m. OK MS C++ 2017 TESTS 7 265 3174400 800
158536749 egorsev B May 26, 2022, 2:19 p.m. OK MS C++ 2017 TESTS 7 295 3174400 800
158401289 Vaibhav111 B May 25, 2022, 3:08 p.m. OK MS C++ 2017 TESTS 7 296 1638400 800
158346955 mnrmustafa B May 25, 2022, 3:32 a.m. OK MS C++ 2017 TESTS 7 296 3174400 800
158401598 Vaibhav111 B May 25, 2022, 3:11 p.m. OK MS C++ 2017 TESTS 7 311 1638400 800
158515831 zkoong B May 26, 2022, 10:32 a.m. OK Node.js TESTS 7 155 28262400 800
158576193 chinesedfan B May 27, 2022, 3:07 a.m. OK Node.js TESTS 7 155 28467200 800
158307669 Inspired B May 24, 2022, 2:28 p.m. OK Node.js TESTS 7 156 28467200 800
158287371 a_vantik_a B May 24, 2022, 10:30 a.m. OK Node.js TESTS 7 218 29900800 800
158287253 codinghermit05 B May 24, 2022, 10:29 a.m. OK Node.js TESTS 7 218 29900800 800
158287172 codinghermit05 B May 24, 2022, 10:28 a.m. OK Node.js TESTS 7 233 29900800 800
158286741 pawanrawat B May 24, 2022, 10:21 a.m. OK PHP TESTS 7 77 29388800 800
158529878 YMSeah B May 26, 2022, 1:06 p.m. OK PyPy 3 TESTS 7 155 19865600 800
158480166 jscn B May 26, 2022, 1:06 a.m. OK PyPy 3 TESTS 7 327 21094400 800
158292300 sagarpandey7742 B May 24, 2022, 11:31 a.m. OK PyPy 3 TESTS 7 343 16998400 800
158391437 ambs_ B May 25, 2022, 1:10 p.m. OK PyPy 3 TESTS 7 358 17715200 800
158268186 ON_THE_EDGE B May 24, 2022, 6:01 a.m. OK PyPy 3 TESTS 7 390 21094400 800
158487319 mkawa2 B May 26, 2022, 3:58 a.m. OK PyPy 3 TESTS 7 436 20992000 800
158355055 mmooyyii B May 25, 2022, 6:10 a.m. OK PyPy 3 TESTS 7 468 20480000 800
158294483 JUBHAI B May 24, 2022, 11:57 a.m. OK PyPy 3 TESTS 7 483 17305600 800
158352258 akashdanda B May 25, 2022, 5:27 a.m. OK PyPy 3 TESTS 7 514 17203200 800
158290817 manohar2509 B May 24, 2022, 11:14 a.m. OK PyPy 3 TESTS 7 561 17305600 800
158353099 Marco_Lau B May 25, 2022, 5:40 a.m. OK PyPy 3-64 TESTS 7 139 35840000 800
158276140 only_for_kav_tripathi B May 24, 2022, 7:57 a.m. OK PyPy 3-64 TESTS 7 140 30617600 800
158564147 nealzane B May 26, 2022, 8:10 p.m. OK PyPy 3-64 TESTS 7 140 30924800 800
158276880 tushar26427 B May 24, 2022, 8:07 a.m. OK PyPy 3-64 TESTS 7 140 32460800 800
158333216 tyzzi B May 24, 2022, 7:45 p.m. OK PyPy 3-64 TESTS 7 140 34304000 800
158271872 abhijeet.panihar.cse20 B May 24, 2022, 6:57 a.m. OK PyPy 3-64 TESTS 7 202 38809600 800
158331322 coder_sounak B May 24, 2022, 7:10 p.m. OK PyPy 3-64 TESTS 7 280 53043200 800
158278516 asdsasd B May 24, 2022, 8:29 a.m. OK PyPy 3-64 TESTS 7 296 32665600 800
158336445 Conjecture34 B May 24, 2022, 9:01 p.m. OK PyPy 3-64 TESTS 7 311 31641600 800
158287425 a_vantik_a B May 24, 2022, 10:31 a.m. OK PyPy 3-64 TESTS 7 311 31641600 800
158296396 codemakerself B May 24, 2022, 12:21 p.m. OK Python 3 TESTS 7 140 18022400 800
158298583 vaibhav_india B May 24, 2022, 12:47 p.m. OK Python 3 TESTS 7 171 19968000 800
158552675 siddartha321 B May 26, 2022, 5:16 p.m. OK Python 3 TESTS 7 202 15155200 800
158266332 R.Ayush777 B May 24, 2022, 5:32 a.m. OK Python 3 TESTS 7 202 15155200 800
158405373 Ivan2.0 B May 25, 2022, 3:53 p.m. OK Python 3 TESTS 7 202 17817600 800
158382167 aviratg.018 B May 25, 2022, 11:19 a.m. OK Python 3 TESTS 7 202 17817600 800
158326691 Dee_code B May 24, 2022, 6:04 p.m. OK Python 3 TESTS 7 202 17817600 800
158308367 vrajpatel001 B May 24, 2022, 2:35 p.m. OK Python 3 TESTS 7 202 17817600 800
158351139 ALIAS_G B May 25, 2022, 5:09 a.m. OK Python 3 TESTS 7 202 18329600 800
158482487 prestonmeek B May 26, 2022, 2:16 a.m. OK Python 3 TESTS 7 202 21196800 800
158460758 Death_on_2_Legs B May 25, 2022, 7:18 p.m. OK Rust 2021 TESTS 7 15 3993600 800
158508580 O0oo0Oo0OO0O0 B May 26, 2022, 8:59 a.m. OK Rust 2021 TESTS 7 15 7372800 800
158509014 O0oo0Oo0OO0O0 B May 26, 2022, 9:05 a.m. OK Rust 2021 TESTS 7 30 8499200 800
158348154 Spheniscine B May 25, 2022, 4:05 a.m. OK Rust 2021 TESTS 7 31 921600 800
158348102 Spheniscine B May 25, 2022, 4:04 a.m. OK Rust 2021 TESTS 7 31 921600 800
158353443 Russell_Emerine B May 25, 2022, 5:45 a.m. OK Rust 2021 TESTS 7 61 16691200 800
158360370 SlavaG B May 25, 2022, 7:22 a.m. OK Rust 2021 TESTS 7 77 7987200 800

remove filters

Back to search problems