Codeforces Round 927 (Div. 3)

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
1932 Codeforces Round 927 (Div. 3) FINISHED False 8100 23565299 Feb. 18, 2024, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15892 ) C LR-remainders PROGRAMMING brute force data structures implementation math

B"You are given an array a of length n , a positive integer m , and a string of commands of length n . Each command is either the character 'L' or the character 'R'. Process all n commands in the order they are written in the string s . Processing a command is done as follows: Note that after each move, the length of the array a decreases by 1 , and after processing all commands, it will be empty. Write a program that will process all commands in the order they are written in the string s (from left to right). The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the input. Then descriptions of t test cases follow. Each test case of the input is given by three lines. The first line contains two integers n and m ( 1 <= n <= 2 cdot10^5, 1 <= m <= 10^4 ) -- the initial length of the array a and the value to take the remainder by. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^4 ) -- the elements of the array a . The third line contains a string s consisting of n characters 'L' and 'R'. It is guaranteed that the sum of the values of n for all test cases in a test does not exceed 2 cdot10^5 . For each test case, output n integers b_1, b_2, ... , b_n , where b_i is the remainder when dividing the product of all elements of the current state of the array a by m at the beginning of the execution of the i -th command. In the first test case of the example: "...

Tutorials

126196

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
247205617 mban259 C Feb. 19, 2024, 12:49 p.m. OK C# 10 TESTS 16 186 37273600
247149705 bluemegane C Feb. 18, 2024, 10:49 p.m. OK C# 8 TESTS 16 156 28876800
247188721 emo. C Feb. 19, 2024, 10:23 a.m. OK Clang++17 Diagnostics TESTS 16 1965 29593600
247187864 emo. C Feb. 19, 2024, 10:16 a.m. OK Clang++20 Diagnostics TESTS 16 1435 27340800
247187512 emo. C Feb. 19, 2024, 10:14 a.m. OK Clang++20 Diagnostics TESTS 16 1466 27340800
247186091 emo. C Feb. 19, 2024, 10:02 a.m. OK Clang++20 Diagnostics TESTS 16 1575 27340800
247211849 Schoolbag C Feb. 19, 2024, 1:32 p.m. OK Clang++20 Diagnostics TESTS 16 1653 20480000
247147214 Bazinga_2004 C Feb. 18, 2024, 9:52 p.m. OK Clang++20 Diagnostics TESTS 16 1669 20480000
247185735 emo. C Feb. 19, 2024, 9:59 a.m. OK Clang++20 Diagnostics TESTS 16 1684 30617600
247203078 YASH_JAISWAL C Feb. 19, 2024, 12:29 p.m. OK Clang++20 Diagnostics TESTS 16 1762 26828800
247184086 emo. C Feb. 19, 2024, 9:44 a.m. OK Clang++20 Diagnostics TESTS 16 1855 31232000
247188251 emo. C Feb. 19, 2024, 10:19 a.m. OK Clang++20 Diagnostics TESTS 16 1996 29593600
247398725 iffatul_anon C Feb. 19, 2024, 9:14 p.m. OK GNU C11 TESTS 16 888 5222400
247400893 Saurabh74 C Feb. 19, 2024, 9:45 p.m. OK GNU C11 TESTS 16 889 2048000
247400917 bitcoder_74 C Feb. 19, 2024, 9:45 p.m. OK GNU C11 TESTS 16 889 2048000
247177105 TuNguyen2005 C Feb. 19, 2024, 8:50 a.m. OK GNU C11 TESTS 16 904 2048000
247184072 huymd C Feb. 19, 2024, 9:44 a.m. OK GNU C11 TESTS 16 904 2867200
247145135 ashab.tanim C Feb. 18, 2024, 9:17 p.m. OK GNU C11 TESTS 16 936 3686400
247354349 Abhishek_Kumar_Maurya C Feb. 19, 2024, 4:32 p.m. OK GNU C++17 TESTS 16 77 3276800
247157014 yasmin13 C Feb. 19, 2024, 5 a.m. OK GNU C++17 TESTS 16 77 4300800
247188548 rahulk736694 C Feb. 19, 2024, 10:22 a.m. OK GNU C++17 TESTS 16 77 4300800
247175404 mishra_108 C Feb. 19, 2024, 8:36 a.m. OK GNU C++17 TESTS 16 77 4300800
247399844 mislead C Feb. 19, 2024, 9:30 p.m. OK GNU C++17 TESTS 16 77 4608000
247190814 ljjkr C Feb. 19, 2024, 10:43 a.m. OK GNU C++17 TESTS 16 77 5427200
247197530 suki._.dayo C Feb. 19, 2024, 11:43 a.m. OK GNU C++17 TESTS 16 77 5836800
247249265 tnakao C Feb. 19, 2024, 2:46 p.m. OK GNU C++17 TESTS 16 78 1740800
247354571 Novi1024 C Feb. 19, 2024, 4:33 p.m. OK GNU C++17 TESTS 16 78 1740800
247199680 OLENCER C Feb. 19, 2024, 12:01 p.m. OK GNU C++17 TESTS 16 78 1843200
247409633 hnakedpcoding C Feb. 20, 2024, 12:59 a.m. OK GNU C++17 (64) TESTS 16 46 2252800
247126952 Ldawn_AI C Feb. 18, 2024, 5:54 p.m. OK GNU C++17 (64) TESTS 16 61 2252800
247371899 beko4real C Feb. 19, 2024, 5:17 p.m. OK GNU C++17 (64) TESTS 16 61 3276800
247154820 xu_512 C Feb. 19, 2024, 4:36 a.m. OK GNU C++17 (64) TESTS 16 61 3788800
247204535 Oka_Asahi C Feb. 19, 2024, 12:41 p.m. OK GNU C++17 (64) TESTS 16 61 3788800
247129246 shiva51 C Feb. 18, 2024, 6:13 p.m. OK GNU C++17 (64) TESTS 16 61 3788800
247334914 ASLEH C Feb. 19, 2024, 4:04 p.m. OK GNU C++17 (64) TESTS 16 61 4300800
247195479 CoffeeFish C Feb. 19, 2024, 11:26 a.m. OK GNU C++17 (64) TESTS 16 62 1433600
247154478 AKStream C Feb. 19, 2024, 4:31 a.m. OK GNU C++17 (64) TESTS 16 62 1433600
247196383 ShengQiBaoZao C Feb. 19, 2024, 11:33 a.m. OK GNU C++17 (64) TESTS 16 62 1740800
247213544 tlsgusrb314 C Feb. 19, 2024, 1:45 p.m. OK GNU C++20 (64) TESTS 16 31 9932800
247219111 yasunny C Feb. 19, 2024, 2:26 p.m. OK GNU C++20 (64) TESTS 16 46 1536000
247208994 IV_ACKERMAN C Feb. 19, 2024, 1:13 p.m. OK GNU C++20 (64) TESTS 16 46 1638400
247199988 bansheewaltz C Feb. 19, 2024, 12:03 p.m. OK GNU C++20 (64) TESTS 16 46 2355200
247200025 bansheewaltz C Feb. 19, 2024, 12:04 p.m. OK GNU C++20 (64) TESTS 16 46 2355200
247201024 LEFt_bank C Feb. 19, 2024, 12:12 p.m. OK GNU C++20 (64) TESTS 16 46 2355200
247205778 lscll C Feb. 19, 2024, 12:50 p.m. OK GNU C++20 (64) TESTS 16 46 2355200
247404866 mralves C Feb. 19, 2024, 11:08 p.m. OK GNU C++20 (64) TESTS 16 46 2355200
247411028 lingyaoluo C Feb. 20, 2024, 1:25 a.m. OK GNU C++20 (64) TESTS 16 46 2355200
247430410 abc864197532 C Feb. 20, 2024, 5:51 a.m. OK GNU C++20 (64) TESTS 16 46 2355200
247159512 123_wby C Feb. 19, 2024, 5:25 a.m. OK Go TESTS 16 124 11980800
247419695 net12k44 C Feb. 20, 2024, 3:35 a.m. OK Java 21 TESTS 16 327 102400
247156525 DOOMJUICE C Feb. 19, 2024, 4:55 a.m. OK Java 21 TESTS 16 342 307200
247151692 priyaroy3370 C Feb. 19, 2024, 3:53 a.m. OK Java 21 TESTS 16 342 11468800
247185838 Nekronishe C Feb. 19, 2024, 10 a.m. OK Java 21 TESTS 16 343 102400
247177779 Dhruv_savani C Feb. 19, 2024, 8:56 a.m. OK Java 21 TESTS 16 358 102400
247127739 Nick C Feb. 18, 2024, 6:01 p.m. OK Java 21 TESTS 16 358 204800
247125143 FunkyDepression C Feb. 18, 2024, 5:38 p.m. OK Java 21 TESTS 16 373 204800
247193728 swatishivam23 C Feb. 19, 2024, 11:09 a.m. OK Java 21 TESTS 16 389 10956800
247171937 priyaroy3370 C Feb. 19, 2024, 8:09 a.m. OK Java 21 TESTS 16 389 10956800
247176763 santuan C Feb. 19, 2024, 8:47 a.m. OK Java 21 TESTS 16 390 4403200
247149605 Darko C Feb. 18, 2024, 10:46 p.m. OK Java 8 TESTS 16 140 0
247132207 etian6795 C Feb. 18, 2024, 6:41 p.m. OK Java 8 TESTS 16 249 4710400
247428362 kanthala.hari.198 C Feb. 20, 2024, 5:28 a.m. OK Java 8 TESTS 16 405 0
247150869 Sumitsingh7 C Feb. 19, 2024, 3:42 a.m. OK Java 8 TESTS 16 780 17510400
247150757 tinku_vishnu C Feb. 19, 2024, 3:41 a.m. OK Java 8 TESTS 16 811 3174400
247136209 jayantKS29 C Feb. 18, 2024, 7:22 p.m. OK Java 8 TESTS 16 858 0
247421123 PlayDate C Feb. 20, 2024, 3:54 a.m. OK Java 8 TESTS 16 1013 0
247203080 190y C Feb. 19, 2024, 12:29 p.m. OK Java 8 TESTS 16 1029 0
247212914 Jha_coder1942 C Feb. 19, 2024, 1:40 p.m. OK Java 8 TESTS 16 1045 2355200
247171943 xsh367 C Feb. 19, 2024, 8:09 a.m. OK Java 8 TESTS 16 1091 0
247196986 vikaskajla C Feb. 19, 2024, 11:38 a.m. OK JavaScript TESTS 16 155 19456000
247195801 hsh21097305 C Feb. 19, 2024, 11:28 a.m. OK MS C++ 2017 TESTS 16 264 3379200
247193512 S-T C Feb. 19, 2024, 11:08 a.m. OK MS C++ 2017 TESTS 16 295 5120000
247182873 wondering001 C Feb. 19, 2024, 9:35 a.m. OK MS C++ 2017 TESTS 16 311 24473600
247124941 crapcode C Feb. 18, 2024, 5:36 p.m. OK PHP TESTS 16 124 33689600
247133868 YMSeah C Feb. 18, 2024, 6:58 p.m. OK PyPy 3 TESTS 16 327 19763200
247153287 nealzane C Feb. 19, 2024, 4:14 a.m. OK PyPy 3 TESTS 16 499 31129600
247352325 coder_11 C Feb. 19, 2024, 4:29 p.m. OK PyPy 3 TESTS 16 623 21606400
247172424 smugi C Feb. 19, 2024, 8:13 a.m. OK PyPy 3 TESTS 16 655 19456000
247206085 v.bonifaci C Feb. 19, 2024, 12:53 p.m. OK PyPy 3 TESTS 16 685 19660800
247135368 ErikUs C Feb. 18, 2024, 7:13 p.m. OK PyPy 3 TESTS 16 795 19660800
247213531 ChaoticOrder C Feb. 19, 2024, 1:44 p.m. OK PyPy 3 TESTS 16 826 24166400
247140831 Lotrick C Feb. 18, 2024, 8:16 p.m. OK PyPy 3-64 TESTS 16 171 25702400
247131891 isani_alis C Feb. 18, 2024, 6:38 p.m. OK PyPy 3-64 TESTS 16 171 27750400
247387081 __khanter C Feb. 19, 2024, 7:07 p.m. OK PyPy 3-64 TESTS 16 202 28774400
247143939 jvatsal0709 C Feb. 18, 2024, 8:59 p.m. OK PyPy 3-64 TESTS 16 202 28876800
247128177 motsuni04 C Feb. 18, 2024, 6:05 p.m. OK PyPy 3-64 TESTS 16 202 29081600
247138541 abenezer_m54 C Feb. 18, 2024, 7:48 p.m. OK PyPy 3-64 TESTS 16 217 28057600
247190107 V_I_P C Feb. 19, 2024, 10:36 a.m. OK PyPy 3-64 TESTS 16 218 32870400
247137660 jiangjinjinyxt C Feb. 18, 2024, 7:38 p.m. OK PyPy 3-64 TESTS 16 248 33280000
247139212 Icy_specific C Feb. 18, 2024, 7:56 p.m. OK PyPy 3-64 TESTS 16 264 24166400
247410177 Pearlb1ue C Feb. 20, 2024, 1:10 a.m. OK PyPy 3-64 TESTS 16 264 37273600
247143214 0siedem C Feb. 18, 2024, 8:48 p.m. OK Python 3 TESTS 16 265 34611200
247383554 forgotten-semicolon C Feb. 19, 2024, 6:36 p.m. OK Python 3 TESTS 16 296 36659200
247153041 hushbek_2009 C Feb. 19, 2024, 4:11 a.m. OK Python 3 TESTS 16 343 27443200
247295353 codeben C Feb. 19, 2024, 3:20 p.m. OK Python 3 TESTS 16 358 27750400
247183994 21bec036 C Feb. 19, 2024, 9:44 a.m. OK Python 3 TESTS 16 373 27545600
247184080 21bec036 C Feb. 19, 2024, 9:44 a.m. OK Python 3 TESTS 16 405 26828800
247139436 TOKSIKMEN C Feb. 18, 2024, 7:58 p.m. OK Python 3 TESTS 16 405 27545600
247173372 MakShon Gegedosh C Feb. 19, 2024, 8:20 a.m. OK Python 3 TESTS 16 420 27955200
247133382 Om_Singh_ C Feb. 18, 2024, 6:53 p.m. OK Python 3 TESTS 16 420 27955200
247152480 good_angel C Feb. 19, 2024, 4:04 a.m. OK Python 3 TESTS 16 421 27443200
247187729 Hyrulia C Feb. 19, 2024, 10:15 a.m. OK Rust 2021 TESTS 16 46 12185600
247194753 robostac C Feb. 19, 2024, 11:19 a.m. OK Rust 2021 TESTS 16 46 17203200
247194653 0xffayman C Feb. 19, 2024, 11:18 a.m. OK Rust 2021 TESTS 16 124 17612800

remove filters

Back to search problems