Educational Codeforces Round 178 (Rated for 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
2104 Educational Codeforces Round 178 (Rated for Div. 2) FINISHED False 7200 30554723 April 28, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 26171 ) A Three Decks PROGRAMMING math

Monocarp placed three decks of cards in a row on the table. The first deck consists of (a) cards, the second deck consists of (b) cards, and the third deck consists of (c) cards, with the condition (a < b < c). Monocarp wants to take some number of cards (at least one, but no more than (c)) from the third deck and distribute them between the first two decks so that each of the taken cards ends up in either the first or the second deck. It is possible that all the cards taken from the third deck will go into the same deck. Your task is to determine whether Monocarp can make the number of cards in all three decks equal using the described operation. The first line contains a single integer (t) ((1 \le t \le 10^4)) — the number of test cases. The only line of each test case contains three integers (a, b), and (c) ((1 \le a, b, c \le 10^8)) — the number of cards in the first, second, and third decks, respectively. Additional constraint on the input: (a < b < c). For each test case, output " YES " (without quotes) if Monocarp can make the number of cards in all three decks equal using the described operation. Otherwise, output " NO " (without quotes). In the first test case, Monocarp has to take (4) cards from the third deck, put (3) cards in the first deck, and (1) card in the second deck. Thus, there will be (6) cards in all three decks. In the second test case, it is impossible to make the number of cards in all three decks equal. In the third test case, Monocarp has to take (2) cards from the third deck and put both in the first deck. Thus, there will be (5) cards in all three decks. In the fourth test case, it is also impossible to make the number of cards in all three decks equal.

Tutorials

Educational Codeforces Round 178 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
317670010 A1ternate A April 28, 2025, 7:33 p.m. OK C# 10 TESTS 2 93 1945600
317698099 tamim2007009 A April 29, 2025, 5:38 a.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317695907 AsadGalib A April 29, 2025, 5:09 a.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317690823 rating_gone A April 29, 2025, 3:34 a.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317674330 Owv A April 28, 2025, 8:36 p.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317668010 aspire_1110 A April 28, 2025, 7:11 p.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317663984 MONA7124 A April 28, 2025, 6:23 p.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317661011 Firdous19 A April 28, 2025, 5:56 p.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317660400 AdSaw05_ A April 28, 2025, 5:51 p.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317657194 KrishnaSh1355 A April 28, 2025, 5:23 p.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317645935 jived1224 A April 28, 2025, 4:20 p.m. OK C++17 (GCC 7-32) TESTS 2 30 0
317693473 JeeveshMittal A April 29, 2025, 4:26 a.m. OK C++20 (GCC 13-64) TESTS 2 15 0
317690149 lakshmankattunga A April 29, 2025, 3:20 a.m. OK C++20 (GCC 13-64) TESTS 2 15 0
317698294 Sahriar_Ahmed A April 29, 2025, 5:40 a.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317694851 _mirror A April 29, 2025, 4:52 a.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317673621 QuinnG A April 28, 2025, 8:25 p.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317664525 5am__Arpit A April 28, 2025, 6:29 p.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317661125 BeGukesh A April 28, 2025, 5:57 p.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317659747 francarthery A April 28, 2025, 5:45 p.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317659363 stcksmsh A April 28, 2025, 5:42 p.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317659215 vasu_tayal A April 28, 2025, 5:41 p.m. OK C++20 (GCC 13-64) TESTS 2 30 0
317672253 Bleuewoosh A April 28, 2025, 8:04 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 15 0
317666415 AmirRamez A April 28, 2025, 6:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 15 0
317693221 Marckess A April 29, 2025, 4:21 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317690903 bibibibi A April 29, 2025, 3:36 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317685286 shishi_maru A April 29, 2025, 1:24 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317680786 Mrinal_Kanti A April 28, 2025, 11:05 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317674807 Maryam_Haytham A April 28, 2025, 8:45 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317668289 Ali_Hany A April 28, 2025, 7:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317660944 Arif_0.1 A April 28, 2025, 5:55 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317660629 SultanAbbas A April 28, 2025, 5:53 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 30 0
317694319 tkddn5623 A April 29, 2025, 4:42 a.m. OK GNU C11 TESTS 2 30 102400
317686209 konziyue A April 29, 2025, 1:49 a.m. OK GNU C11 TESTS 2 61 0
317683438 wolfie42 A April 29, 2025, 12:32 a.m. OK GNU C11 TESTS 2 61 0
317655333 Toffeek A April 28, 2025, 5:10 p.m. OK GNU C11 TESTS 2 61 0
317683992 Ahmed_Ragib A April 29, 2025, 12:48 a.m. OK GNU C11 TESTS 2 62 0
317652530 mehmedtwo A April 28, 2025, 4:34 p.m. OK GNU C11 TESTS 2 62 0
317646875 Navya_Bhavana A April 28, 2025, 4:22 p.m. OK GNU C11 TESTS 2 62 102400
317646705 Nakib93 A April 28, 2025, 4:22 p.m. OK GNU C11 TESTS 2 77 0
317693241 sanjith0206 A April 29, 2025, 4:21 a.m. OK GNU C11 TESTS 2 77 102400
317648649 samira4 A April 28, 2025, 4:26 p.m. OK GNU C11 TESTS 2 77 102400
317660691 perlentaucher A April 28, 2025, 5:53 p.m. OK Go TESTS 2 46 716800
317683967 tahsin_ferdous A April 29, 2025, 12:47 a.m. OK Go TESTS 2 61 614400
317675447 bomakhamchha A April 28, 2025, 8:56 p.m. OK Java 21 TESTS 2 156 614400
317672533 Master_Shifu46 A April 28, 2025, 8:09 p.m. OK Java 21 TESTS 2 171 204800
317687659 Freedom_lifelong A April 29, 2025, 2:25 a.m. OK Java 21 TESTS 2 218 409600
317682946 The_Conqueror_31.7 A April 29, 2025, 12:16 a.m. OK Java 21 TESTS 2 218 512000
317660090 vineet28sept A April 28, 2025, 5:48 p.m. OK Java 21 TESTS 2 218 716800
317692294 tareq41 A April 29, 2025, 4:02 a.m. OK Java 21 TESTS 2 233 921600
317673878 jerdno A April 28, 2025, 8:29 p.m. OK Java 21 TESTS 2 234 102400
317645734 diringn A April 28, 2025, 4:19 p.m. OK Java 21 TESTS 2 234 409600
317691309 yenugantirahul A April 29, 2025, 3:43 a.m. OK Java 21 TESTS 2 249 0
317668437 Vengeance_6 A April 28, 2025, 7:15 p.m. OK Java 21 TESTS 2 249 921600
317669694 Pranav_45 A April 28, 2025, 7:29 p.m. OK Java 8 TESTS 2 140 0
317655603 Akshatgupta069_069 A April 28, 2025, 5:12 p.m. OK Java 8 TESTS 2 171 0
317692846 codexzx A April 29, 2025, 4:13 a.m. OK Java 8 TESTS 2 187 0
317649560 yashu_rai A April 28, 2025, 4:29 p.m. OK Java 8 TESTS 2 187 0
317694426 hemananda A April 29, 2025, 4:44 a.m. OK Java 8 TESTS 2 217 0
317667433 ayush_porwal A April 28, 2025, 7:05 p.m. OK Java 8 TESTS 2 217 0
317656786 kalpesh05 A April 28, 2025, 5:20 p.m. OK Java 8 TESTS 2 217 0
317647510 darshini05 A April 28, 2025, 4:24 p.m. OK Java 8 TESTS 2 217 0
317698257 dassayak243 A April 29, 2025, 5:40 a.m. OK Java 8 TESTS 2 218 0
317684534 warframe A April 29, 2025, 1:04 a.m. OK Java 8 TESTS 2 218 0
317650519 iitamansharma A April 28, 2025, 4:31 p.m. OK Kotlin 1.9 TESTS 2 265 0
317649401 dioxkjpde A April 28, 2025, 4:28 p.m. OK Mono C# TESTS 2 93 2662400
317677163 mythicalrocket A April 28, 2025, 9:32 p.m. OK PyPy 3 TESTS 2 109 4198400
317669669 _NATHAN A April 28, 2025, 7:29 p.m. OK PyPy 3 TESTS 2 140 5836800
317656189 koninklijke A April 28, 2025, 5:15 p.m. OK PyPy 3 TESTS 2 187 6041600
317666277 Harru A April 28, 2025, 6:52 p.m. OK PyPy 3 TESTS 2 218 6144000
317667695 thinkphp A April 28, 2025, 7:07 p.m. OK PyPy 3 TESTS 2 233 6144000
317666453 QBit_Enigma A April 28, 2025, 6:54 p.m. OK PyPy 3 TESTS 2 249 6144000
317678704 adem1234 A April 28, 2025, 10:12 p.m. OK PyPy 3 TESTS 2 280 6553600
317688386 hxu10 A April 29, 2025, 2:42 a.m. OK PyPy 3-64 TESTS 2 62 3174400
317698453 gardengnome A April 29, 2025, 5:42 a.m. OK PyPy 3-64 TESTS 2 92 2764800
317699724 aaquibahm A April 29, 2025, 5:56 a.m. OK PyPy 3-64 TESTS 2 93 3276800
317699919 N1664 A April 29, 2025, 5:58 a.m. OK PyPy 3-64 TESTS 2 93 3379200
317698817 Euler06 A April 29, 2025, 5:46 a.m. OK PyPy 3-64 TESTS 2 93 3481600
317688400 M0u1ea5 A April 29, 2025, 2:42 a.m. OK PyPy 3-64 TESTS 2 93 3788800
317687561 EIR94326 A April 29, 2025, 2:23 a.m. OK PyPy 3-64 TESTS 2 108 3891200
317642295 Mafruda14 A April 28, 2025, 4:11 p.m. OK PyPy 3-64 TESTS 2 109 3481600
317671724 azerbenmed1730 A April 28, 2025, 7:55 p.m. OK PyPy 3-64 TESTS 2 109 3993600
317696653 patjunyu A April 29, 2025, 5:20 a.m. OK PyPy 3-64 TESTS 2 109 4403200
317646891 Mash_Mehedi_2 A April 28, 2025, 4:22 p.m. OK Python 3 TESTS 2 46 0
317647996 bryson605650 A April 28, 2025, 4:25 p.m. OK Python 3 TESTS 2 46 307200
317686171 Rivdo A April 29, 2025, 1:48 a.m. OK Python 3 TESTS 2 61 204800
317666335 DesiCoder A April 28, 2025, 6:53 p.m. OK Python 3 TESTS 2 61 409600
317651676 buckshotslowbang72 A April 28, 2025, 4:33 p.m. OK Python 3 TESTS 2 62 0
317643003 Jaardo A April 28, 2025, 4:12 p.m. OK Python 3 TESTS 2 62 102400
317643382 chance994342 A April 28, 2025, 4:13 p.m. OK Python 3 TESTS 2 62 204800
317641997 yuzqvedkom A April 28, 2025, 4:10 p.m. OK Python 3 TESTS 2 62 307200
317689601 TheGreatRay A April 29, 2025, 3:08 a.m. OK Python 3 TESTS 2 77 0
317650708 epic_1838 A April 28, 2025, 4:31 p.m. OK Python 3 TESTS 2 77 0
317671505 vstiff A April 28, 2025, 7:52 p.m. OK Rust 2021 TESTS 2 46 102400
317693556 silicalet A April 29, 2025, 4:28 a.m. OK Rust 2021 TESTS 2 61 0
317681405 SamuelLH A April 28, 2025, 11:24 p.m. OK Rust 2021 TESTS 2 61 0

remove filters

Back to search problems