Codeforces Round 1082 (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
2202 Codeforces Round 1082 (Div. 2) FINISHED False 9000 4548323 Feb. 23, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 267 ) G1 Monotone Monochrome Matrices (Easy Version) PROGRAMMING data structures

This is the easy version of the problem. The difference between the versions is that in this version, the constraints on (n) and (q) are smaller. You can hack only if you solved all versions of this problem. A monochrome matrix of size (n \times n) is a matrix of (n) rows and (n) columns, where each cell is colored either black or white. Let the color of cell ((r,c)) in a monochrome matrix (C) be denoted as (Cr,c). Let's call such a matrix (C) monotone if it satisfies the following condition: There exist no two rows (1 \le i \lt j \le n) and two columns (1 \le k \lt l \le n) that satisfy the following three conditions: (Ci,k=Cj,l); (Cj,k=Ci,l); (Ci,k \neq Cj,k). (Ci,k=Cj,l); (Cj,k=Ci,l); (Ci,k \neq Cj,k). There is a monochrome matrix (M) of size (n \times n), where all cells are initially white. Please solve (q) queries of the following kind: (r\;c): Change the color of the cell ((r,c)) in (M) to black . Then, determine if (M) is monotone or not. For each query, it is guaranteed that the color of the cell ((r,c)) was white before the query. Do note that the updates are persistent. In other words, the change in color from one query affects the later queries as well. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^3)). The description of the test cases follows. The first line of each test case contains two integers (n) and (q) ((2 \le n \le 25\,000), (1 \le q \le \min(n^2,200\,000))). Each of the (q) following lines contains two integers (r_i), (c_i) denoting the (i)-th query ((1 \le r_i,c_i \le n)). For each query, it is guaranteed that the color of the cell ((r,c)) was white before the query. It is guaranteed that the sum of (n) over all test cases does not exceed (25\,000). It is guaranteed that the sum of (q) o

Tutorials

Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
364108622 _el3bd_ G1 Feb. 23, 2026, 5:59 p.m. OK C++17 (GCC 7-32) TESTS 42 125 102400
364101712 rajesh_20 G1 Feb. 23, 2026, 4:59 p.m. OK C++17 (GCC 7-32) TESTS 42 125 102400
364092731 tretasingh4399 G1 Feb. 23, 2026, 4:30 p.m. OK C++17 (GCC 7-32) TESTS 42 125 102400
364089571 Saurabh071107 G1 Feb. 23, 2026, 4:20 p.m. OK C++17 (GCC 7-32) TESTS 42 125 102400
364108407 Taha90411 G1 Feb. 23, 2026, 5:58 p.m. OK C++17 (GCC 7-32) TESTS 42 140 102400
364108007 Arjun_Dixit G1 Feb. 23, 2026, 5:54 p.m. OK C++17 (GCC 7-32) TESTS 42 140 102400
364102458 Tai_Yang G1 Feb. 23, 2026, 5:01 p.m. OK C++17 (GCC 7-32) TESTS 42 140 102400
364096468 Butterrokaya G1 Feb. 23, 2026, 4:42 p.m. OK C++17 (GCC 7-32) TESTS 42 140 102400
364095361 Shraus_812 G1 Feb. 23, 2026, 4:38 p.m. OK C++17 (GCC 7-32) TESTS 42 140 102400
364094025 CoderShoder G1 Feb. 23, 2026, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 42 140 102400
364117124 Kalikari G1 Feb. 23, 2026, 7:19 p.m. OK C++20 (GCC 13-64) TESTS 42 109 102400
364103423 zhibohemain G1 Feb. 23, 2026, 5:04 p.m. OK C++20 (GCC 13-64) TESTS 42 109 102400
364090521 xsh4n4 G1 Feb. 23, 2026, 4:23 p.m. OK C++20 (GCC 13-64) TESTS 42 109 102400
364137515 turneja G1 Feb. 24, 2026, 12:18 a.m. OK C++20 (GCC 13-64) TESTS 42 109 24166400
364109189 satya_2007 G1 Feb. 23, 2026, 6:04 p.m. OK C++20 (GCC 13-64) TESTS 42 125 102400
364091962 wlan9509 G1 Feb. 23, 2026, 4:27 p.m. OK C++20 (GCC 13-64) TESTS 42 125 102400
364088449 shri_raj G1 Feb. 23, 2026, 4:17 p.m. OK C++20 (GCC 13-64) TESTS 42 125 2457600
364120885 Rafi22 G1 Feb. 23, 2026, 8:02 p.m. OK C++20 (GCC 13-64) TESTS 42 125 40140800
364099190 M.Campver G1 Feb. 23, 2026, 4:51 p.m. OK C++20 (GCC 13-64) TESTS 42 140 102400
364098279 VPhgK39 G1 Feb. 23, 2026, 4:48 p.m. OK C++20 (GCC 13-64) TESTS 42 140 102400
364090083 gogo_124 G1 Feb. 23, 2026, 4:22 p.m. OK C++23 (GCC 14-64, msys2) TESTS 42 62 6758400
364154998 BurnedChicken G1 Feb. 24, 2026, 6:01 a.m. OK C++23 (GCC 14-64, msys2) TESTS 42 78 102400
364103295 makeit422 G1 Feb. 23, 2026, 5:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 42 78 6758400
364137467 saeedahmadchughtai123 G1 Feb. 24, 2026, 12:16 a.m. OK C++23 (GCC 14-64, msys2) TESTS 42 93 102400
364137597 Joler_ G1 Feb. 24, 2026, 12:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 42 109 102400
364123386 RockSnow G1 Feb. 23, 2026, 8:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 42 109 102400
364111534 KSDBDKEFA G1 Feb. 23, 2026, 6:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 42 109 102400
364095168 RohitTalele G1 Feb. 23, 2026, 4:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 42 109 102400
364090204 returnXnull G1 Feb. 23, 2026, 4:22 p.m. OK C++23 (GCC 14-64, msys2) TESTS 42 109 102400
364094572 Ben_Alex G1 Feb. 23, 2026, 4:35 p.m. OK C++23 (GCC 14-64, msys2) TESTS 42 109 7270400
364151907 rachit.gupta G1 Feb. 24, 2026, 5:17 a.m. OK Java 21 TESTS 42 250 1843200
364151902 shubhansh_gupta G1 Feb. 24, 2026, 5:17 a.m. OK Java 21 TESTS 42 250 1843200
364093186 kumarpankaj301005 G1 Feb. 23, 2026, 4:31 p.m. OK Java 21 TESTS 42 375 921600
364097400 ajayrazz G1 Feb. 23, 2026, 4:45 p.m. OK Java 21 TESTS 42 390 819200
364100516 vibhanshud G1 Feb. 23, 2026, 4:55 p.m. OK Java 21 TESTS 42 484 716800
364095955 tealab G1 Feb. 23, 2026, 4:40 p.m. OK PyPy 3-64 TESTS 42 187 40857600
364138515 smilences G1 Feb. 24, 2026, 12:44 a.m. OK PyPy 3-64 TESTS 42 250 10854400
364099079 Wolf_fiesta G1 Feb. 23, 2026, 4:50 p.m. OK PyPy 3-64 TESTS 42 484 8704000
364100409 abhinav4710 G1 Feb. 23, 2026, 4:55 p.m. OK PyPy 3-64 TESTS 42 531 8499200
364093822 nithishreddy03 G1 Feb. 23, 2026, 4:33 p.m. OK Python 3 TESTS 42 281 30105600
364102380 avishekjha23 G1 Feb. 23, 2026, 5:01 p.m. OK Python 3 TESTS 42 546 1638400
364100130 kush_5699 G1 Feb. 23, 2026, 4:54 p.m. OK Python 3 TESTS 42 1281 1228800

remove filters

Back to search problems