Codeforces Round 1046 (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
2136 Codeforces Round 1046 (Div. 2) FINISHED False 10800 20013923 Aug. 28, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 26012 ) A In the Dream PROGRAMMING greedy math

Two football teams, the RiOI team and the KDOI team, are about to have a football match. A football match consists of two halves — the first half and the second half. At the beginning of the match, both teams have a score of (0). As a fan of both teams, Aquawave knows that the two teams have similar levels, so neither team will score three consecutive goals in the same half . Aquawave had a dream the night before the match, in which: The score at the end of the first half was (a:b), where (a) is the score of the RiOI team, and (b) is the score of the KDOI team; And, the score at the end of the second half was (c:d), where (c) is the score of the RiOI team, and (d) is the score of the KDOI team. You have to determine whether Aquawave's dream can come true according to the above information. 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 only line of each test case contains four integers (a), (b), (c), and (d) ((0 \le a \le c \le 100), (0\le b \le d \le 100)) — the score at the end of the first half and the score at the end of the second half. For each test case, print " YES " if Aquawave's dream can come true. Otherwise, print " NO ". 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. We will use (R) to represent the RiOI team's goal, and (K) to represent the KDOI team's goal. In the first test case, the only goal order is: First half: (KKRKK). At the end of the first half, the score is (1:4); Second half: No goals. At the end of the second half, the score is still (1:4). In the second test case, the only goal order is: First half: (RRKRR). At the end of the first half, the score is (4:1); Second half: No goals. A

Tutorials

Codeforces Round 1046 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
336060744 remantadin A Aug. 28, 2025, 9:25 p.m. OK C# 13 TESTS 4 93 102400
336082122 Nurex_001 A Aug. 29, 2025, 4:41 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
336080743 dj2005 A Aug. 29, 2025, 4:20 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
336079869 AdSaw05_ A Aug. 29, 2025, 4:07 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
336069052 sakibAnsary A Aug. 29, 2025, 1:07 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
336068777 SURPERTX A Aug. 29, 2025, 1:01 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
336041291 ErenBhai A Aug. 28, 2025, 5:27 p.m. OK C++17 (GCC 7-32) TESTS 4 30 0
336088060 youssefsayed14 A Aug. 29, 2025, 5:48 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
336087529 Raj1245 A Aug. 29, 2025, 5:43 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
336082638 HeetShah_456 A Aug. 29, 2025, 4:47 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
336080474 yok939 A Aug. 29, 2025, 4:16 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
336088081 ELSE_IF_TRIDIB21 A Aug. 29, 2025, 5:49 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
336087524 Alonse_wa KNAMX A Aug. 29, 2025, 5:43 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
336083508 xACE_ A Aug. 29, 2025, 5 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
336083327 DawlyRajput_24 A Aug. 29, 2025, 4:57 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
336080437 key_anemoi A Aug. 29, 2025, 4:15 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
336086729 anoslide A Aug. 29, 2025, 5:34 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
336083345 SabrinaSakander A Aug. 29, 2025, 4:58 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
336077584 Alex_Sense1 A Aug. 29, 2025, 3:32 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
336076899 prince19k A Aug. 29, 2025, 3:22 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
336071990 3123001932 A Aug. 29, 2025, 2:05 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
336087644 Mohammad_Shuvon A Aug. 29, 2025, 5:44 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336083120 Jaya_consistency A Aug. 29, 2025, 4:54 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336077339 nurikgod A Aug. 29, 2025, 3:28 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336076917 7plus6 A Aug. 29, 2025, 3:22 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336072025 waqlws A Aug. 29, 2025, 2:06 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336066107 Rashed_Raiyan_ A Aug. 28, 2025, 11:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336055652 pstu-Sadman A Aug. 28, 2025, 8:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336053954 smartone A Aug. 28, 2025, 7:49 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
336089668 bnsczr A Aug. 29, 2025, 6:06 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
336089146 origamyee A Aug. 29, 2025, 6 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
336077804 Rayid4130_sust A Aug. 29, 2025, 3:35 a.m. OK GNU C11 TESTS 4 30 0
336030697 Sakib65 A Aug. 28, 2025, 4:57 p.m. OK GNU C11 TESTS 4 30 102400
336076956 abdul.ahad.000.313 A Aug. 29, 2025, 3:23 a.m. OK GNU C11 TESTS 4 31 0
336029455 aayushkanade29 A Aug. 28, 2025, 4:54 p.m. OK GNU C11 TESTS 4 31 0
336087764 Veritasium_ A Aug. 29, 2025, 5:45 a.m. OK GNU C11 TESTS 4 31 102400
336088635 krishnajaj_24 A Aug. 29, 2025, 5:55 a.m. OK GNU C11 TESTS 4 46 0
336043508 Akshith_28 A Aug. 28, 2025, 5:33 p.m. OK GNU C11 TESTS 4 46 0
336042148 Weasly_04 A Aug. 28, 2025, 5:30 p.m. OK GNU C11 TESTS 4 46 0
336027772 rohan9077 A Aug. 28, 2025, 4:49 p.m. OK GNU C11 TESTS 4 62 0
336051857 siam17_s0 A Aug. 28, 2025, 7:29 p.m. OK GNU C11 TESTS 4 77 102400
336057438 uffhottie A Aug. 28, 2025, 8:31 p.m. OK Go TESTS 4 46 0
336076604 tahsin_ferdous A Aug. 29, 2025, 3:18 a.m. OK Go TESTS 4 62 102400
336085003 NpHardcore_05 A Aug. 29, 2025, 5:18 a.m. OK Java 21 TESTS 4 187 512000
336066365 MeanMachin A Aug. 28, 2025, 11:51 p.m. OK Java 21 TESTS 4 202 204800
336089425 Aaditysa01sehgal A Aug. 29, 2025, 6:03 a.m. OK Java 21 TESTS 4 202 614400
336085387 vedant_shukla A Aug. 29, 2025, 5:22 a.m. OK Java 21 TESTS 4 218 102400
336078422 DJ1007 A Aug. 29, 2025, 3:44 a.m. OK Java 21 TESTS 4 218 614400
336040560 swarnendu_maity A Aug. 28, 2025, 5:25 p.m. OK Java 21 TESTS 4 218 921600
336051444 amansheo A Aug. 28, 2025, 7:26 p.m. OK Java 21 TESTS 4 234 0
336083868 Md_Toushif A Aug. 29, 2025, 5:04 a.m. OK Java 21 TESTS 4 234 102400
336062603 qavkour A Aug. 28, 2025, 10:05 p.m. OK Java 21 TESTS 4 234 1024000
336029892 bhargav_rao_07 A Aug. 28, 2025, 4:55 p.m. OK Java 21 TESTS 4 249 0
336081201 adibhai0845R A Aug. 29, 2025, 4:27 a.m. OK Java 8 TESTS 4 140 0
336061797 Akshatgupta069_069 A Aug. 28, 2025, 9:46 p.m. OK Java 8 TESTS 4 140 0
336070665 guangmeinh A Aug. 29, 2025, 1:43 a.m. OK Java 8 TESTS 4 156 0
336039931 aashik2005 A Aug. 28, 2025, 5:23 p.m. OK Java 8 TESTS 4 156 0
336036732 bhanusoftwareeng A Aug. 28, 2025, 5:14 p.m. OK Java 8 TESTS 4 156 0
336088900 yamunesh2005 A Aug. 29, 2025, 5:58 a.m. OK Java 8 TESTS 4 171 0
336080559 krish-117 A Aug. 29, 2025, 4:17 a.m. OK Java 8 TESTS 4 171 0
336033550 vidhusan17 A Aug. 28, 2025, 5:05 p.m. OK Java 8 TESTS 4 171 0
336028812 Dev_Udit A Aug. 28, 2025, 4:52 p.m. OK Java 8 TESTS 4 171 0
336028094 mithraacct A Aug. 28, 2025, 4:50 p.m. OK Java 8 TESTS 4 171 0
336027649 Homka_666 A Aug. 28, 2025, 4:49 p.m. OK Node.js TESTS 4 124 716800
336067558 swseverance A Aug. 29, 2025, 12:28 a.m. OK Node.js TESTS 4 139 2150400
336027876 madison_sweeny A Aug. 28, 2025, 4:50 p.m. OK PyPy 2 TESTS 4 140 102400
336031498 yadav.akshat0987 A Aug. 28, 2025, 4:59 p.m. OK PyPy 3 TESTS 4 124 2662400
336053174 not_MAHIM A Aug. 28, 2025, 7:42 p.m. OK PyPy 3 TESTS 4 140 2662400
336029227 tejaswinithotla08 A Aug. 28, 2025, 4:53 p.m. OK PyPy 3 TESTS 4 140 2867200
336028552 _PD_ A Aug. 28, 2025, 4:51 p.m. OK PyPy 3 TESTS 4 218 4812800
336041791 cute_c A Aug. 28, 2025, 5:29 p.m. OK PyPy 3-64 TESTS 4 77 1433600
336030229 developermohammed01 A Aug. 28, 2025, 4:56 p.m. OK PyPy 3-64 TESTS 4 77 1433600
336068950 manoharsingh2402 A Aug. 29, 2025, 1:05 a.m. OK PyPy 3-64 TESTS 4 78 1433600
336027074 blue9 A Aug. 28, 2025, 4:48 p.m. OK PyPy 3-64 TESTS 4 92 1331200
336077431 LukaMagic A Aug. 29, 2025, 3:30 a.m. OK PyPy 3-64 TESTS 4 92 1433600
336074344 yinghon101033 A Aug. 29, 2025, 2:42 a.m. OK PyPy 3-64 TESTS 4 92 1433600
336088149 Om_Singh_ A Aug. 29, 2025, 5:49 a.m. OK PyPy 3-64 TESTS 4 93 1331200
336082465 Rudra_Dudhat A Aug. 29, 2025, 4:45 a.m. OK PyPy 3-64 TESTS 4 93 1433600
336073251 anish.t22 A Aug. 29, 2025, 2:27 a.m. OK PyPy 3-64 TESTS 4 93 1433600
336065860 Ray147 A Aug. 28, 2025, 11:34 p.m. OK PyPy 3-64 TESTS 4 93 1433600
336078626 kushsaraf A Aug. 29, 2025, 3:48 a.m. OK Python 3 TESTS 4 61 0
336069603 .K.Hemanth A Aug. 29, 2025, 1:21 a.m. OK Python 3 TESTS 4 61 0
336064718 bking99 A Aug. 28, 2025, 11 p.m. OK Python 3 TESTS 4 61 0
336039888 maanavvbhat A Aug. 28, 2025, 5:23 p.m. OK Python 3 TESTS 4 61 0
336076161 bkdn25.kienlantinh A Aug. 29, 2025, 3:12 a.m. OK Python 3 TESTS 4 61 102400
336082164 SAYEM234 A Aug. 29, 2025, 4:41 a.m. OK Python 3 TESTS 4 62 0
336081552 netcat A Aug. 29, 2025, 4:32 a.m. OK Python 3 TESTS 4 62 0
336070936 hieu112001 A Aug. 29, 2025, 1:49 a.m. OK Python 3 TESTS 4 62 0
336065090 debmalya A Aug. 28, 2025, 11:12 p.m. OK Python 3 TESTS 4 62 0
336052970 paneerpulao A Aug. 28, 2025, 7:40 p.m. OK Python 3 TESTS 4 62 0
336068443 lyteabovenyte A Aug. 29, 2025, 12:52 a.m. OK Rust 2021 TESTS 4 46 0
336058320 notarmen A Aug. 28, 2025, 8:43 p.m. OK Rust 2021 TESTS 4 62 0

remove filters

Back to search problems