Codeforces Round 731 (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
1547 Codeforces Round 731 (Div. 3) FINISHED False 8100 111425111 July 10, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22961 ) C Pair Programming PROGRAMMING dp greedy two pointers

B"Monocarp and Polycarp are learning new programming techniques. Now they decided to try pair programming. It's known that they have worked together on the same file for n + m minutes. Every minute exactly one of them made one change to the file. Before they started, there were already k lines written in the file. Every minute exactly one of them does one of two actions: adds a new line to the end of the file or changes one of its lines. Monocarp worked in total for n minutes and performed the sequence of actions [a_1, a_2, ... , a_n] . If a_i = 0 , then he adds a new line to the end of the file. If a_i > 0 , then he changes the line with the number a_i . Monocarp performed actions strictly in this order: a_1 , then a_2 , ..., a_n . Polycarp worked in total for m minutes and performed the sequence of actions [b_1, b_2, ... , b_m] . If b_j = 0 , then he adds a new line to the end of the file. If b_j > 0 , then he changes the line with the number b_j . Polycarp performed actions strictly in this order: b_1 , then b_2 , ..., b_m . Restore their common sequence of actions of length n + m such that all actions would be correct -- there should be no changes to lines that do not yet exist. Keep in mind that in the common sequence Monocarp's actions should form the subsequence [a_1, a_2, ... , a_n] and Polycarp's -- subsequence [b_1, b_2, ... , b_m] . They can replace each other at the computer any number of times. Let's look at an example. Suppose k = 3 . Monocarp first changed the line with the number 2 and then added a new line (thus, n = 2, : a = [2, 0] ). Polycarp first added a new line and then changed the line with the number 5 (thus, m = 2, : b = [0, 5] ). Since the initial length of the file was 3 , in order for Polycarp to change line number 5 two new lines must be added beforehand. Examples of correct"...

Tutorials

Codeforces Round #731 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
122038332 H_a_c_kcode_gaurav C July 11, 2021, 5:30 a.m. OK GNU C11 TESTS 6 624 0
122002495 milan_s1 C July 10, 2021, 4:51 p.m. OK GNU C11 TESTS 5 624 0
122009723 LeeSnapdragon C July 10, 2021, 5:50 p.m. OK GNU C11 TESTS 5 639 0
122018035 kuba_422 C July 10, 2021, 7:49 p.m. OK GNU C11 TESTS 5 639 204800
122016750 ankitkumar00136 C July 10, 2021, 7:26 p.m. OK GNU C11 TESTS 5 655 0
122011255 aRaha_0_0 C July 10, 2021, 6:07 p.m. OK GNU C11 TESTS 5 655 0
122003355 jokerDiong C July 10, 2021, 4:54 p.m. OK GNU C11 TESTS 5 655 2355200
122000415 hjyltt C July 10, 2021, 4:47 p.m. OK GNU C11 TESTS 5 670 0
122008720 jokerDiong C July 10, 2021, 5:38 p.m. OK GNU C11 TESTS 5 670 2457600
122019986 Rajib_119 C July 10, 2021, 8:32 p.m. OK GNU C++11 TESTS 5 31 0
122029928 KomeijiSatori C July 11, 2021, 2:26 a.m. OK GNU C++11 TESTS 5 31 0
122009863 MikeC C July 10, 2021, 5:51 p.m. OK GNU C++11 TESTS 5 31 0
122031768 HcSoap C July 11, 2021, 3:09 a.m. OK GNU C++11 TESTS 5 31 7987200
122034415 air_2 C July 11, 2021, 4:06 a.m. OK GNU C++11 TESTS 5 46 0
122029988 DRGATES C July 11, 2021, 2:28 a.m. OK GNU C++11 TESTS 5 46 0
122029783 Ximenana C July 11, 2021, 2:22 a.m. OK GNU C++11 TESTS 5 46 0
122028354 Nesfan C July 11, 2021, 1:43 a.m. OK GNU C++11 TESTS 5 46 0
122028198 Nesfan C July 11, 2021, 1:38 a.m. OK GNU C++11 TESTS 5 46 0
122025518 sdfz171047 C July 10, 2021, 11:51 p.m. OK GNU C++11 TESTS 5 46 0
122017167 summu_14 C July 10, 2021, 7:33 p.m. OK GNU C++14 TESTS 5 31 102400
122026501 fpc_coder C July 11, 2021, 12:39 a.m. OK GNU C++14 TESTS 5 31 204800
122008729 ti20_lnakhoa C July 10, 2021, 5:38 p.m. OK GNU C++14 TESTS 5 46 0
122002655 BinhNhan247 C July 10, 2021, 4:52 p.m. OK GNU C++14 TESTS 5 46 0
122009105 ilia_rr C July 10, 2021, 5:43 p.m. OK GNU C++14 TESTS 5 46 0
122029252 jimmmmmybai C July 11, 2021, 2:09 a.m. OK GNU C++14 TESTS 5 46 0
122015813 sugreem C July 10, 2021, 7:10 p.m. OK GNU C++14 TESTS 5 46 0
122039668 pranav_sri C July 11, 2021, 5:54 a.m. OK GNU C++14 TESTS 6 46 102400
122037116 shivansh_jaiswal C July 11, 2021, 5:05 a.m. OK GNU C++14 TESTS 6 46 102400
122035132 ashu.kum2018 C July 11, 2021, 4:23 a.m. OK GNU C++14 TESTS 6 46 102400
122010717 Ahmed_Allawati C July 10, 2021, 6:01 p.m. OK GNU C++17 TESTS 5 31 102400
122007059 rishabhdeepsingh C July 10, 2021, 5:21 p.m. OK GNU C++17 TESTS 5 31 204800
122006615 Muhammedalajam C July 10, 2021, 5:17 p.m. OK GNU C++17 TESTS 5 31 204800
122007293 jestinroy3 C July 10, 2021, 5:23 p.m. OK GNU C++17 TESTS 5 31 204800
122009356 XORring-Samurai C July 10, 2021, 5:45 p.m. OK GNU C++17 TESTS 5 31 204800
122010578 incogn1to C July 10, 2021, 5:59 p.m. OK GNU C++17 TESTS 5 31 204800
122013593 PC_E1052 C July 10, 2021, 6:36 p.m. OK GNU C++17 TESTS 5 31 204800
122017765 lsht C July 10, 2021, 7:44 p.m. OK GNU C++17 TESTS 5 31 204800
122024088 RedAnt C July 10, 2021, 10:47 p.m. OK GNU C++17 TESTS 5 31 204800
122024541 bpdolson C July 10, 2021, 11:08 p.m. OK GNU C++17 TESTS 5 31 204800
122000762 antoniomsah C July 10, 2021, 4:47 p.m. OK GNU C++17 (64) TESTS 5 31 0
122000229 0winterscar0 C July 10, 2021, 4:47 p.m. OK GNU C++17 (64) TESTS 5 31 0
121998157 Rishi24 C July 10, 2021, 4:43 p.m. OK GNU C++17 (64) TESTS 5 31 0
122033222 sagsango C July 11, 2021, 3:41 a.m. OK GNU C++17 (64) TESTS 5 31 0
122029387 pavement C July 11, 2021, 2:13 a.m. OK GNU C++17 (64) TESTS 5 31 0
122014402 algopedia.ai C July 10, 2021, 6:48 p.m. OK GNU C++17 (64) TESTS 5 31 0
122007112 mr.convict C July 10, 2021, 5:21 p.m. OK GNU C++17 (64) TESTS 5 31 0
122004680 aryan57 C July 10, 2021, 5:02 p.m. OK GNU C++17 (64) TESTS 5 31 0
122004198 akdon1198 C July 10, 2021, 4:59 p.m. OK GNU C++17 (64) TESTS 5 31 0
122002992 Prakhar6969 C July 10, 2021, 4:53 p.m. OK GNU C++17 (64) TESTS 5 31 0
122016973 rego97 C July 10, 2021, 7:29 p.m. OK Haskell TESTS 5 327 102400
122009650 tusharpruth C July 10, 2021, 5:49 p.m. OK Java 11 TESTS 5 202 0
122033323 Anuj_Panchal C July 11, 2021, 3:43 a.m. OK Java 11 TESTS 5 202 0
122019007 parmxxt C July 10, 2021, 8:10 p.m. OK Java 11 TESTS 5 218 0
122018817 npwolverine C July 10, 2021, 8:05 p.m. OK Java 11 TESTS 5 218 0
122002719 Yuxiang C July 10, 2021, 4:52 p.m. OK Java 11 TESTS 5 233 0
122017994 vinam C July 10, 2021, 7:49 p.m. OK Java 11 TESTS 5 233 0
122013428 ak_ankit C July 10, 2021, 6:34 p.m. OK Java 11 TESTS 5 233 0
122008073 GhoulvsTitan C July 10, 2021, 5:32 p.m. OK Java 11 TESTS 5 233 0
122022139 codebook_2000 C July 10, 2021, 9:33 p.m. OK Java 11 TESTS 5 233 0
122014806 mr_white07 C July 10, 2021, 6:55 p.m. OK Java 11 TESTS 5 233 0
122024691 GVR C July 10, 2021, 11:15 p.m. OK Java 8 TESTS 5 109 0
122034057 Manan8686 C July 11, 2021, 3:59 a.m. OK Java 8 TESTS 5 109 0
122007378 wrikd C July 10, 2021, 5:24 p.m. OK Java 8 TESTS 5 124 0
122016831 Abdallah_Ragab00 C July 10, 2021, 7:27 p.m. OK Java 8 TESTS 5 124 0
122012295 tishrah_ C July 10, 2021, 6:20 p.m. OK Java 8 TESTS 5 124 0
122035809 Dstoical C July 11, 2021, 4:40 a.m. OK Java 8 TESTS 6 124 0
122021425 dev_14 C July 10, 2021, 9:11 p.m. OK Java 8 TESTS 5 124 0
122020199 pranavggupta06 C July 10, 2021, 8:38 p.m. OK Java 8 TESTS 5 124 0
122018160 ExitCode C July 10, 2021, 7:51 p.m. OK Java 8 TESTS 5 124 0
122018080 dexter_1205 C July 10, 2021, 7:50 p.m. OK Java 8 TESTS 5 124 0
122027410 Redline_ C July 11, 2021, 1:13 a.m. OK MS C++ 2017 TESTS 5 78 102400
122011100 javis_ C July 10, 2021, 6:05 p.m. OK MS C++ 2017 TESTS 5 171 0
122035925 dlehgns011 C July 11, 2021, 4:42 a.m. OK MS C++ 2017 TESTS 6 202 0
122015156 CtrlAlt C July 10, 2021, 7 p.m. OK MS C++ 2017 TESTS 5 217 0
122013810 Ash_2k C July 10, 2021, 6:39 p.m. OK MS C++ 2017 TESTS 5 217 102400
122017117 Ghieath C July 10, 2021, 7:32 p.m. OK MS C++ 2017 TESTS 5 233 0
122008152 Tangerine C July 10, 2021, 5:32 p.m. OK MS C++ 2017 TESTS 5 233 0
122003127 Sorkn C July 10, 2021, 4:53 p.m. OK MS C++ 2017 TESTS 5 233 0
122002530 Ahmed-abdelHamed C July 10, 2021, 4:51 p.m. OK MS C++ 2017 TESTS 5 233 819200
122031219 steeltrooper C July 11, 2021, 2:58 a.m. OK MS C++ 2017 TESTS 5 234 0
122011511 tabibi C July 10, 2021, 6:10 p.m. OK .NET Core C# TESTS 5 108 3276800
122003251 thetansquared C July 10, 2021, 4:54 p.m. OK .NET Core C# TESTS 5 109 3072000
122008538 harshiit133 C July 10, 2021, 5:36 p.m. OK PyPy 2 TESTS 5 171 3072000
122022224 coden00b2021 C July 10, 2021, 9:36 p.m. OK PyPy 2 TESTS 5 187 5427200
122039554 zayn. C July 11, 2021, 5:52 a.m. OK PyPy 3 TESTS 6 187 6860800
121998798 the_distortion C July 10, 2021, 4:44 p.m. OK PyPy 3 TESTS 5 202 5734400
122022586 pk31299 C July 10, 2021, 9:50 p.m. OK PyPy 3 TESTS 5 202 5939200
122005212 hash1023 C July 10, 2021, 5:05 p.m. OK PyPy 3 TESTS 5 202 6041600
122035684 not_tehlka C July 11, 2021, 4:36 a.m. OK PyPy 3 TESTS 6 202 6451200
122008334 harshiit133 C July 10, 2021, 5:34 p.m. OK PyPy 3 TESTS 5 264 9318400
122007351 light_yagami52 C July 10, 2021, 5:24 p.m. OK PyPy 3 TESTS 5 264 10240000
122020424 Optimismy C July 10, 2021, 8:43 p.m. OK PyPy 3 TESTS 5 265 9728000
122006244 Mr.Inconsistent C July 10, 2021, 5:14 p.m. OK PyPy 3 TESTS 5 265 9932800
122007724 MongyTrad C July 10, 2021, 5:27 p.m. OK PyPy 3 TESTS 5 280 7680000
122018878 Andrei_Kuz C July 10, 2021, 8:07 p.m. OK Python 2 TESTS 5 296 204800
122034815 adityaa_27 C July 11, 2021, 4:15 a.m. OK Python 3 TESTS 6 233 0
122004878 RANK1ZEN C July 10, 2021, 5:03 p.m. OK Python 3 TESTS 5 233 204800
122006122 NS3081992 C July 10, 2021, 5:13 p.m. OK Python 3 TESTS 5 249 409600
122029270 mayankmittal9269 C July 11, 2021, 2:10 a.m. OK Python 3 TESTS 5 264 307200
122004140 jonathan-chen10 C July 10, 2021, 4:58 p.m. OK Python 3 TESTS 5 265 0
122005852 NS3081992 C July 10, 2021, 5:10 p.m. OK Python 3 TESTS 5 265 409600
122006747 MongyTrad C July 10, 2021, 5:18 p.m. OK Python 3 TESTS 5 265 1024000
122000896 MongyTrad C July 10, 2021, 4:48 p.m. OK Python 3 TESTS 5 265 1024000
122002762 NeoCipher C July 10, 2021, 4:52 p.m. OK Python 3 TESTS 5 295 1024000
121999440 radoan.sharkar.richi C July 10, 2021, 4:45 p.m. OK Python 3 TESTS 5 295 1433600

remove filters

Back to search problems