Codeforces Round 893 (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
1858 Codeforces Round 893 (Div. 2) FINISHED False 7200 45069863 Aug. 15, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 41519 ) A Buttons PROGRAMMING games greedy math 800

B"Anna and Katie ended up in a secret laboratory. There are a+b+c buttons in the laboratory. It turned out that a buttons can only be pressed by Anna, b buttons can only be pressed by Katie, and c buttons can be pressed by either of them. Anna and Katie decided to play a game, taking turns pressing these buttons. Anna makes the first turn. Each button can be pressed at most once, so at some point, one of the girls will not be able to make her turn. The girl who cannot press a button loses. Determine who will win if both girls play optimally. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case consists of three integers a , b , and c ( 1 <= a, b, c <= 10^9 ) -- the number of buttons that can only be pressed by Anna, the number of buttons that can only be pressed by Katie, and the number of buttons that can be pressed by either of them, respectively. For each test case, output First if Anna wins, or Second if Katie wins. For the simplicity of the explanation, we will numerate the buttons by the numbers from 1 to a+b+c : the first a buttons can only be pressed by Anna, the next b buttons can only be pressed by Katie, and the last c buttons can be pressed by either of them. In the first test case, Anna can press the 3 -rd button on the first turn. Then Katie will press the 2 -nd button (since it is the only possible turn for her). Then Anna will press the 1 -st button. Katie won't have a button to press, so Anna will win. In the second test case, Anna can press the first nine buttons in some order on her turns. No matter what buttons Katie will press, all the buttons from the 10 -th to the 15 -th will be pressed after 12 turns. On the 13 -th turn, Anna will press one of the first nine buttons and Katie will not have a button to press on her turn. Thus, Anna will win. In the third test"...

Tutorials

Codeforces Round #893 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
219006268 halk0812 A Aug. 15, 2023, 5:30 p.m. OK C# 10 TESTS 4 77 2969600 800
219030017 bluemegane A Aug. 15, 2023, 11:07 p.m. OK C# 8 TESTS 4 93 2560000 800
219050041 CUIT-ZJ A Aug. 16, 2023, 3:45 a.m. OK Clang++17 Diagnostics TESTS 4 31 0 800
219015205 Pos_E1 A Aug. 15, 2023, 6:52 p.m. OK Clang++17 Diagnostics TESTS 4 46 0 800
219050154 CUIT-ZJ A Aug. 16, 2023, 3:46 a.m. OK Clang++17 Diagnostics TESTS 4 46 0 800
219034794 qiaochu A Aug. 16, 2023, 1:01 a.m. OK Clang++17 Diagnostics TESTS 4 155 0 800
219029572 dee2002 A Aug. 15, 2023, 10:53 p.m. OK Clang++17 Diagnostics TESTS 4 186 0 800
219025934 nupur34 A Aug. 15, 2023, 9:21 p.m. OK Clang++17 Diagnostics TESTS 4 202 0 800
219046314 manideep2004 A Aug. 16, 2023, 3:01 a.m. OK Clang++17 Diagnostics TESTS 4 218 0 800
219037200 akankxh A Aug. 16, 2023, 1:37 a.m. OK Clang++17 Diagnostics TESTS 4 218 0 800
219049922 CUIT-ZJ A Aug. 16, 2023, 3:43 a.m. OK Clang++17 Diagnostics TESTS 4 233 0 800
219052193 xuntiandao A Aug. 16, 2023, 4:13 a.m. OK Clang++20 Diagnostics TESTS 4 155 0 800
219017881 maruf_bro A Aug. 15, 2023, 7:22 p.m. OK GNU C11 TESTS 4 31 0 800
219050768 chicken_65 A Aug. 16, 2023, 3:54 a.m. OK GNU C11 TESTS 4 31 0 800
219011656 emon_the_bot A Aug. 15, 2023, 6:14 p.m. OK GNU C11 TESTS 4 46 0 800
219011966 parth28 A Aug. 15, 2023, 6:17 p.m. OK GNU C11 TESTS 4 46 0 800
219015873 Tanbir1 A Aug. 15, 2023, 6:59 p.m. OK GNU C11 TESTS 4 46 0 800
219018207 devanksnpi A Aug. 15, 2023, 7:26 p.m. OK GNU C11 TESTS 4 46 0 800
219005065 PRINCE_BRUR A Aug. 15, 2023, 5:21 p.m. OK GNU C11 TESTS 4 46 0 800
219010533 itz_tanvir A Aug. 15, 2023, 6:05 p.m. OK GNU C11 TESTS 4 61 0 800
219026537 anushkapaharia A Aug. 15, 2023, 9:33 p.m. OK GNU C11 TESTS 4 62 0 800
219033629 Leasier A Aug. 16, 2023, 12:38 a.m. OK GNU C11 TESTS 4 62 0 800
219057698 SunnyYuan A Aug. 16, 2023, 5:22 a.m. OK GNU C++14 TESTS 4 15 0 800
219055114 20100202ww A Aug. 16, 2023, 4:52 a.m. OK GNU C++14 TESTS 4 15 0 800
219053645 _Hella_ A Aug. 16, 2023, 4:33 a.m. OK GNU C++14 TESTS 4 15 0 800
219059876 gty314159 A Aug. 16, 2023, 5:46 a.m. OK GNU C++14 TESTS 4 15 0 800
219059722 xcvv A Aug. 16, 2023, 5:44 a.m. OK GNU C++14 TESTS 4 15 0 800
219059572 TuoSuSuYu A Aug. 16, 2023, 5:43 a.m. OK GNU C++14 TESTS 4 15 0 800
219059348 mRXxy0u0 A Aug. 16, 2023, 5:40 a.m. OK GNU C++14 TESTS 4 15 0 800
219058758 _cly_ A Aug. 16, 2023, 5:34 a.m. OK GNU C++14 TESTS 4 15 0 800
219058083 chenyilai A Aug. 16, 2023, 5:26 a.m. OK GNU C++14 TESTS 4 15 0 800
219057891 panyi A Aug. 16, 2023, 5:24 a.m. OK GNU C++14 TESTS 4 15 0 800
219002624 sushi69 A Aug. 15, 2023, 5:08 p.m. OK GNU C++17 TESTS 4 0 0 800
218996117 avenat0r A Aug. 15, 2023, 4:29 p.m. OK GNU C++17 TESTS 4 0 0 800
219061085 yxqd A Aug. 16, 2023, 5:59 a.m. OK GNU C++17 TESTS 4 15 0 800
219053896 TsuanS A Aug. 16, 2023, 4:36 a.m. OK GNU C++17 TESTS 4 15 0 800
219054423 kannan_16 A Aug. 16, 2023, 4:43 a.m. OK GNU C++17 TESTS 4 15 0 800
219055316 abhishekkumar20 A Aug. 16, 2023, 4:54 a.m. OK GNU C++17 TESTS 4 15 0 800
219056041 kpjunaid A Aug. 16, 2023, 5:03 a.m. OK GNU C++17 TESTS 4 15 0 800
219056235 Beast_376 A Aug. 16, 2023, 5:05 a.m. OK GNU C++17 TESTS 4 15 0 800
219058159 Grind_Is_real A Aug. 16, 2023, 5:27 a.m. OK GNU C++17 TESTS 4 15 0 800
219059755 zcq--yyds A Aug. 16, 2023, 5:44 a.m. OK GNU C++17 TESTS 4 15 0 800
219053927 BoaHancock A Aug. 16, 2023, 4:37 a.m. OK GNU C++17 (64) TESTS 4 0 102400 800
219043487 code_ninja_123 A Aug. 16, 2023, 2:36 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219061016 not_raunit A Aug. 16, 2023, 5:59 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219060469 Alfa A Aug. 16, 2023, 5:53 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219059395 prac_41 A Aug. 16, 2023, 5:41 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219058350 rumman_sust A Aug. 16, 2023, 5:29 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219054803 luogu_bot2 A Aug. 16, 2023, 4:48 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219051006 Uchiha_Itachi25 A Aug. 16, 2023, 3:57 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219049737 Once_I_Liked_AGirl A Aug. 16, 2023, 3:41 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219046005 ashikaslam A Aug. 16, 2023, 2:58 a.m. OK GNU C++17 (64) TESTS 4 15 0 800
219009438 iam_a.r.t A Aug. 15, 2023, 5:55 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
219009556 noobguy69 A Aug. 15, 2023, 5:56 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
219027341 LyricClamp A Aug. 15, 2023, 9:52 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
219057054 namit_v A Aug. 16, 2023, 5:14 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
219001918 yghygh123 A Aug. 15, 2023, 5:06 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
219003362 yangster67 A Aug. 15, 2023, 5:12 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
219060786 Nilesh_ A Aug. 16, 2023, 5:56 a.m. OK GNU C++20 (64) TESTS 4 15 0 800
219060834 taheko A Aug. 16, 2023, 5:57 a.m. OK GNU C++20 (64) TESTS 4 15 0 800
219060907 elotelo966 A Aug. 16, 2023, 5:58 a.m. OK GNU C++20 (64) TESTS 4 15 0 800
219061048 karashi_ A Aug. 16, 2023, 5:59 a.m. OK GNU C++20 (64) TESTS 4 15 0 800
219013502 orbitze A Aug. 15, 2023, 6:33 p.m. OK Haskell TESTS 4 93 0 800
219009671 drdilyor A Aug. 15, 2023, 5:57 p.m. OK Haskell TESTS 4 93 0 800
219043335 1936557 A Aug. 16, 2023, 2:35 a.m. OK Haskell TESTS 4 108 0 800
219013722 orbitze A Aug. 15, 2023, 6:35 p.m. OK Haskell TESTS 4 109 0 800
219010182 pakkapapad A Aug. 15, 2023, 6:01 p.m. OK Java 11 TESTS 4 187 0 800
219047794 InfinitePath A Aug. 16, 2023, 3:17 a.m. OK Java 11 TESTS 4 187 40243200 800
219037102 cry A Aug. 16, 2023, 1:35 a.m. OK Java 11 TESTS 4 249 0 800
219007484 dzhi A Aug. 15, 2023, 5:39 p.m. OK Java 11 TESTS 4 249 0 800
218997181 ahmedhgabr6 A Aug. 15, 2023, 4:31 p.m. OK Java 11 TESTS 4 249 0 800
219036490 man-ray A Aug. 16, 2023, 1:27 a.m. OK Java 11 TESTS 4 296 0 800
219026648 jonshrey A Aug. 15, 2023, 9:36 p.m. OK Java 11 TESTS 4 296 0 800
219011410 tushar000 A Aug. 15, 2023, 6:12 p.m. OK Java 11 TESTS 4 311 0 800
219013813 Guri01 A Aug. 15, 2023, 6:37 p.m. OK Java 11 TESTS 4 312 0 800
219013383 priyanshu981 A Aug. 15, 2023, 6:32 p.m. OK Java 11 TESTS 4 312 0 800
219002816 aishwarykesarwani A Aug. 15, 2023, 5:09 p.m. OK Java 17 TESTS 4 140 307200 800
219005927 ahmed.elbakly A Aug. 15, 2023, 5:27 p.m. OK Java 17 TESTS 4 187 0 800
219017933 ADust A Aug. 15, 2023, 7:23 p.m. OK Java 17 TESTS 4 187 307200 800
219025804 tushar19280 A Aug. 15, 2023, 9:18 p.m. OK Java 17 TESTS 4 187 41062400 800
218995965 VIVEK_8877 A Aug. 15, 2023, 4:28 p.m. OK Java 17 TESTS 4 202 512000 800
219058961 shashankp10 A Aug. 16, 2023, 5:37 a.m. OK Java 17 TESTS 4 218 102400 800
219056602 Sambath_S A Aug. 16, 2023, 5:09 a.m. OK Java 17 TESTS 4 233 716800 800
219022359 GOGOA A Aug. 15, 2023, 8:20 p.m. OK Java 17 TESTS 4 249 614400 800
219049388 dhruv.p6 A Aug. 16, 2023, 3:36 a.m. OK Java 17 TESTS 4 264 307200 800
219009766 efti23 A Aug. 15, 2023, 5:58 p.m. OK Java 17 TESTS 4 264 307200 800
219017900 var_hash A Aug. 15, 2023, 7:22 p.m. OK Java 8 TESTS 4 93 0 800
219006576 orbitze A Aug. 15, 2023, 5:32 p.m. OK Java 8 TESTS 4 93 0 800
219029180 ZXF_521mua A Aug. 15, 2023, 10:42 p.m. OK Java 8 TESTS 4 109 0 800
219004313 RonWonWon A Aug. 15, 2023, 5:17 p.m. OK Java 8 TESTS 4 109 0 800
219003017 formidablechief_27 A Aug. 15, 2023, 5:09 p.m. OK Java 8 TESTS 4 109 0 800
219029221 ZXF_521mua A Aug. 15, 2023, 10:43 p.m. OK Java 8 TESTS 4 139 0 800
219013522 Sumitsingh7 A Aug. 15, 2023, 6:33 p.m. OK Java 8 TESTS 4 171 5836800 800
219048858 bleach__ A Aug. 16, 2023, 3:30 a.m. OK Java 8 TESTS 4 202 46284800 800
219037824 ahnguye A Aug. 16, 2023, 1:45 a.m. OK Java 8 TESTS 4 218 0 800
219058951 krishank08eng A Aug. 16, 2023, 5:37 a.m. OK Java 8 TESTS 4 233 0 800
219018994 Kay0 A Aug. 15, 2023, 7:35 p.m. OK Kotlin 1.6 TESTS 4 202 0 800
219017123 Gadi A Aug. 15, 2023, 7:14 p.m. OK MS C++ 2017 TESTS 4 31 819200 800
219002521 hamza_safi A Aug. 15, 2023, 5:08 p.m. OK MS C++ 2017 TESTS 4 61 0 800
219053565 Eurussssiu A Aug. 16, 2023, 4:32 a.m. OK MS C++ 2017 TESTS 4 62 0 800
219051658 Aneeba A Aug. 16, 2023, 4:06 a.m. OK MS C++ 2017 TESTS 4 62 0 800
219051531 ankitksingh A Aug. 16, 2023, 4:04 a.m. OK MS C++ 2017 TESTS 4 62 0 800
219022123 mohdsuhailkhan A Aug. 15, 2023, 8:16 p.m. OK MS C++ 2017 TESTS 4 62 0 800
219013073 girish_sai_krishna_18 A Aug. 15, 2023, 6:28 p.m. OK MS C++ 2017 TESTS 4 62 0 800
219009272 KuriyamaShiro A Aug. 15, 2023, 5:54 p.m. OK MS C++ 2017 TESTS 4 62 0 800
219006558 BMW_CS_ A Aug. 15, 2023, 5:32 p.m. OK MS C++ 2017 TESTS 4 62 0 800
218998012 vivekthegamer999 A Aug. 15, 2023, 4:32 p.m. OK MS C++ 2017 TESTS 4 62 0 800
219024438 herrungesund A Aug. 15, 2023, 8:53 p.m. OK PyPy 3 TESTS 4 249 6860800 800
219007305 AmanR28 A Aug. 15, 2023, 5:38 p.m. OK PyPy 3 TESTS 4 295 6860800 800
219061323 vlada_chv A Aug. 16, 2023, 6:02 a.m. OK PyPy 3 TESTS 4 296 6451200 800
219043370 Yeaish_Turj A Aug. 16, 2023, 2:35 a.m. OK PyPy 3 TESTS 4 327 7782400 800
219032844 l0stempl3 A Aug. 16, 2023, 12:21 a.m. OK PyPy 3-64 TESTS 4 62 2662400 800
219032830 InHng A Aug. 16, 2023, 12:21 a.m. OK PyPy 3-64 TESTS 4 92 6656000 800
219016452 plevande A Aug. 15, 2023, 7:06 p.m. OK PyPy 3-64 TESTS 4 93 3993600 800
219017277 rmr A Aug. 15, 2023, 7:15 p.m. OK PyPy 3-64 TESTS 4 93 6963200 800
219021708 cupcake123 A Aug. 15, 2023, 8:11 p.m. OK PyPy 3-64 TESTS 4 93 7475200 800
219010004 hvbird A Aug. 15, 2023, 6 p.m. OK PyPy 3-64 TESTS 4 108 7065600 800
219041456 Taymyr A Aug. 16, 2023, 2:22 a.m. OK PyPy 3-64 TESTS 4 108 8089600 800
219007121 sixthcore A Aug. 15, 2023, 5:36 p.m. OK PyPy 3-64 TESTS 4 108 18944000 800
219010375 AZron A Aug. 15, 2023, 6:03 p.m. OK PyPy 3-64 TESTS 4 109 6553600 800
219045480 lionkingchuchu A Aug. 16, 2023, 2:54 a.m. OK PyPy 3-64 TESTS 4 109 9011200 800
219027112 SCube_ A Aug. 15, 2023, 9:46 p.m. OK Python 3 TESTS 4 77 0 800
219018341 satish0036kumar A Aug. 15, 2023, 7:27 p.m. OK Python 3 TESTS 4 92 0 800
219015603 Asmodei_IV A Aug. 15, 2023, 6:56 p.m. OK Python 3 TESTS 4 92 0 800
219010936 MANOHAR_IIITS A Aug. 15, 2023, 6:08 p.m. OK Python 3 TESTS 4 92 0 800
219056725 sohithp A Aug. 16, 2023, 5:10 a.m. OK Python 3 TESTS 4 93 0 800
219045114 21wh1a0211 A Aug. 16, 2023, 2:51 a.m. OK Python 3 TESTS 4 93 0 800
219044365 ToTo25 A Aug. 16, 2023, 2:44 a.m. OK Python 3 TESTS 4 93 0 800
219042368 Vikas726 A Aug. 16, 2023, 2:26 a.m. OK Python 3 TESTS 4 93 0 800
219033309 vignesh_39 A Aug. 16, 2023, 12:31 a.m. OK Python 3 TESTS 4 93 0 800
219030878 Arihantjain124 A Aug. 15, 2023, 11:34 p.m. OK Python 3 TESTS 4 93 0 800
219038298 Patchouli9 A Aug. 16, 2023, 1:52 a.m. OK Rust 2021 TESTS 4 109 0 800

remove filters

Back to search problems