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 |
---|---|---|---|---|---|---|
1549 | Codeforces Round 736 (Div. 2) | FINISHED | False | 8700 | 109524310 | Aug. 1, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 24808 ) | B | Gregor and the Pawn Game | PROGRAMMING | flows graphs greedy implementation |
B"There is a chessboard of size n by n . The square in the i -th row from top and j -th column from the left is labelled (i,j) . Currently, Gregor has some pawns in the n -th row. There are also enemy pawns in the 1 -st row. On one turn, Gregor moves one of his pawns. A pawn can move one square up (from (i,j) to (i-1,j) ) if there is no pawn in the destination square. Additionally, a pawn can move one square diagonally up (from (i,j) to either (i-1,j-1) or (i-1,j+1) ) if and only if there is an enemy pawn in that square. The enemy pawn is also removed. Gregor wants to know what is the maximum number of his pawns that can reach row 1 ? Note that only Gregor takes turns in this game, and the enemy pawns never move. Also, when Gregor's pawn reaches row 1 , it is stuck and cannot make any further moves. The first line of the input contains one integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. Then t test cases follow. Each test case consists of three lines. The first line contains a single integer n ( 2 <= n <= 2 cdot{10}^{5} ) -- the size of the chessboard. The second line consists of a string of binary digits of length n , where a 1 in the i -th position corresponds to an enemy pawn in the i -th cell from the left, and 0 corresponds to an empty cell. The third line consists of a string of binary digits of length n , where a 1 in the i -th position corresponds to a Gregor's pawn in the i -th cell from the left, and 0 corresponds to an empty cell. It is guaranteed that the sum of n across all test cases is less than 2 cdot{10}^{5} . For each test case, print one integer: the maximum number of Gregor's pawns which can reach the 1 -st row. In the first example, Gregor can simply advance all 3 of his pawns forward. Thus, the answer is 3 . In the second example, Gregor ca"... |
Codeforces Round 736 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
124627005 | patil98varad | B | Aug. 2, 2021, 12:41 a.m. | OK | GNU C11 | TESTS | 19 | 93 | 4096000 | ||
124601460 | lelouch-of-the-code | B | Aug. 1, 2021, 4:54 p.m. | OK | GNU C11 | TESTS | 19 | 108 | 4505600 | ||
124595770 | Jexy | B | Aug. 1, 2021, 4:40 p.m. | OK | GNU C11 | TESTS | 19 | 109 | 4096000 | ||
124615918 | Grace2005 | B | Aug. 1, 2021, 8:12 p.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4096000 | ||
124626634 | xuanyuan | B | Aug. 2, 2021, 12:32 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4096000 | ||
124631823 | bbbmy | B | Aug. 2, 2021, 2:12 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124631523 | han369 | B | Aug. 2, 2021, 2:07 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124627686 | 134567890 | B | Aug. 2, 2021, 12:56 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124627977 | Ximenana | B | Aug. 2, 2021, 1:02 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124648817 | raha2699 | B | Aug. 2, 2021, 5:53 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124633521 | iterater | B | Aug. 2, 2021, 2:36 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124633448 | Wangxuye | B | Aug. 2, 2021, 2:35 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124632058 | tianyy | B | Aug. 2, 2021, 2:15 a.m. | OK | GNU C++11 | TESTS | 19 | 31 | 4300800 | ||
124641751 | ritanarulabhatia | B | Aug. 2, 2021, 4:28 a.m. | OK | GNU C++14 | TESTS | 19 | 30 | 4505600 | ||
124633594 | Soul_Of_God | B | Aug. 2, 2021, 2:37 a.m. | OK | GNU C++14 | TESTS | 19 | 30 | 4505600 | ||
124625590 | Kapil_Bishnoi | B | Aug. 2, 2021, 12:03 a.m. | OK | GNU C++14 | TESTS | 19 | 30 | 4505600 | ||
124638936 | _Ruri_ | B | Aug. 2, 2021, 3:52 a.m. | OK | GNU C++14 | TESTS | 19 | 31 | 4096000 | ||
124638334 | ankush8523 | B | Aug. 2, 2021, 3:44 a.m. | OK | GNU C++14 | TESTS | 19 | 31 | 4096000 | ||
124631840 | xjq | B | Aug. 2, 2021, 2:12 a.m. | OK | GNU C++14 | TESTS | 19 | 31 | 4096000 | ||
124620217 | Abhijeet0709 | B | Aug. 1, 2021, 9:24 p.m. | OK | GNU C++14 | TESTS | 19 | 31 | 4096000 | ||
124630178 | 2018xiaoweiwen | B | Aug. 2, 2021, 1:45 a.m. | OK | GNU C++14 | TESTS | 19 | 31 | 4198400 | ||
124649486 | stranger1O | B | Aug. 2, 2021, 6:01 a.m. | OK | GNU C++14 | TESTS | 19 | 31 | 4505600 | ||
124648463 | alok_2k19 | B | Aug. 2, 2021, 5:49 a.m. | OK | GNU C++14 | TESTS | 19 | 31 | 4505600 | ||
124614893 | JADIT | B | Aug. 1, 2021, 8:04 p.m. | OK | GNU C++17 | TESTS | 19 | 15 | 4505600 | ||
124614586 | stevancv | B | Aug. 1, 2021, 8:02 p.m. | OK | GNU C++17 | TESTS | 19 | 15 | 4505600 | ||
124623884 | Lucida1 | B | Aug. 1, 2021, 11:05 p.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4096000 | ||
124622789 | Lucida1 | B | Aug. 1, 2021, 10:30 p.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4096000 | ||
124621466 | -neutron- | B | Aug. 1, 2021, 9:53 p.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4096000 | ||
124643412 | ankurverma | B | Aug. 2, 2021, 4:51 a.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4505600 | ||
124639412 | swapnilnyk10 | B | Aug. 2, 2021, 3:59 a.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4505600 | ||
124638962 | butani_111 | B | Aug. 2, 2021, 3:53 a.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4505600 | ||
124634556 | Protector_2131 | B | Aug. 2, 2021, 2:51 a.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4505600 | ||
124634386 | Martin_Op | B | Aug. 2, 2021, 2:49 a.m. | OK | GNU C++17 | TESTS | 19 | 30 | 4505600 | ||
124644495 | Chet8n | B | Aug. 2, 2021, 5:06 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 5017600 | ||
124649012 | Harirai | B | Aug. 2, 2021, 5:55 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 30 | 5017600 | ||
124643766 | YoUkn0wh0 | B | Aug. 2, 2021, 4:56 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 30 | 5017600 | ||
124638256 | Mr.Hmian | B | Aug. 2, 2021, 3:42 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 30 | 5017600 | ||
124627364 | chctxdy68 | B | Aug. 2, 2021, 12:49 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 30 | 5017600 | ||
124617178 | noob_26 | B | Aug. 1, 2021, 8:30 p.m. | OK | GNU C++17 (64) | TESTS | 19 | 30 | 5017600 | ||
124639103 | timothybagas | B | Aug. 2, 2021, 3:55 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 30 | 5836800 | ||
124597962 | Monke | B | Aug. 1, 2021, 4:46 p.m. | OK | GNU C++17 (64) | TESTS | 19 | 30 | 11366400 | ||
124649212 | Blazer_007 | B | Aug. 2, 2021, 5:58 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 31 | 5017600 | ||
124648508 | rgnerdplayer | B | Aug. 2, 2021, 5:50 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 31 | 5017600 | ||
124646072 | SaberXpro | B | Aug. 2, 2021, 5:20 a.m. | OK | Java 11 | TESTS | 19 | 186 | 23756800 | ||
124626750 | themadknight45 | B | Aug. 2, 2021, 12:35 a.m. | OK | Java 11 | TESTS | 19 | 187 | 23756800 | ||
124625379 | themadknight45 | B | Aug. 1, 2021, 11:56 p.m. | OK | Java 11 | TESTS | 19 | 187 | 23756800 | ||
124619309 | FLORINNN | B | Aug. 1, 2021, 9:04 p.m. | OK | Java 11 | TESTS | 19 | 187 | 23859200 | ||
124638216 | Mahip_19 | B | Aug. 2, 2021, 3:42 a.m. | OK | Java 11 | TESTS | 19 | 202 | 23859200 | ||
124621190 | DylanSmith | B | Aug. 1, 2021, 9:46 p.m. | OK | Java 11 | TESTS | 19 | 202 | 23859200 | ||
124632828 | decoder_1671 | B | Aug. 2, 2021, 2:27 a.m. | OK | Java 11 | TESTS | 19 | 202 | 35123200 | ||
124649424 | Sanju_250406 | B | Aug. 2, 2021, 6 a.m. | OK | Java 11 | TESTS | 19 | 217 | 23859200 | ||
124615798 | tony_heart | B | Aug. 1, 2021, 8:11 p.m. | OK | Java 11 | TESTS | 19 | 218 | 23859200 | ||
124647946 | Tharun0102 | B | Aug. 2, 2021, 5:43 a.m. | OK | Java 11 | TESTS | 19 | 233 | 23859200 | ||
124641730 | sonusingh.nitaa | B | Aug. 2, 2021, 4:28 a.m. | OK | Java 8 | TESTS | 19 | 124 | 20480000 | ||
124626167 | anoopvrma | B | Aug. 2, 2021, 12:20 a.m. | OK | Java 8 | TESTS | 19 | 124 | 20480000 | ||
124633312 | Akshay211 | B | Aug. 2, 2021, 2:33 a.m. | OK | Java 8 | TESTS | 19 | 124 | 20480000 | ||
124638194 | TheKingInTheNorth | B | Aug. 2, 2021, 3:42 a.m. | OK | Java 8 | TESTS | 19 | 124 | 20480000 | ||
124615072 | NerfThis | B | Aug. 1, 2021, 8:05 p.m. | OK | Java 8 | TESTS | 19 | 140 | 20480000 | ||
124621905 | RonWonWon | B | Aug. 1, 2021, 10:04 p.m. | OK | Java 8 | TESTS | 19 | 140 | 20480000 | ||
124614830 | less_ordinary | B | Aug. 1, 2021, 8:03 p.m. | OK | Java 8 | TESTS | 19 | 140 | 20582400 | ||
124629983 | shaurya024 | B | Aug. 2, 2021, 1:42 a.m. | OK | Java 8 | TESTS | 19 | 187 | 21196800 | ||
124628359 | amit_roy | B | Aug. 2, 2021, 1:09 a.m. | OK | Java 8 | TESTS | 19 | 202 | 20582400 | ||
124635430 | edenSpace | B | Aug. 2, 2021, 3:03 a.m. | OK | Java 8 | TESTS | 19 | 202 | 34304000 | ||
124649053 | huy.caohuyhuy123 | B | Aug. 2, 2021, 5:56 a.m. | OK | Kotlin | TESTS | 19 | 264 | 20684800 | ||
124633411 | PanYujing | B | Aug. 2, 2021, 2:35 a.m. | OK | MS C++ | TESTS | 19 | 109 | 4608000 | ||
124599318 | ElevenYexi | B | Aug. 1, 2021, 4:49 p.m. | OK | MS C++ | TESTS | 19 | 109 | 28672000 | ||
124636779 | sgly33 | B | Aug. 2, 2021, 3:22 a.m. | OK | MS C++ 2017 | TESTS | 19 | 46 | 4096000 | ||
124636123 | youle | B | Aug. 2, 2021, 3:13 a.m. | OK | MS C++ 2017 | TESTS | 19 | 108 | 4096000 | ||
124597529 | komalsatwik2002 | B | Aug. 1, 2021, 4:44 p.m. | OK | MS C++ 2017 | TESTS | 19 | 108 | 4505600 | ||
124636738 | zhangpangpang | B | Aug. 2, 2021, 3:21 a.m. | OK | MS C++ 2017 | TESTS | 19 | 109 | 4300800 | ||
124644649 | aditya712001 | B | Aug. 2, 2021, 5:08 a.m. | OK | MS C++ 2017 | TESTS | 19 | 109 | 5734400 | ||
124636037 | youle | B | Aug. 2, 2021, 3:12 a.m. | OK | MS C++ 2017 | TESTS | 19 | 124 | 4096000 | ||
124646487 | Dbody | B | Aug. 2, 2021, 5:26 a.m. | OK | MS C++ 2017 | TESTS | 19 | 124 | 4403200 | ||
124614759 | Amosh_ | B | Aug. 1, 2021, 8:03 p.m. | OK | MS C++ 2017 | TESTS | 19 | 124 | 4505600 | ||
124597329 | cr7ro | B | Aug. 1, 2021, 4:44 p.m. | OK | MS C++ 2017 | TESTS | 19 | 124 | 5324800 | ||
124634176 | tzh123 | B | Aug. 2, 2021, 2:46 a.m. | OK | MS C++ 2017 | TESTS | 19 | 124 | 6144000 | ||
124620313 | orloffm | B | Aug. 1, 2021, 9:25 p.m. | OK | .NET Core C# | TESTS | 19 | 109 | 13209600 | ||
124598290 | SD8 | B | Aug. 1, 2021, 4:46 p.m. | OK | .NET Core C# | TESTS | 19 | 124 | 17305600 | ||
124615230 | Rumman93 | B | Aug. 1, 2021, 8:06 p.m. | OK | .NET Core C# | TESTS | 19 | 202 | 14336000 | ||
124646193 | Keshav_Garg | B | Aug. 2, 2021, 5:22 a.m. | OK | PyPy 3 | TESTS | 19 | 186 | 32256000 | ||
124648766 | akanodia11 | B | Aug. 2, 2021, 5:52 a.m. | OK | PyPy 3 | TESTS | 19 | 187 | 28160000 | ||
124647132 | Keshav_Garg | B | Aug. 2, 2021, 5:34 a.m. | OK | PyPy 3 | TESTS | 19 | 187 | 32256000 | ||
124619871 | snip_tusher | B | Aug. 1, 2021, 9:17 p.m. | OK | PyPy 3 | TESTS | 19 | 202 | 33075200 | ||
124639287 | Huntersoulz | B | Aug. 2, 2021, 3:57 a.m. | OK | PyPy 3 | TESTS | 19 | 202 | 36454400 | ||
124622858 | Het_Fadia | B | Aug. 1, 2021, 10:32 p.m. | OK | PyPy 3 | TESTS | 19 | 202 | 37376000 | ||
124639002 | shajith_ham | B | Aug. 2, 2021, 3:53 a.m. | OK | PyPy 3 | TESTS | 19 | 249 | 33894400 | ||
124641831 | evoxtorm | B | Aug. 2, 2021, 4:29 a.m. | OK | PyPy 3 | TESTS | 19 | 280 | 32870400 | ||
124616647 | _aadiupadhyay_ | B | Aug. 1, 2021, 8:23 p.m. | OK | PyPy 3 | TESTS | 19 | 280 | 41164800 | ||
124643452 | s_prateek26 | B | Aug. 2, 2021, 4:51 a.m. | OK | PyPy 3 | TESTS | 19 | 326 | 35635200 | ||
124641391 | edusanketdk | B | Aug. 2, 2021, 4:23 a.m. | OK | Python 3 | TESTS | 19 | 155 | 8908800 | ||
124615546 | EvitFan | B | Aug. 1, 2021, 8:09 p.m. | OK | Python 3 | TESTS | 19 | 186 | 9728000 | ||
124635806 | shiviDON | B | Aug. 2, 2021, 3:09 a.m. | OK | Python 3 | TESTS | 19 | 187 | 9523200 | ||
124639049 | orazbek | B | Aug. 2, 2021, 3:54 a.m. | OK | Python 3 | TESTS | 19 | 202 | 9011200 | ||
124646253 | Keshav_Garg | B | Aug. 2, 2021, 5:23 a.m. | OK | Python 3 | TESTS | 19 | 202 | 9625600 | ||
124625115 | RANK1ZEN | B | Aug. 1, 2021, 11:46 p.m. | OK | Python 3 | TESTS | 19 | 295 | 8396800 | ||
124645265 | Keshav_Garg | B | Aug. 2, 2021, 5:15 a.m. | OK | Python 3 | TESTS | 19 | 311 | 9728000 | ||
124634106 | Mohan27 | B | Aug. 2, 2021, 2:45 a.m. | OK | Python 3 | TESTS | 19 | 311 | 9728000 | ||
124639096 | rutz12 | B | Aug. 2, 2021, 3:55 a.m. | OK | Python 3 | TESTS | 19 | 326 | 9420800 | ||
124600096 | abcsumit | B | Aug. 1, 2021, 4:51 p.m. | OK | Python 3 | TESTS | 19 | 326 | 9523200 |
Back to search problems