Codeforces Round 657 (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
1379 Codeforces Round 657 (Div. 2) FINISHED False 7200 142203611 July 19, 2020, 9 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 519 ) F2 Chess Strikes Back (hard version) PROGRAMMING data structures divide and conquer 2800

B'Note that the difference between easy and hard versions is that in hard version unavailable cells can become available again and in easy version can 't. You can make hacks only if all versions are solved. Ildar and Ivan are tired of chess, but they really like the chessboard, so they invented a new game. The field is a chessboard 2n x 2m : it has 2n rows, 2m columns, and the cell in row i and column j is colored white if i+j is even, and is colored black otherwise. The game proceeds as follows: Ildar marks some of the white cells of the chessboard as unavailable, and asks Ivan to place n x m kings on the remaining white cells in such way, so that there are no kings attacking each other. A king can attack another king if they are located in the adjacent cells, sharing an edge or a corner. Ildar would like to explore different combinations of cells. Initially all cells are marked as available, and then he has q queries. In each query he either marks a cell as unavailable, or marks the previously unavailable cell as available. After each query he would like to know whether it is possible to place the kings on the available cells in a desired way. Please help him! The first line of input contains three integers n , m , q ( 1 <= q n, m, q <= q 200 ,000 ) -- the size of the board and the number of queries. q lines follow, each of them contains a description of a query: two integers i and j , denoting a white cell on the board ( 1 <= q i <= q 2n , 1 <= q j <= q 2m , i + j is even). If the cell (i, j) was available before the query, then it becomes unavailable. Otherwise, if the cell was unavailable, it becomes available. Output q lines, i -th line should contain answer for a board after i queries of Ildar. This line should contain "YES" if it is possible to place the kings on the available cells in the desired way, or "NO" otherwise'...

Tutorials

Codeforces Round #657 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
87390851 Pigbrain F2 July 20, 2020, 1:19 a.m. OK GNU C++11 TESTS 75 217 29798400 2800
87346860 zlc1114 F2 July 19, 2020, 11:51 a.m. OK GNU C++11 TESTS 75 218 82534400 2800
87391315 chenyewei_1234 F2 July 20, 2020, 1:36 a.m. OK GNU C++11 TESTS 75 342 50483200 2800
87392867 lavenderwithbluish F2 July 20, 2020, 2:23 a.m. OK GNU C++11 TESTS 75 389 97177600 2800
87356481 Frame233 F2 July 19, 2020, 1:28 p.m. OK GNU C++11 TESTS 75 421 46080000 2800
87390943 albeXL F2 July 20, 2020, 1:24 a.m. OK GNU C++11 TESTS 75 482 58470400 2800
87330331 MOAstray F2 July 19, 2020, 10:34 a.m. OK GNU C++11 TESTS 75 686 393011200 2800
87329687 pdfqwq F2 July 19, 2020, 10:32 a.m. OK GNU C++11 TESTS 75 795 67584000 2800
87370086 691 F2 July 19, 2020, 4:01 p.m. OK GNU C++11 TESTS 75 873 18329600 2800
87347440 gisp_zjz F2 July 19, 2020, 11:56 a.m. OK GNU C++11 TESTS 75 1466 48332800 2800
87372791 xb0nS F2 July 19, 2020, 4:43 p.m. OK GNU C++14 TESTS 75 233 29593600 2800
87387518 krijgertje F2 July 19, 2020, 10:23 p.m. OK GNU C++14 TESTS 75 234 33280000 2800
87379845 danya090699 F2 July 19, 2020, 6:48 p.m. OK GNU C++14 TESTS 75 280 42496000 2800
87352433 4fecta F2 July 19, 2020, 12:43 p.m. OK GNU C++14 TESTS 75 312 58470400 2800
87373651 Kirill22 F2 July 19, 2020, 4:56 p.m. OK GNU C++14 TESTS 75 342 39321600 2800
87373575 Kirill22 F2 July 19, 2020, 4:55 p.m. OK GNU C++14 TESTS 75 405 45670400 2800
87351096 wzj0314 F2 July 19, 2020, 12:30 p.m. OK GNU C++14 TESTS 75 655 22835200 2800
87337142 WA_TLE F2 July 19, 2020, 10:49 a.m. OK GNU C++14 TESTS 75 873 15052800 2800
87382923 Khongor F2 July 19, 2020, 7:57 p.m. OK GNU C++14 TESTS 75 1029 56934400 2800
87337642 Young.IQ F2 July 19, 2020, 10:50 a.m. OK GNU C++14 TESTS 75 1965 139468800 2800
87373066 timf1089 F2 July 19, 2020, 4:47 p.m. OK GNU C++17 TESTS 75 249 39219200 2800
87385185 fivefourthreeone F2 July 19, 2020, 8:57 p.m. OK GNU C++17 TESTS 75 280 37683200 2800
87398991 xiahongyu F2 July 20, 2020, 5:10 a.m. OK GNU C++17 TESTS 75 280 60006400 2800
87398439 xiahongyu F2 July 20, 2020, 4:56 a.m. OK GNU C++17 TESTS 75 280 65126400 2800
87322355 Medeowex F2 July 19, 2020, 10:16 a.m. OK GNU C++17 TESTS 75 295 31129600 2800
87387940 extremum F2 July 19, 2020, 10:44 p.m. OK GNU C++17 TESTS 75 296 42393600 2800
87350580 Felerius F2 July 19, 2020, 12:25 p.m. OK GNU C++17 TESTS 75 326 16691200 2800
87379483 _overrated_ F2 July 19, 2020, 6:40 p.m. OK GNU C++17 TESTS 75 389 74547200 2800
87381961 zyrch F2 July 19, 2020, 7:34 p.m. OK GNU C++17 TESTS 75 436 61644800 2800
87401805 Alireza_Keshavarz F2 July 20, 2020, 6:01 a.m. OK GNU C++17 TESTS 75 483 153497600 2800
87368152 8-_-8 F2 July 19, 2020, 3:37 p.m. OK GNU C++17 (64) TESTS 75 217 39628800 2800
87359392 jiangly F2 July 19, 2020, 1:59 p.m. OK GNU C++17 (64) TESTS 75 264 52531200 2800
87390715 12tqian F2 July 20, 2020, 1:13 a.m. OK GNU C++17 (64) TESTS 75 264 64819200 2800
87390757 12tqian F2 July 20, 2020, 1:14 a.m. OK GNU C++17 (64) TESTS 75 265 64819200 2800
87391862 12tqian F2 July 20, 2020, 1:54 a.m. OK GNU C++17 (64) TESTS 75 311 64819200 2800
87368920 Geothermal F2 July 19, 2020, 3:46 p.m. OK GNU C++17 (64) TESTS 75 311 65126400 2800
87349102 jjikkollp F2 July 19, 2020, 12:11 p.m. OK GNU C++17 (64) TESTS 75 311 67788800 2800
87350529 Roundgod F2 July 19, 2020, 12:25 p.m. OK GNU C++17 (64) TESTS 75 373 42086400 2800
87386801 Marckess F2 July 19, 2020, 9:55 p.m. OK GNU C++17 (64) TESTS 75 420 63795200 2800
87387248 Marckess F2 July 19, 2020, 10:13 p.m. OK GNU C++17 (64) TESTS 75 421 53350400 2800
87388908 sansen F2 July 19, 2020, 11:31 p.m. OK Rust TESTS 75 218 54272000 2800
87332257 sansen F2 July 19, 2020, 10:38 a.m. OK Rust TESTS 75 1154 49664000 2800

remove filters

Back to search problems