Codeforces Round 1033 (Div. 2) and CodeNite 2025

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
2120 Codeforces Round 1033 (Div. 2) and CodeNite 2025 FINISHED False 7200 25889123 June 21, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 5723 ) D Matrix game PROGRAMMING combinatorics math

Aryan and Harshith play a game. They both start with three integers (a), (b), and (k). Aryan then gives Harshith two integers (n) and (m). Harshith then gives Aryan a matrix (X) with (n) rows and (m) columns, such that each of the elements of (X) is between (1) and (k)(inclusive). After that, Aryan wins if he can find a submatrix(^{\text{∗}}) (Y) of (X) with (a) rows and (b) columns such that all elements of (Y) are equal. For example, when (a=2, b=2, k=6, n=3) and (m=3), if Harshith gives Aryan the matrix below, it is a win for Aryan as it has a submatrix of size (2\times 2) with all elements equal to (1) as shown below. Aryan gives you the values of (a), (b), and (k). He asks you to find the lexicographically minimum tuple ((n,m)) that he should give to Harshith such that Aryan always wins. Help Aryan win the game. Assume that Harshith plays optimally. The values of (n) and (m) can be large, so output them modulo (10^9+7). A tuple ((n_1, m_1)) is said to be lexicographically smaller than ((n_2, m_2)) if either (n_1<n_2) or (n_1=n_2) and (m_1<m_2). (^{\text{∗}})A submatrix of a matrix is obtained by removing some rows and/or columns from the original matrix. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. Each test case contains a single line with three space-separated integers (a, b) and (k) ((1\leq a,b,k\leq 10^5)). It is guaranteed that the sum of (\max(a, b, k)) over all test cases does not exceed (10^5). For each test case, output a single line containing two space-separated integers (n) and (m), denoting the answer to the problem. The values of (n) and (m) can be large, so output them modulo (10^9+7). For the first test case, every (n\times m) matrix contai

Tutorials

Codeforces Round 1033 (Div. 2) and CodeNite 2025 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
325480499 shauryaSinghhh D June 21, 2025, 4:32 p.m. OK C++17 (GCC 7-32) TESTS 18 46 0
325505351 renegade1050 D June 22, 2025, 4:14 a.m. OK C++17 (GCC 7-32) TESTS 19 46 0
325498724 slmhh D June 22, 2025, 2:22 a.m. OK C++17 (GCC 7-32) TESTS 18 46 0
325477756 moonlitt D June 21, 2025, 4:26 p.m. OK C++17 (GCC 7-32) TESTS 18 46 0
325504959 tkl2006 D June 22, 2025, 4:07 a.m. OK C++17 (GCC 7-32) TESTS 19 46 102400
325507689 ILOVEIA D June 22, 2025, 4:53 a.m. OK C++17 (GCC 7-32) TESTS 19 46 409600
325502450 honey D June 22, 2025, 3:23 a.m. OK C++17 (GCC 7-32) TESTS 18 46 1638400
325492518 sagnik24 D June 21, 2025, 6:10 p.m. OK C++17 (GCC 7-32) TESTS 18 61 0
325500989 meetpatel177 D June 22, 2025, 2:55 a.m. OK C++17 (GCC 7-32) TESTS 18 61 0
325488287 GANGSTEROJ D June 21, 2025, 5:35 p.m. OK C++17 (GCC 7-32) TESTS 18 61 0
325486502 Awwab_coder123 D June 21, 2025, 5:23 p.m. OK C++20 (GCC 13-64) TESTS 18 46 0
325494121 ankitraj803119 D June 21, 2025, 6:24 p.m. OK C++20 (GCC 13-64) TESTS 18 46 0
325488980 ABitVeryScaredOfWomen D June 21, 2025, 5:41 p.m. OK C++20 (GCC 13-64) TESTS 18 46 0
325471594 ashwani.pandey93048 D June 21, 2025, 4:10 p.m. OK C++20 (GCC 13-64) TESTS 18 46 0
325497123 halqifibrax D June 22, 2025, 1:42 a.m. OK C++20 (GCC 13-64) TESTS 18 46 102400
325509188 souravkp2005 D June 22, 2025, 5:15 a.m. OK C++20 (GCC 13-64) TESTS 19 46 102400
325505307 sunshne D June 22, 2025, 4:13 a.m. OK C++20 (GCC 13-64) TESTS 19 46 102400
325503037 problem10programming D June 22, 2025, 3:34 a.m. OK C++20 (GCC 13-64) TESTS 18 46 102400
325500042 sutekine D June 22, 2025, 2:39 a.m. OK C++20 (GCC 13-64) TESTS 18 46 102400
325496537 Aakash.Chityala D June 21, 2025, 7:04 p.m. OK C++20 (GCC 13-64) TESTS 18 46 102400
325480452 rambovillain323 D June 21, 2025, 4:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 18 46 0
325505650 d1amondzz D June 22, 2025, 4:19 a.m. OK C++23 (GCC 14-64, msys2) TESTS 19 46 0
325489477 destiny_still_arrives D June 21, 2025, 5:45 p.m. OK C++23 (GCC 14-64, msys2) TESTS 18 46 0
325484785 raghavb_007 D June 21, 2025, 5:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 18 46 0
325484682 pppwolf D June 21, 2025, 5:13 p.m. OK C++23 (GCC 14-64, msys2) TESTS 18 46 0
325481180 jatinsangal D June 21, 2025, 4:33 p.m. OK C++23 (GCC 14-64, msys2) TESTS 18 46 0
325505856 Srginit286 D June 22, 2025, 4:22 a.m. OK C++23 (GCC 14-64, msys2) TESTS 19 46 102400
325512248 susanzhishen D June 22, 2025, 5:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 19 46 102400
325506953 anuj_234 D June 22, 2025, 4:42 a.m. OK C++23 (GCC 14-64, msys2) TESTS 19 46 102400
325506068 HoneyGupta D June 22, 2025, 4:26 a.m. OK C++23 (GCC 14-64, msys2) TESTS 19 46 102400
325468975 James_bond_9089 D June 21, 2025, 4:04 p.m. OK C# 8 TESTS 18 171 6451200
325497662 rainboy D June 22, 2025, 2 a.m. OK GNU C11 TESTS 18 77 3686400
325472073 1divv1 D June 21, 2025, 4:11 p.m. OK GNU C11 TESTS 18 92 1638400
325476771 Karan653784846 D June 21, 2025, 4:24 p.m. OK GNU C11 TESTS 18 93 1638400
325467946 d.o. D June 21, 2025, 4:02 p.m. OK Go TESTS 18 77 614400
325471790 lyongwolf D June 21, 2025, 4:11 p.m. OK Java 21 TESTS 18 264 204800
325471523 ranxchooo D June 21, 2025, 4:10 p.m. OK Java 21 TESTS 18 280 921600
325497559 wddd D June 22, 2025, 1:57 a.m. OK Java 21 TESTS 18 281 1024000
325469137 demonslayer_629 D June 21, 2025, 4:04 p.m. OK Java 21 TESTS 18 296 409600
325474495 argynkhuan D June 21, 2025, 4:18 p.m. OK Java 21 TESTS 18 296 716800
325468110 Eigen_Value D June 21, 2025, 4:02 p.m. OK Java 21 TESTS 18 296 921600
325487669 Balu2907 D June 21, 2025, 5:31 p.m. OK Java 21 TESTS 18 311 819200
325489666 Yuki_B D June 21, 2025, 5:46 p.m. OK Java 21 TESTS 18 312 1228800
325489430 This_Is_Amazing D June 21, 2025, 5:44 p.m. OK Java 21 TESTS 18 327 614400
325485420 sahasrad D June 21, 2025, 5:17 p.m. OK Java 21 TESTS 18 327 1843200
325470019 NischayCodes D June 21, 2025, 4:07 p.m. OK Java 8 TESTS 18 187 0
325467874 saiprasanna_25 D June 21, 2025, 4:02 p.m. OK Java 8 TESTS 18 202 0
325506808 yimLo D June 22, 2025, 4:40 a.m. OK Java 8 TESTS 19 218 0
325485464 Purav_Shah07 D June 21, 2025, 5:17 p.m. OK Java 8 TESTS 18 218 0
325476890 ayush_chaudhary23 D June 21, 2025, 4:24 p.m. OK Java 8 TESTS 18 218 0
325474626 God__Of__War D June 21, 2025, 4:18 p.m. OK Java 8 TESTS 18 218 0
325511553 tirthgohil1410 D June 22, 2025, 5:47 a.m. OK Java 8 TESTS 19 358 0
325471038 patrick_kr D June 21, 2025, 4:09 p.m. OK Kotlin 1.9 TESTS 18 171 0
325470893 elizarov D June 21, 2025, 4:09 p.m. OK Kotlin 1.9 TESTS 18 233 307200
325479131 sacredphoenix4444 D June 21, 2025, 4:29 p.m. OK PyPy 3 TESTS 18 171 10752000
325468448 HardikAggarwal45 D June 21, 2025, 4:03 p.m. OK PyPy 3 TESTS 18 359 6860800
325479110 blazevfx D June 21, 2025, 4:29 p.m. OK PyPy 3 TESTS 18 405 16793600
325480188 kingmoshe D June 21, 2025, 4:32 p.m. OK PyPy 3 TESTS 18 624 22732800
325495545 Sheth25 D June 21, 2025, 6:40 p.m. OK PyPy 3-64 TESTS 18 93 5734400
325470814 Arnab_Goyal D June 21, 2025, 4:08 p.m. OK PyPy 3-64 TESTS 18 109 6553600
325470876 seeforty4040 D June 21, 2025, 4:09 p.m. OK PyPy 3-64 TESTS 18 124 5939200
325468807 gursimarsinghmiglani D June 21, 2025, 4:04 p.m. OK PyPy 3-64 TESTS 18 124 6656000
325469876 Om_Singh_ D June 21, 2025, 4:06 p.m. OK PyPy 3-64 TESTS 18 140 4505600
325475623 manvendra21 D June 21, 2025, 4:21 p.m. OK PyPy 3-64 TESTS 18 140 4608000
325467993 monocrap D June 21, 2025, 4:02 p.m. OK PyPy 3-64 TESTS 18 140 5324800
325477517 sonu_2912 D June 21, 2025, 4:25 p.m. OK PyPy 3-64 TESTS 18 140 6348800
325480331 Katrina55553 D June 21, 2025, 4:32 p.m. OK PyPy 3-64 TESTS 18 140 7372800
325474389 katonyonko D June 21, 2025, 4:17 p.m. OK PyPy 3-64 TESTS 18 140 9011200
325485335 Jimanbanashi D June 21, 2025, 5:17 p.m. OK Python 2 TESTS 18 187 0
325474691 Khatti_Toffee D June 21, 2025, 4:18 p.m. OK Python 3 TESTS 18 109 8089600
325471940 _ParaBoy_ D June 21, 2025, 4:11 p.m. OK Python 3 TESTS 18 109 8089600
325479624 arturmurtazin2019 D June 21, 2025, 4:31 p.m. OK Python 3 TESTS 18 140 307200
325476717 colloquial D June 21, 2025, 4:23 p.m. OK Python 3 TESTS 18 155 4096000
325473282 sactemp3 D June 21, 2025, 4:14 p.m. OK Python 3 TESTS 18 155 8089600
325473221 Confusira D June 21, 2025, 4:14 p.m. OK Python 3 TESTS 18 156 5939200
325477793 Lebrong1985 D June 21, 2025, 4:26 p.m. OK Python 3 TESTS 18 156 8192000
325468144 aaronhartono28 D June 21, 2025, 4:02 p.m. OK Python 3 TESTS 18 187 4300800
325481631 asimsuhail42 D June 21, 2025, 4:34 p.m. OK Python 3 TESTS 18 187 8192000
325479501 TheSunnyBoy D June 21, 2025, 4:30 p.m. OK Python 3 TESTS 18 202 7987200
325469810 aohsrys_ D June 21, 2025, 4:06 p.m. OK Ruby 3 TESTS 18 390 2355200
325481875 XORcist010 D June 21, 2025, 4:34 p.m. OK Rust 2021 TESTS 18 62 0
325479847 Singu_Larity D June 21, 2025, 4:31 p.m. OK Rust 2021 TESTS 18 77 0
325485870 fujishu D June 21, 2025, 5:20 p.m. OK Rust 2021 TESTS 18 77 102400
325475163 blackpanther_7 D June 21, 2025, 4:19 p.m. OK Rust 2021 TESTS 18 77 102400
325472771 Oni_chan123 D June 21, 2025, 4:13 p.m. OK Rust 2021 TESTS 18 77 102400
325469123 shatru908 D June 21, 2025, 4:04 p.m. OK Rust 2021 TESTS 18 108 102400

remove filters

Back to search problems