Codeforces Round 1031 (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
2113 Codeforces Round 1031 (Div. 2) FINISHED False 7200 26427323 June 15, 2025, 9:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 14528 ) B Good Start PROGRAMMING math

The roof is a rectangle of size (w \times h) with the bottom left corner at the point ((0, 0)) on the plane. Your team needs to completely cover this roof with identical roofing sheets of size (a \times b), with the following conditions: The sheets cannot be rotated (not even by (90^\circ)). The sheets must not overlap (but they can touch at the edges). The sheets can extend beyond the boundaries of the rectangular roof. A novice from your team has already placed two such sheets on the roof in such a way that the sheets do not overlap and each of them partially covers the roof . Your task is to determine whether it is possible to completely tile the roof without removing either of the two already placed sheets. 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. The first line of each test case contains four integers (w), (h), (a), and (b) ((1 \le w, h, a, b \le 10^9)) — the dimensions of the roof and the dimensions of the roofing sheets, respectively. The second line of each test case contains four integers (x_1), (y_1), (x_2), and (y_2) ((-a + 1 \le x_1, x_2 \le w - 1, -b + 1 \le y_1, y_2 \le h - 1)) — the coordinates of the bottom left corners of the already placed roofing sheets. It is guaranteed that these sheets do not overlap. For each test case, output " Yes " (without quotes) if it is possible to completely tile the roof without removing either of the two already placed tiles, and " No " (without quotes) otherwise. You can output the answer in any case (upper or lower). For example, the strings " yEs ", " yes ", " Yes ", and " YES " will be recognized as positive responses. In the first test case, it is possible to add (8) roofing sheets as follows: In the second test case, it is impossible to completely tile the roof:

Tutorials

Codeforces Round #1031 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
324518149 og.kostya B June 15, 2025, 11:47 a.m. OK C# 13 TESTS 7 93 0
324598264 ShenB B June 16, 2025, 5:49 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324584024 beta-ori B June 16, 2025, 2:42 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324581575 qwerdkr B June 16, 2025, 1:56 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324580539 tnakao B June 16, 2025, 1:34 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324578598 zh1221qwq B June 16, 2025, 12:45 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324576893 jqSnowz B June 15, 2025, 11:35 p.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324545163 ChardiKaala B June 15, 2025, 3:40 p.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324516604 laziest026 B June 15, 2025, 11:33 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324515863 practice-id B June 15, 2025, 11:27 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324509533 TrungCr7 B June 15, 2025, 10:57 a.m. OK C++17 (GCC 7-32) TESTS 7 46 0
324594125 Krritin B June 16, 2025, 4:54 a.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324581836 angelachang27 B June 16, 2025, 2:01 a.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324580519 Meltrysaika B June 16, 2025, 1:34 a.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324573592 amogh_jalan B June 15, 2025, 9:42 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324568674 Interstellar001 B June 15, 2025, 7:56 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324565280 ca_09_04 B June 15, 2025, 7:01 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324564349 re-wa-tl-ok B June 15, 2025, 6:49 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324557313 dougalves B June 15, 2025, 5:34 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324545127 anuragK2204 B June 15, 2025, 3:40 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324542866 der_Schwartz_knight B June 15, 2025, 3:21 p.m. OK C++20 (GCC 13-64) TESTS 7 46 0
324597535 om_biradar B June 16, 2025, 5:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324596891 SHUBHAM_SINGH_PATEL__ B June 16, 2025, 5:31 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324595265 21cs02001 B June 16, 2025, 5:11 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324594920 isani_alis B June 16, 2025, 5:06 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324593590 KA-terrarian B June 16, 2025, 4:45 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324593521 LenmoChicken B June 16, 2025, 4:44 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324592415 Harsh_Lembhe18 B June 16, 2025, 4:27 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324591974 nbzzz B June 16, 2025, 4:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324587550 codingthunder123 B June 16, 2025, 3:28 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324585326 SillyWilburHZT B June 16, 2025, 3:02 a.m. OK C++23 (GCC 14-64, msys2) TESTS 7 46 0
324580710 shubhayandas2004 B June 16, 2025, 1:38 a.m. OK GNU C11 TESTS 7 77 102400
324539544 ch.jyothirmayi B June 15, 2025, 2:54 p.m. OK GNU C11 TESTS 7 77 102400
324515897 Mridul_Garg B June 15, 2025, 11:28 a.m. OK GNU C11 TESTS 7 92 102400
324531915 rayahazari B June 15, 2025, 1:44 p.m. OK GNU C11 TESTS 7 93 102400
324518124 IseriNina27 B June 15, 2025, 11:47 a.m. OK GNU C11 TESTS 7 93 102400
324519414 krishnabahetra B June 15, 2025, 11:59 a.m. OK GNU C11 TESTS 7 108 0
324508583 saiabhinay0607 B June 15, 2025, 10:55 a.m. OK GNU C11 TESTS 7 108 102400
324570118 pinkcantcode B June 15, 2025, 8:22 p.m. OK GNU C11 TESTS 7 124 102400
324525842 Harin2205 B June 15, 2025, 12:43 p.m. OK GNU C11 TESTS 7 140 102400
324516137 guharoypragyayan B June 15, 2025, 11:29 a.m. OK Java 21 TESTS 7 202 614400
324590803 tekka_ity B June 16, 2025, 4:07 a.m. OK Java 21 TESTS 7 218 921600
324557624 nio2004 B June 15, 2025, 5:38 p.m. OK Java 21 TESTS 7 234 512000
324527413 gb1789 B June 15, 2025, 1 p.m. OK Java 21 TESTS 7 249 614400
324566438 d1n0Codes B June 15, 2025, 7:18 p.m. OK Java 21 TESTS 7 249 921600
324569313 swatishivam23 B June 15, 2025, 8:06 p.m. OK Java 21 TESTS 7 265 921600
324594958 NpHardcore_05 B June 16, 2025, 5:06 a.m. OK Java 21 TESTS 7 280 614400
324551070 InfusedParticle B June 15, 2025, 4:33 p.m. OK Java 21 TESTS 7 280 921600
324523239 snehakanodia4 B June 15, 2025, 12:18 p.m. OK Java 21 TESTS 7 280 42496000
324552058 Balu2907 B June 15, 2025, 4:42 p.m. OK Java 21 TESTS 7 296 1331200
324564211 abhayrajnegi0416 B June 15, 2025, 6:48 p.m. OK Java 8 TESTS 7 202 0
324568651 Sumitsingh7 B June 15, 2025, 7:55 p.m. OK Java 8 TESTS 7 249 6758400
324550714 killer4639 B June 15, 2025, 4:29 p.m. OK Java 8 TESTS 7 280 0
324530284 phoenix_beast117 B June 15, 2025, 1:29 p.m. OK Java 8 TESTS 7 281 0
324560298 ashishkushwah179 B June 15, 2025, 6:05 p.m. OK Java 8 TESTS 7 296 0
324533940 saxenaanandita76 B June 15, 2025, 2:03 p.m. OK Java 8 TESTS 7 296 0
324532247 warframe B June 15, 2025, 1:47 p.m. OK Java 8 TESTS 7 296 0
324532144 warframe B June 15, 2025, 1:46 p.m. OK Java 8 TESTS 7 296 0
324517445 reena1410_ B June 15, 2025, 11:40 a.m. OK Java 8 TESTS 7 296 0
324509015 goyalparshant362 B June 15, 2025, 10:56 a.m. OK Java 8 TESTS 7 311 0
324545857 _Zuno_ B June 15, 2025, 3:46 p.m. OK Node.js TESTS 7 155 7987200
324549845 gopikrishna9968 B June 15, 2025, 4:21 p.m. OK PyPy 3 TESTS 7 280 9830400
324568698 pTaran17 B June 15, 2025, 7:56 p.m. OK PyPy 3 TESTS 7 328 10137600
324565519 gopikrishna9968 B June 15, 2025, 7:05 p.m. OK PyPy 3 TESTS 7 343 10137600
324508632 i_am_rohith123 B June 15, 2025, 10:55 a.m. OK PyPy 3 TESTS 7 390 9932800
324546750 Denis_D B June 15, 2025, 3:54 p.m. OK PyPy 3 TESTS 7 436 9420800
324519470 codsila B June 15, 2025, 11:59 a.m. OK PyPy 3 TESTS 7 437 9830400
324510925 KishoreKartik B June 15, 2025, 11:01 a.m. OK PyPy 3 TESTS 7 452 9830400
324551834 mrvandana B June 15, 2025, 4:40 p.m. OK PyPy 3 TESTS 7 453 10342400
324558848 yin_yin81 B June 15, 2025, 5:49 p.m. OK PyPy 3 TESTS 7 468 9932800
324523907 gardengnome B June 15, 2025, 12:25 p.m. OK PyPy 3-64 TESTS 7 125 5120000
324529388 serazussalekinsamin B June 15, 2025, 1:20 p.m. OK PyPy 3-64 TESTS 7 140 3788800
324568971 Deecey01 B June 15, 2025, 8:01 p.m. OK PyPy 3-64 TESTS 7 140 6860800
324528493 alexwice B June 15, 2025, 1:12 p.m. OK PyPy 3-64 TESTS 7 140 7168000
324516730 NeuralG B June 15, 2025, 11:34 a.m. OK PyPy 3-64 TESTS 7 155 7372800
324519467 KudoConan B June 15, 2025, 11:59 a.m. OK PyPy 3-64 TESTS 7 171 6860800
324546946 lwenkai B June 15, 2025, 3:56 p.m. OK PyPy 3-64 TESTS 7 186 9011200
324507931 elioing B June 15, 2025, 10:53 a.m. OK PyPy 3-64 TESTS 7 187 7372800
324510331 sadqubit B June 15, 2025, 10:59 a.m. OK PyPy 3-64 TESTS 7 187 8294400
324518506 R_A_Saha B June 15, 2025, 11:50 a.m. OK PyPy 3-64 TESTS 7 187 8704000
324508111 ProthamD B June 15, 2025, 10:53 a.m. OK Python 2 TESTS 7 140 0
324557381 rathodfahim B June 15, 2025, 5:35 p.m. OK Python 3 TESTS 7 77 512000
324510811 falsaI B June 15, 2025, 11 a.m. OK Python 3 TESTS 7 92 614400
324510984 Dracharys B June 15, 2025, 11:01 a.m. OK Python 3 TESTS 7 93 307200
324527440 date727 B June 15, 2025, 1 p.m. OK Python 3 TESTS 7 93 409600
324552418 Ekshith B June 15, 2025, 4:45 p.m. OK Python 3 TESTS 7 93 614400
324512071 nishantmeena031 B June 15, 2025, 11:03 a.m. OK Python 3 TESTS 7 93 614400
324527368 date727 B June 15, 2025, 12:59 p.m. OK Python 3 TESTS 7 108 409600
324508496 ch22b066 B June 15, 2025, 10:54 a.m. OK Python 3 TESTS 7 108 512000
324507678 Akshat_Lakhera B June 15, 2025, 10:52 a.m. OK Python 3 TESTS 7 108 614400
324597919 harishkeerthimaans B June 16, 2025, 5:45 a.m. OK Python 3 TESTS 7 109 307200
324509671 vlearnsrust B June 15, 2025, 10:57 a.m. OK Rust 2021 TESTS 7 93 0

remove filters

Back to search problems