Educational Codeforces Round 156 (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
1886 Educational Codeforces Round 156 (Rated for Div. 2) FINISHED False 7200 34961099 Oct. 9, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 25983 ) A Sum of Three PROGRAMMING brute force constructive algorithms math

B'Monocarp has an integer n . He wants to represent his number as a sum of three distinct positive integers x , y , and z . Additionally, Monocarp wants none of the numbers x , y , and z to be divisible by 3 . Your task is to help Monocarp to find any valid triplet of distinct positive integers x , y , and z , or report that such a triplet does not exist. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The only line of each testcase contains a single integer n ( 1 <= n <= 10^{9} ). For each testcase, if there is no valid triplet x , y , and z , print NO on the first line. Otherwise, print YES on the first line. On the second line, print any valid triplet of distinct positive integers x , y , and z such that x + y + z = n , and none of the printed numbers are divisible by 3 . If there are multiple valid triplets, you can print any of them. In the first testcase, one of the valid triplets is x = 4 , y = 5 , z = 1 . None of these numbers are divisible by three, and 4 + 5 + 1 = 10 . In the second testcase, there is no valid triplet. In the third testcase, one of the valid triplets is x = 2 , y = 8 , z = 5 . None of these numbers are divisible by three, and 2 + 8 + 5 = 15 . In the fourth testcase, there is no valid triplet. '...

Tutorials

Educational Codeforces Round 156 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
227439784 Sharpyn_Elmor A Oct. 9, 2023, 6:01 p.m. OK C# 10 TESTS 2 30 1024000
227452524 world_of_only_victors A Oct. 9, 2023, 7:59 p.m. OK C# 10 TESTS 2 93 512000
227460181 bluemegane A Oct. 9, 2023, 9:52 p.m. OK C# 8 TESTS 2 124 512000
227481297 Buu01 A Oct. 10, 2023, 4:57 a.m. OK Clang++20 Diagnostics TESTS 2 93 0
227452424 Adeer_Bakht A Oct. 9, 2023, 7:58 p.m. OK Clang++20 Diagnostics TESTS 2 156 0
227443249 Who_cares_for_me A Oct. 9, 2023, 6:28 p.m. OK Clang++20 Diagnostics TESTS 2 233 0
227435483 obineninithin8 A Oct. 9, 2023, 5:31 p.m. OK Clang++20 Diagnostics TESTS 2 233 0
227432930 Mubshin A Oct. 9, 2023, 5:15 p.m. OK GNU C11 TESTS 2 46 0
227443333 Hacker_3.0 A Oct. 9, 2023, 6:29 p.m. OK GNU C11 TESTS 2 46 0
227441728 Prakshal A Oct. 9, 2023, 6:16 p.m. OK GNU C11 TESTS 2 46 0
227479559 reinvigorated_life A Oct. 10, 2023, 4:34 a.m. OK GNU C11 TESTS 2 46 0
227433499 turjooo A Oct. 9, 2023, 5:18 p.m. OK GNU C11 TESTS 2 61 0
227482568 Yeasir10967 A Oct. 10, 2023, 5:12 a.m. OK GNU C11 TESTS 2 61 0
227482820 rsThrill A Oct. 10, 2023, 5:15 a.m. OK GNU C11 TESTS 2 61 0
227465127 magyoumi A Oct. 10, 2023, 12:21 a.m. OK GNU C11 TESTS 2 62 0
227465726 pnS73fm A Oct. 10, 2023, 12:36 a.m. OK GNU C11 TESTS 2 62 0
227430294 turjooo A Oct. 9, 2023, 5 p.m. OK GNU C11 TESTS 2 62 0
227437331 rsanshu A Oct. 9, 2023, 5:45 p.m. OK GNU C++14 TESTS 2 0 0
227444738 Playhouse A Oct. 9, 2023, 6:41 p.m. OK GNU C++14 TESTS 2 0 0
227464421 kifuan A Oct. 9, 2023, 11:59 p.m. OK GNU C++14 TESTS 2 0 0
227464976 Guitar_Jasmine A Oct. 10, 2023, 12:17 a.m. OK GNU C++14 TESTS 2 0 0
227467645 _ygj A Oct. 10, 2023, 1:20 a.m. OK GNU C++14 TESTS 2 0 0
227470219 chenyanxi A Oct. 10, 2023, 2:12 a.m. OK GNU C++14 TESTS 2 0 0
227471550 napgod_pk A Oct. 10, 2023, 2:35 a.m. OK GNU C++14 TESTS 2 0 0
227478068 HoangMC2009 A Oct. 10, 2023, 4:12 a.m. OK GNU C++14 TESTS 2 0 0
227474306 peter112358 A Oct. 10, 2023, 3:19 a.m. OK GNU C++14 TESTS 2 0 0
227476395 akshath3001 A Oct. 10, 2023, 3:48 a.m. OK GNU C++14 TESTS 2 0 0
227477867 15H A Oct. 10, 2023, 4:09 a.m. OK GNU C++17 TESTS 2 0 0
227476179 Suplex A Oct. 10, 2023, 3:45 a.m. OK GNU C++17 TESTS 2 0 0
227475597 5835194088_KienNT A Oct. 10, 2023, 3:36 a.m. OK GNU C++17 TESTS 2 0 0
227472676 AdhityaMangudy A Oct. 10, 2023, 2:54 a.m. OK GNU C++17 TESTS 2 0 0
227466267 yunipoke A Oct. 10, 2023, 12:48 a.m. OK GNU C++17 TESTS 2 0 0
227462287 conexposys A Oct. 9, 2023, 10:46 p.m. OK GNU C++17 TESTS 2 0 0
227458240 errorr371 A Oct. 9, 2023, 9:16 p.m. OK GNU C++17 TESTS 2 0 0
227455426 muhammad_jarjomie A Oct. 9, 2023, 8:35 p.m. OK GNU C++17 TESTS 2 0 0
227447135 omar_tarek90 A Oct. 9, 2023, 7:04 p.m. OK GNU C++17 TESTS 2 0 0
227445250 reneespinosa A Oct. 9, 2023, 6:46 p.m. OK GNU C++17 TESTS 2 0 0
227426927 Aya_Essam. A Oct. 9, 2023, 4:46 p.m. OK GNU C++17 (64) TESTS 2 0 0
227480163 GGodSSpeed A Oct. 10, 2023, 4:42 a.m. OK GNU C++17 (64) TESTS 2 0 0
227472546 KrowFeather A Oct. 10, 2023, 2:52 a.m. OK GNU C++17 (64) TESTS 2 0 0
227470200 -wicton- A Oct. 10, 2023, 2:11 a.m. OK GNU C++17 (64) TESTS 2 0 0
227455775 Attack_on_ICPC_2023 A Oct. 9, 2023, 8:40 p.m. OK GNU C++17 (64) TESTS 2 0 0
227454906 enslaved A Oct. 9, 2023, 8:28 p.m. OK GNU C++17 (64) TESTS 2 0 0
227435340 __HiM_001 A Oct. 9, 2023, 5:30 p.m. OK GNU C++17 (64) TESTS 2 0 0
227431763 abood03 A Oct. 9, 2023, 5:09 p.m. OK GNU C++17 (64) TESTS 2 0 0
227426813 AYA-MARVEL A Oct. 9, 2023, 4:46 p.m. OK GNU C++17 (64) TESTS 2 0 0
227480517 zhi_fan A Oct. 10, 2023, 4:48 a.m. OK GNU C++17 (64) TESTS 2 0 7168000
227480947 jwjXin A Oct. 10, 2023, 4:53 a.m. OK GNU C++20 (64) TESTS 2 0 0
227481102 Himanshu_3302 A Oct. 10, 2023, 4:55 a.m. OK GNU C++20 (64) TESTS 2 0 0
227481587 nkwn A Oct. 10, 2023, 5:01 a.m. OK GNU C++20 (64) TESTS 2 0 0
227482141 wanggl A Oct. 10, 2023, 5:07 a.m. OK GNU C++20 (64) TESTS 2 0 0
227480941 JorD A Oct. 10, 2023, 4:53 a.m. OK GNU C++20 (64) TESTS 2 0 0
227482985 hnust_wuzhanpeng A Oct. 10, 2023, 5:17 a.m. OK GNU C++20 (64) TESTS 2 0 0
227483514 hnust_wanjiawen A Oct. 10, 2023, 5:23 a.m. OK GNU C++20 (64) TESTS 7 0 0
227484774 Nanomoa A Oct. 10, 2023, 5:39 a.m. OK GNU C++20 (64) TESTS 7 0 0
227486403 Kirkon A Oct. 10, 2023, 5:57 a.m. OK GNU C++20 (64) TESTS 7 0 0
227482703 aarjavjain29 A Oct. 10, 2023, 5:14 a.m. OK GNU C++20 (64) TESTS 2 0 0
227425624 Samhitha_13 A Oct. 9, 2023, 4:41 p.m. OK Java 11 TESTS 2 295 204800
227448663 zaheer286khan A Oct. 9, 2023, 7:19 p.m. OK Java 11 TESTS 2 311 0
227478783 6161194115_MinhCN A Oct. 10, 2023, 4:23 a.m. OK Java 11 TESTS 2 327 0
227431366 klu_2100031901 A Oct. 9, 2023, 5:06 p.m. OK Java 11 TESTS 2 343 0
227477960 klu_2100031908 A Oct. 10, 2023, 4:11 a.m. OK Java 11 TESTS 2 358 0
227475062 wdjuruo A Oct. 10, 2023, 3:29 a.m. OK Java 11 TESTS 2 358 0
227436034 Vanshikaagr123 A Oct. 9, 2023, 5:35 p.m. OK Java 11 TESTS 2 358 0
227434570 ksaikumart123 A Oct. 9, 2023, 5:25 p.m. OK Java 11 TESTS 2 358 0
227474387 Sohit_79 A Oct. 10, 2023, 3:20 a.m. OK Java 11 TESTS 2 389 0
227425971 achal5623 A Oct. 9, 2023, 4:43 p.m. OK Java 11 TESTS 2 389 0
227458708 prituladima A Oct. 9, 2023, 9:25 p.m. OK Java 17 TESTS 2 170 614400
227454175 harshhtiwari A Oct. 9, 2023, 8:19 p.m. OK Java 17 TESTS 2 171 307200
227446422 CrinklyGolem A Oct. 9, 2023, 6:57 p.m. OK Java 17 TESTS 2 186 102400
227424116 shashank_008_ A Oct. 9, 2023, 4:37 p.m. OK Java 17 TESTS 2 233 512000
227463168 G8L18M A Oct. 9, 2023, 11:15 p.m. OK Java 17 TESTS 2 248 307200
227436499 Nagendravarma A Oct. 9, 2023, 5:38 p.m. OK Java 17 TESTS 2 249 0
227427683 garvit2435 A Oct. 9, 2023, 4:49 p.m. OK Java 17 TESTS 2 264 409600
227432727 thesurajsite A Oct. 9, 2023, 5:14 p.m. OK Java 17 TESTS 2 264 614400
227446745 spiralJava_ A Oct. 9, 2023, 7 p.m. OK Java 17 TESTS 2 265 819200
227468522 BlizGale A Oct. 10, 2023, 1:39 a.m. OK Java 17 TESTS 2 280 0
227466188 Ligh0x74 A Oct. 10, 2023, 12:46 a.m. OK Java 21 TESTS 2 187 0
227469979 goalboy A Oct. 10, 2023, 2:07 a.m. OK Java 21 TESTS 2 295 0
227486318 nithin93 A Oct. 10, 2023, 5:57 a.m. OK Java 21 TESTS 7 326 0
227432066 Harsh_Agrawal_12 A Oct. 9, 2023, 5:10 p.m. OK Java 21 TESTS 2 343 0
227434912 Krishna_bandla A Oct. 9, 2023, 5:27 p.m. OK Java 21 TESTS 2 358 0
227432229 madhanirahul92 A Oct. 9, 2023, 5:11 p.m. OK Java 21 TESTS 2 358 0
227427765 vashista_6752 A Oct. 9, 2023, 4:50 p.m. OK Java 21 TESTS 2 358 0
227454462 Sumitsingh7 A Oct. 9, 2023, 8:23 p.m. OK Java 8 TESTS 2 78 0
227426725 Udayf A Oct. 9, 2023, 4:46 p.m. OK Java 8 TESTS 2 93 0
227437165 formidablechief_27 A Oct. 9, 2023, 5:44 p.m. OK Java 8 TESTS 2 109 0
227429882 IOFYA A Oct. 9, 2023, 4:58 p.m. OK Java 8 TESTS 2 109 0
227475706 amit_roy A Oct. 10, 2023, 3:37 a.m. OK Java 8 TESTS 2 155 0
227477914 chengzijun_de_xiatian A Oct. 10, 2023, 4:10 a.m. OK Java 8 TESTS 2 218 0
227442531 saiteja8 A Oct. 9, 2023, 6:23 p.m. OK Java 8 TESTS 2 218 0
227436471 traang180204 A Oct. 9, 2023, 5:38 p.m. OK Java 8 TESTS 2 218 0
227482690 Mahnoz.09 A Oct. 10, 2023, 5:14 a.m. OK Java 8 TESTS 2 233 0
227448134 deeptnaman A Oct. 9, 2023, 7:13 p.m. OK Java 8 TESTS 2 248 0
227427676 gelbelachente A Oct. 9, 2023, 4:49 p.m. OK Kotlin 1.7 TESTS 2 436 3379200
227461773 Ramy_M_Rashad A Oct. 9, 2023, 10:32 p.m. OK MS C++ 2017 TESTS 2 15 0
227465298 Dathon_HCMUS A Oct. 10, 2023, 12:26 a.m. OK MS C++ 2017 TESTS 2 61 0
227434280 rasadov A Oct. 9, 2023, 5:23 p.m. OK MS C++ 2017 TESTS 2 62 0
227470627 Aneeba A Oct. 10, 2023, 2:19 a.m. OK MS C++ 2017 TESTS 2 77 0
227427456 ashutosh20770909 A Oct. 9, 2023, 4:49 p.m. OK MS C++ 2017 TESTS 2 77 0
227474838 Wang_banxian A Oct. 10, 2023, 3:26 a.m. OK MS C++ 2017 TESTS 2 92 0
227475798 siowyeeceng3 A Oct. 10, 2023, 3:38 a.m. OK MS C++ 2017 TESTS 2 93 0
227422011 chandansahoo02468 A Oct. 9, 2023, 4:33 p.m. OK MS C++ 2017 TESTS 2 93 0
227440143 ssaannnyaya A Oct. 9, 2023, 6:04 p.m. OK MS C++ 2017 TESTS 2 108 0
227466524 andy562.dlg A Oct. 10, 2023, 12:54 a.m. OK MS C++ 2017 TESTS 2 124 102400
227482517 katomasao A Oct. 10, 2023, 5:12 a.m. OK Perl TESTS 2 108 819200
227426379 Gaurav1 A Oct. 9, 2023, 4:44 p.m. OK PyPy 2 TESTS 2 202 6348800
227447878 0xROoT A Oct. 9, 2023, 7:11 p.m. OK PyPy 3 TESTS 2 124 3584000
227452975 iamskp A Oct. 9, 2023, 8:05 p.m. OK PyPy 3 TESTS 2 155 7168000
227430029 280789 A Oct. 9, 2023, 4:59 p.m. OK PyPy 3 TESTS 2 186 5632000
227440635 momenelmesady4803 A Oct. 9, 2023, 6:08 p.m. OK PyPy 3 TESTS 2 233 9625600
227423278 CMRIT25_21R01A0508 A Oct. 9, 2023, 4:34 p.m. OK PyPy 3 TESTS 2 265 5120000
227459175 VidGa A Oct. 9, 2023, 9:33 p.m. OK PyPy 3 TESTS 2 296 9113600
227429757 goh29932 A Oct. 9, 2023, 4:58 p.m. OK PyPy 3 TESTS 2 358 9318400
227439127 shivananda02 A Oct. 9, 2023, 5:57 p.m. OK PyPy 3 TESTS 2 373 9216000
227474454 layzer A Oct. 10, 2023, 3:21 a.m. OK PyPy 3-64 TESTS 2 93 9011200
227434833 MdAshrafuzzaman_Sunny02 A Oct. 9, 2023, 5:27 p.m. OK PyPy 3-64 TESTS 2 108 7372800
227466542 _BREEZE_ A Oct. 10, 2023, 12:55 a.m. OK PyPy 3-64 TESTS 2 108 9113600
227470507 Youarenotgood A Oct. 10, 2023, 2:17 a.m. OK PyPy 3-64 TESTS 2 108 9728000
227430884 siiuuuu A Oct. 9, 2023, 5:04 p.m. OK PyPy 3-64 TESTS 2 109 8704000
227425659 RobinFromTheHood A Oct. 9, 2023, 4:41 p.m. OK PyPy 3-64 TESTS 2 109 9011200
227427055 Tinky1224 A Oct. 9, 2023, 4:47 p.m. OK PyPy 3-64 TESTS 2 124 8908800
227469933 jimini23kjm A Oct. 10, 2023, 2:06 a.m. OK PyPy 3-64 TESTS 2 124 9011200
227473035 KongLaoDa A Oct. 10, 2023, 3 a.m. OK PyPy 3-64 TESTS 2 124 9216000
227474128 yghygh123 A Oct. 10, 2023, 3:16 a.m. OK PyPy 3-64 TESTS 2 124 9728000
227466507 eugalt A Oct. 10, 2023, 12:54 a.m. OK Python 3 TESTS 2 61 512000
227476489 suryateja1706 A Oct. 10, 2023, 3:50 a.m. OK Python 3 TESTS 2 77 0
227470966 unemployment A Oct. 10, 2023, 2:25 a.m. OK Python 3 TESTS 2 77 102400
227477660 AliEzatyar A Oct. 10, 2023, 4:06 a.m. OK Python 3 TESTS 2 77 512000
227450855 Sajjad_fc13 A Oct. 9, 2023, 7:41 p.m. OK Python 3 TESTS 2 92 0
227427162 sarinkrishnanr A Oct. 9, 2023, 4:47 p.m. OK Python 3 TESTS 2 92 0
227456043 Asembris A Oct. 9, 2023, 8:44 p.m. OK Python 3 TESTS 2 93 0
227448883 bossshrujan A Oct. 9, 2023, 7:21 p.m. OK Python 3 TESTS 2 93 0
227448514 propashii A Oct. 9, 2023, 7:17 p.m. OK Python 3 TESTS 2 93 0
227432804 sullar A Oct. 9, 2023, 5:14 p.m. OK Python 3 TESTS 2 93 0
227443193 0npata A Oct. 9, 2023, 6:28 p.m. OK Rust 2021 TESTS 2 0 307200
227437431 azryx0 A Oct. 9, 2023, 5:46 p.m. OK Rust 2021 TESTS 2 0 307200

remove filters

Back to search problems