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
( 17627 ) B Square Pool PROGRAMMING chinese remainder theorem geometry

Aryan and Harshith are playing pool in universe AX120 on a fixed square pool table of side (s) with pockets at its (4) corners. The corners are situated at ((0,0)), ((0,s)), ((s,0)), and ((s,s)). In this game variation, (n) identical balls are placed on the table with integral coordinates such that no ball lies on the edge or corner of the table. Then, they are all simultaneously shot at (10^{100}) units/sec speed (only at (45) degrees with the axes). In universe AX120, balls and pockets are almost point-sized, and the collisions are elastic, i.e., the ball, on hitting any surface, bounces off at the same angle and with the same speed. Harshith shot the balls, and he provided Aryan with the balls' positions and the angles at which he shot them. Help Aryan determine the number of balls potted into the pockets by Harshith. It is guaranteed that multiple collisions do not occur at the same moment and position. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 1000)). The description of the test cases follows. The first line of each test case contains two integers (n) and (s) ((1 \le n \le 10^3), (2 \le s\le 10^9)) — the number of balls placed on the table and the side length of the square pool table. The (i)-th of the next (n) lines contains four integers (d_x), (d_y), (x_i), and (y_i) ((d_x,d_y \in \{-1, 1\}), (0 \lt x_i, y_i \lt s)) — the direction vectors of the launch on the (X)-axis and (Y)-axis respectively, and the coordinates of the location where the (i)-th ball was placed. It is guaranteed that no two balls coincide at the initial moment. It is also guaranteed that the sum of (n) over all test cases does not exceed (10^3). For each test case, print a single integer — the number of balls potted in that game. In the first test case, there is a single ball and it's shot directly towards

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
325485086 og.kostya B June 21, 2025, 5:15 p.m. OK C# 10 TESTS 9 77 0
325467241 lion021012 B June 21, 2025, 4:01 p.m. OK C++17 (GCC 7-32) TESTS 9 31 0
325494686 asscracker3050 B June 21, 2025, 6:30 p.m. OK C++17 (GCC 7-32) TESTS 9 31 1228800
325511951 pika_qiu B June 22, 2025, 5:53 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325511936 mzibrahmi B June 22, 2025, 5:52 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325511330 2noob4u B June 22, 2025, 5:44 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325511215 rds11 B June 22, 2025, 5:43 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325510960 shredder69 B June 22, 2025, 5:40 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325509873 piyushsingh2nateyan B June 22, 2025, 5:25 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325512453 Akshay1105 B June 22, 2025, 6 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325512270 coder_imran00 B June 22, 2025, 5:57 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
325492839 ashu14 B June 21, 2025, 6:13 p.m. OK C++20 (GCC 13-64) TESTS 9 31 102400
325504499 nani_444 B June 22, 2025, 3:59 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325511926 dhruvrajdo005 B June 22, 2025, 5:52 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325511315 -0eiqe B June 22, 2025, 5:44 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325510097 harshtamrakar B June 22, 2025, 5:28 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325509692 gunnuhemanth B June 22, 2025, 5:23 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325509535 yashshvee_rana B June 22, 2025, 5:20 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325506843 Invincible108 B June 22, 2025, 4:40 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325505505 NazmulGo B June 22, 2025, 4:17 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325504339 ksrkasyap B June 22, 2025, 3:56 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
325499816 anthonyaaab123 B June 22, 2025, 2:34 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 0
325503088 amartya110 B June 22, 2025, 3:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 0
325509475 harshsirja B June 22, 2025, 5:19 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325509271 ItsRajRahul B June 22, 2025, 5:16 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325511823 Arxalier B June 22, 2025, 5:51 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325511602 Shams.t B June 22, 2025, 5:48 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325511298 Fookin_Blinders B June 22, 2025, 5:44 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325511254 horizon_7 B June 22, 2025, 5:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325511126 amansingh947667 B June 22, 2025, 5:42 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325510799 Jay_Varshney B June 22, 2025, 5:38 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
325468254 James_bond_9089 B June 21, 2025, 4:02 p.m. OK C# 8 TESTS 9 124 614400
325468516 Ashraf_HC B June 21, 2025, 4:03 p.m. OK GNU C11 TESTS 9 31 0
325468148 Flaming_pheonex B June 21, 2025, 4:02 p.m. OK GNU C11 TESTS 9 31 0
325473234 shubhamhubhai B June 21, 2025, 4:14 p.m. OK GNU C11 TESTS 9 31 102400
325472552 satya105 B June 21, 2025, 4:13 p.m. OK GNU C11 TESTS 9 46 0
325475621 Yumiowari B June 21, 2025, 4:21 p.m. OK GNU C11 TESTS 9 46 102400
325488979 BlueLiveWire B June 21, 2025, 5:41 p.m. OK GNU C11 TESTS 9 46 102400
325478407 hemantho1 B June 21, 2025, 4:28 p.m. OK GNU C11 TESTS 9 46 102400
325475262 Harin2205 B June 21, 2025, 4:20 p.m. OK GNU C11 TESTS 9 46 102400
325471506 raju016279 B June 21, 2025, 4:10 p.m. OK GNU C11 TESTS 9 46 102400
325470711 monish1406 B June 21, 2025, 4:08 p.m. OK GNU C11 TESTS 9 46 102400
325478354 Transformer911 B June 21, 2025, 4:28 p.m. OK Go TESTS 9 77 204800
325480815 MohamedElquesni B June 21, 2025, 4:33 p.m. OK Java 21 TESTS 9 233 512000
325500739 Bogys B June 22, 2025, 2:51 a.m. OK Java 21 TESTS 9 233 921600
325510577 fatal-98 B June 22, 2025, 5:35 a.m. OK Java 21 TESTS 9 234 512000
325467583 ash432 B June 21, 2025, 4:01 p.m. OK Java 21 TESTS 9 234 716800
325466250 MAFIA_GOD B June 21, 2025, 3:57 p.m. OK Java 21 TESTS 9 249 512000
325484860 pratham_engineer B June 21, 2025, 5:14 p.m. OK Java 21 TESTS 9 249 1126400
325473353 rakesh4030 B June 21, 2025, 4:15 p.m. OK Java 21 TESTS 9 249 1228800
325495260 vinay_panwar B June 21, 2025, 6:37 p.m. OK Java 21 TESTS 9 249 1945600
325475865 mohit_19 B June 21, 2025, 4:21 p.m. OK Java 21 TESTS 9 264 204800
325476264 Cartoonshow B June 21, 2025, 4:22 p.m. OK Java 21 TESTS 9 265 204800
325492755 Eslam_Ahmed B June 21, 2025, 6:12 p.m. OK Java 8 TESTS 9 140 0
325511683 yashbansal99 B June 22, 2025, 5:49 a.m. OK Java 8 TESTS 9 155 0
325476681 RebibeMeJett B June 21, 2025, 4:23 p.m. OK Java 8 TESTS 9 155 0
325508162 late_night_order B June 22, 2025, 5 a.m. OK Java 8 TESTS 9 171 0
325491989 skk_codes B June 21, 2025, 6:05 p.m. OK Java 8 TESTS 9 171 0
325486801 Purav_Shah07 B June 21, 2025, 5:25 p.m. OK Java 8 TESTS 9 171 0
325474016 Than1612 B June 21, 2025, 4:16 p.m. OK Java 8 TESTS 9 186 0
325477954 Krish_444 B June 21, 2025, 4:27 p.m. OK Java 8 TESTS 9 187 0
325467618 sohamkundu653 B June 21, 2025, 4:01 p.m. OK Java 8 TESTS 9 187 0
325473405 ArnavPandey B June 21, 2025, 4:15 p.m. OK Java 8 TESTS 9 202 0
325471648 AnatolyS B June 21, 2025, 4:10 p.m. OK Kotlin 1.9 TESTS 9 156 0
325476479 forkeon B June 21, 2025, 4:23 p.m. OK PyPy 3 TESTS 9 109 1638400
325477891 Yeswanth_teja B June 21, 2025, 4:26 p.m. OK PyPy 3 TESTS 9 140 4505600
325467548 bibiq B June 21, 2025, 4:01 p.m. OK PyPy 3 TESTS 9 155 3788800
325468926 Func-Z B June 21, 2025, 4:04 p.m. OK PyPy 3 TESTS 9 171 3788800
325479106 Cyros B June 21, 2025, 4:29 p.m. OK PyPy 3 TESTS 9 171 4096000
325484697 Raffas B June 21, 2025, 5:14 p.m. OK PyPy 3 TESTS 9 186 4505600
325471716 Dharanidharram B June 21, 2025, 4:11 p.m. OK PyPy 3 TESTS 9 202 3891200
325472101 naman.iitd28 B June 21, 2025, 4:11 p.m. OK PyPy 3 TESTS 9 203 4198400
325475718 SamuelMaltais B June 21, 2025, 4:21 p.m. OK PyPy 3 TESTS 9 218 4608000
325487037 gardengnome B June 21, 2025, 5:27 p.m. OK PyPy 3-64 TESTS 9 93 1433600
325469033 akshatgupta__ B June 21, 2025, 4:04 p.m. OK PyPy 3-64 TESTS 9 93 1536000
325469135 ChanduCforce B June 21, 2025, 4:04 p.m. OK PyPy 3-64 TESTS 9 93 1638400
325469965 fresh_tangerines B June 21, 2025, 4:06 p.m. OK PyPy 3-64 TESTS 9 93 2252800
325493429 wallfacer146 B June 21, 2025, 6:18 p.m. OK PyPy 3-64 TESTS 9 93 2457600
325497248 udayan8 B June 22, 2025, 1:47 a.m. OK PyPy 3-64 TESTS 9 93 3174400
325472591 Hozayfa B June 21, 2025, 4:13 p.m. OK PyPy 3-64 TESTS 9 108 1740800
325480606 nilan425 B June 21, 2025, 4:33 p.m. OK PyPy 3-64 TESTS 9 108 2252800
325489835 johnwilk_99 B June 21, 2025, 5:48 p.m. OK PyPy 3-64 TESTS 9 108 2457600
325502219 aashi2705 B June 22, 2025, 3:18 a.m. OK PyPy 3-64 TESTS 9 109 2150400
325472716 Arpitkush087 B June 21, 2025, 4:13 p.m. OK Python 2 TESTS 9 62 0
325469100 SanskarBurange B June 21, 2025, 4:04 p.m. OK Python 2 TESTS 9 93 0
325512273 sourav.codes B June 22, 2025, 5:57 a.m. OK Python 3 TESTS 9 62 204800
325511836 Thomas_Emad B June 22, 2025, 5:51 a.m. OK Python 3 TESTS 9 62 204800
325474225 31N B June 21, 2025, 4:17 p.m. OK Python 3 TESTS 9 62 204800
325498683 rh108796 B June 22, 2025, 2:21 a.m. OK Python 3 TESTS 9 62 307200
325486156 abhilasha_23 B June 21, 2025, 5:21 p.m. OK Python 3 TESTS 9 62 307200
325472253 Toxic_mate B June 21, 2025, 4:12 p.m. OK Python 3 TESTS 9 62 307200
325469554 catsicle.codes B June 21, 2025, 4:05 p.m. OK Python 3 TESTS 9 62 307200
325480806 vedant.s27 B June 21, 2025, 4:33 p.m. OK Python 3 TESTS 9 77 0
325507215 svrmalaviya B June 22, 2025, 4:46 a.m. OK Python 3 TESTS 9 77 204800
325473679 abhay_82 B June 21, 2025, 4:15 p.m. OK Python 3 TESTS 9 77 204800
325480151 XORcist010 B June 21, 2025, 4:32 p.m. OK Rust 2021 TESTS 9 46 0
325477237 blackpanther_7 B June 21, 2025, 4:25 p.m. OK Rust 2021 TESTS 9 61 102400
325466313 i-m-ag-e B June 21, 2025, 3:57 p.m. OK Rust 2021 TESTS 9 62 0
325468906 Singu_Larity B June 21, 2025, 4:04 p.m. OK Rust 2021 TESTS 9 62 102400

remove filters

Back to search problems