Codeforces Round 870 (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
1826 Codeforces Round 870 (Div. 2) FINISHED False 7200 48525899 May 5, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13742 ) C Dreaming of Freedom PROGRAMMING greedy math number theory 1300

B'There are n programmers choosing their favorite algorithm amongst m different choice options. Before the first round, all m options are available. In each round, every programmer makes a vote for one of the remaining algorithms. After the round, only the algorithms with the maximum number of votes remain. The voting process ends when there is only one option left. Determine whether the voting process can continue indefinitely or no matter how people vote, they will eventually choose a single option after some finite amount of rounds? The first line contains a single integer t ( 1 <= q t <= q 10^5 ) -- the number of test cases. Each test case consists of a single line containing two integers n and m ( 1 <= q n, m <= q 10^6 ) -- the number of people and choice options respectively. For each test case output "YES" if the programmers will eventually choose a single option, and "NO" otherwise. You may print each letter in any case (for example, YES, Yes, yes, yEs will all be recognized as a positive answer). In the first example, there are 8 ways people could vote: {1|1|1, 1|1|2, 1|2|1, 1|2|2, 2|1|1, 2|1|2, 2|2|1, 2|2|2 } . In cases 1 , 2 , 3 , and 5 , the programmers are left with the first algorithm, and in the remaining cases people are left with the second one, so the voting ends in one round in any case. In the second example, the programmers could always vote 1|1|2|2 . Both algorithms have the maximum number of votes and remain for the next round, so the voting never ends. '...

Tutorials

Codeforces Round #870 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
205030253 FatalityNT C May 7, 2023, 10:55 p.m. OK C# 8 TESTS 17 592 4198400 1300
206001686 Andrei_Kuz C May 15, 2023, 3:18 p.m. OK Clang++17 Diagnostics TESTS 17 358 6553600 1300
205491850 zzz22 C May 12, 2023, 2:57 a.m. OK Clang++17 Diagnostics TESTS 17 1357 4300800 1300
205015226 AlMuhitMuhtadi C May 7, 2023, 6:24 p.m. OK Clang++17 Diagnostics TESTS 17 1465 32768000 1300
205318053 2000030103 C May 10, 2023, 11:09 a.m. OK Clang++17 Diagnostics TESTS 17 1700 0 1300
206001659 Andrei_Kuz C May 15, 2023, 3:18 p.m. OK Clang++20 Diagnostics TESTS 17 358 6553600 1300
205414567 bkifhr9 C May 11, 2023, 10:13 a.m. OK Clang++20 Diagnostics TESTS 17 1825 0 1300
204956867 shshankmittal1111 C May 7, 2023, 10:11 a.m. OK GNU C11 TESTS 17 639 0 1300
206001638 Andrei_Kuz C May 15, 2023, 3:17 p.m. OK GNU C++14 TESTS 17 46 7168000 1300
206075915 shinjan99 C May 16, 2023, 10:50 a.m. OK GNU C++14 TESTS 17 62 1331200 1300
205400562 ZJL_OIJR C May 11, 2023, 7:40 a.m. OK GNU C++14 TESTS 17 62 5427200 1300
205404694 02Darling C May 11, 2023, 8:30 a.m. OK GNU C++14 TESTS 17 62 9011200 1300
204989144 Const_int C May 7, 2023, 3:02 p.m. OK GNU C++14 TESTS 17 62 9011200 1300
206195625 WYH888 C May 17, 2023, 10:15 a.m. OK GNU C++14 TESTS 17 62 9011200 1300
206153401 dhruvjain6467 C May 16, 2023, 8:16 p.m. OK GNU C++14 TESTS 17 77 3993600 1300
205037003 Aaron_luomiao C May 8, 2023, 2:38 a.m. OK GNU C++14 TESTS 17 77 9011200 1300
205695494 Dima02 C May 13, 2023, 8:55 a.m. OK GNU C++14 TESTS 17 78 3993600 1300
205728728 gebeng C May 13, 2023, 2:20 p.m. OK GNU C++14 TESTS 17 78 3993600 1300
206001565 Andrei_Kuz C May 15, 2023, 3:17 p.m. OK GNU C++17 TESTS 17 46 7168000 1300
204923482 kawayisang C May 7, 2023, 5:17 a.m. OK GNU C++17 TESTS 17 62 3993600 1300
204957937 code_struck C May 7, 2023, 10:22 a.m. OK GNU C++17 TESTS 17 62 3993600 1300
206406321 JAINISHx C May 19, 2023, 5:28 a.m. OK GNU C++17 TESTS 17 62 5120000 1300
206001961 Andrei_Kuz C May 15, 2023, 3:20 p.m. OK GNU C++17 TESTS 17 62 7168000 1300
205017669 Mridul360 C May 7, 2023, 6:53 p.m. OK GNU C++17 TESTS 17 77 102400 1300
206449343 GOVIND_JANGRA C May 19, 2023, 1:06 p.m. OK GNU C++17 TESTS 17 77 3993600 1300
205773714 PurpleCrayon C May 14, 2023, 12:37 a.m. OK GNU C++17 TESTS 17 77 3993600 1300
205063486 cpUnwind C May 8, 2023, 9:28 a.m. OK GNU C++17 TESTS 17 77 5120000 1300
205075666 xuanru C May 8, 2023, 11:41 a.m. OK GNU C++17 TESTS 17 77 7987200 1300
205452922 rky673 C May 11, 2023, 4:02 p.m. OK GNU C++17 (64) TESTS 17 46 3993600 1300
205057457 YL-9 C May 8, 2023, 8:18 a.m. OK GNU C++17 (64) TESTS 17 46 7987200 1300
205276730 y_combinator C May 9, 2023, 11:51 p.m. OK GNU C++17 (64) TESTS 17 61 5120000 1300
205047784 serialcomder C May 8, 2023, 6:14 a.m. OK GNU C++17 (64) TESTS 17 62 3993600 1300
206069510 soum1313 C May 16, 2023, 9:42 a.m. OK GNU C++17 (64) TESTS 17 62 3993600 1300
205334454 gaju_01 C May 10, 2023, 1:44 p.m. OK GNU C++17 (64) TESTS 17 62 3993600 1300
205941123 tourist_fan_fan_fan C May 15, 2023, 4:45 a.m. OK GNU C++17 (64) TESTS 17 62 7987200 1300
205533523 vjudge2 C May 12, 2023, 12:16 p.m. OK GNU C++17 (64) TESTS 17 62 10137600 1300
205329267 bkifhr8 C May 10, 2023, 12:58 p.m. OK GNU C++17 (64) TESTS 17 62 16076800 1300
205243073 pachico C May 9, 2023, 3:20 p.m. OK GNU C++17 (64) TESTS 17 77 3993600 1300
206001586 Andrei_Kuz C May 15, 2023, 3:17 p.m. OK GNU C++20 (64) TESTS 17 31 7168000 1300
205068162 EasonAAA C May 8, 2023, 10:21 a.m. OK GNU C++20 (64) TESTS 17 46 1228800 1300
205881524 zhouleyi C May 14, 2023, 3:31 p.m. OK GNU C++20 (64) TESTS 17 46 2150400 1300
204915794 MVP_Harry C May 7, 2023, 3:36 a.m. OK GNU C++20 (64) TESTS 17 46 2150400 1300
206307498 mralves C May 18, 2023, 7:13 a.m. OK GNU C++20 (64) TESTS 17 46 2252800 1300
206446264 algohary C May 19, 2023, 12:36 p.m. OK GNU C++20 (64) TESTS 17 46 3993600 1300
206447179 algohary C May 19, 2023, 12:45 p.m. OK GNU C++20 (64) TESTS 17 46 3993600 1300
206426095 Rojan..k C May 19, 2023, 9:10 a.m. OK GNU C++20 (64) TESTS 17 46 3993600 1300
206373488 Mostafa__Fouad C May 18, 2023, 5:55 p.m. OK GNU C++20 (64) TESTS 17 46 3993600 1300
206302402 BAKIEV.OFFICIAL C May 18, 2023, 6:10 a.m. OK GNU C++20 (64) TESTS 17 46 3993600 1300
205700793 Kimi_Zhang C May 13, 2023, 9:44 a.m. OK Go TESTS 17 873 4403200 1300
206399947 basically_deceased C May 19, 2023, 3:30 a.m. OK Haskell TESTS 17 1575 0 1300
204963811 themadknight45 C May 7, 2023, 11:19 a.m. OK Java 11 TESTS 17 498 0 1300
204927277 hrushi C May 7, 2023, 5:44 a.m. OK Java 11 TESTS 17 530 0 1300
205544781 sad_truant C May 12, 2023, 1:58 p.m. OK Java 11 TESTS 17 561 0 1300
205059550 Utkarsh99 C May 8, 2023, 8:43 a.m. OK Java 11 TESTS 17 841 0 1300
206365835 The_terminator C May 18, 2023, 4:37 p.m. OK Java 11 TESTS 17 873 0 1300
205464683 XIN C May 11, 2023, 5:59 p.m. OK Java 11 TESTS 17 1092 0 1300
206446984 Jagnath_Reddy C May 19, 2023, 12:43 p.m. OK Java 11 TESTS 17 1107 0 1300
205944082 vjudge2 C May 15, 2023, 5:33 a.m. OK Java 11 TESTS 17 1263 0 1300
205394569 cavan806 C May 11, 2023, 6:25 a.m. OK Java 11 TESTS 17 1341 0 1300
205831116 bkifhr9 C May 14, 2023, 12:25 p.m. OK Java 11 TESTS 17 1372 0 1300
206402941 this.is.shivamsingh C May 19, 2023, 4:28 a.m. OK Java 17 TESTS 17 280 614400 1300
204998118 Eren_25 C May 7, 2023, 4:22 p.m. OK Java 17 TESTS 17 545 39628800 1300
205431349 Abdelrahman.M.3 C May 11, 2023, 12:54 p.m. OK Java 17 TESTS 17 810 204800 1300
206396982 rmakash999 C May 19, 2023, 2:29 a.m. OK Java 17 TESTS 17 904 6246400 1300
206412049 djj_l33t C May 19, 2023, 6:43 a.m. OK Java 17 TESTS 17 935 921600 1300
206411937 djj_l33t C May 19, 2023, 6:41 a.m. OK Java 17 TESTS 17 966 921600 1300
205291820 bleach__ C May 10, 2023, 5:48 a.m. OK Java 17 TESTS 17 1028 1126400 1300
205541815 massvinod C May 12, 2023, 1:30 p.m. OK Java 17 TESTS 17 1029 0 1300
204968850 whiteyesx205 C May 7, 2023, 12:02 p.m. OK Java 17 TESTS 17 1169 512000 1300
205628951 JoksimKaktus C May 12, 2023, 5:43 p.m. OK Java 17 TESTS 17 1450 819200 1300
206312280 MagentaCobra C May 18, 2023, 8:09 a.m. OK Java 8 TESTS 17 155 0 1300
205056116 uju C May 8, 2023, 8:01 a.m. OK Java 8 TESTS 17 451 0 1300
206367422 stolis C May 18, 2023, 4:55 p.m. OK Java 8 TESTS 17 624 0 1300
206407311 Tim2004 C May 19, 2023, 5:42 a.m. OK Java 8 TESTS 17 764 0 1300
206289009 ZXF_521mua C May 18, 2023, 1:40 a.m. OK Java 8 TESTS 17 936 0 1300
206289061 ZXF_521mua C May 18, 2023, 1:41 a.m. OK Java 8 TESTS 17 966 0 1300
205095466 amit_roy C May 8, 2023, 12:37 p.m. OK Java 8 TESTS 17 1029 6553600 1300
205007192 amit_roy C May 7, 2023, 4:58 p.m. OK Java 8 TESTS 17 1044 6553600 1300
205028407 ApocJTL C May 7, 2023, 9:56 p.m. OK Java 8 TESTS 17 1107 0 1300
206218761 Harshit_3905 C May 17, 2023, 1:49 p.m. OK Java 8 TESTS 17 1200 0 1300
205062213 trance4ever C May 8, 2023, 9:15 a.m. OK MS C++ 2017 TESTS 17 686 0 1300
204984598 TheHead C May 7, 2023, 2:21 p.m. OK MS C++ 2017 TESTS 17 701 3993600 1300
205143050 GeraltLUL C May 8, 2023, 4:25 p.m. OK MS C++ 2017 TESTS 17 717 0 1300
206213999 shushukl C May 17, 2023, 1:07 p.m. OK MS C++ 2017 TESTS 17 1247 0 1300
205352831 Kiki_forest C May 10, 2023, 4:45 p.m. OK PyPy 3 TESTS 17 374 15462400 1300
205269137 Yash_Nandwana C May 9, 2023, 8:22 p.m. OK PyPy 3 TESTS 17 873 9625600 1300
205022314 p_c_ C May 7, 2023, 7:58 p.m. OK PyPy 3 TESTS 17 966 20275200 1300
205468789 ipip C May 11, 2023, 6:42 p.m. OK PyPy 3 TESTS 17 1746 11264000 1300
205219428 chaturyatatini C May 9, 2023, 11:55 a.m. OK PyPy 3 TESTS 17 1762 11059200 1300
206318673 soudhamini_2000031088 C May 18, 2023, 9:14 a.m. OK PyPy 3 TESTS 17 1809 11264000 1300
204987386 w313880557 C May 7, 2023, 2:46 p.m. OK PyPy 3 TESTS 17 1902 9830400 1300
205144880 2000030255 C May 8, 2023, 4:41 p.m. OK PyPy 3 TESTS 17 1950 9625600 1300
206152173 omarkurde C May 16, 2023, 7:56 p.m. OK PyPy 3-64 TESTS 17 202 20992000 1300
205175232 dipakgupta007 C May 9, 2023, 1:34 a.m. OK PyPy 3-64 TESTS 17 217 20889600 1300
205729321 sangeeta C May 13, 2023, 2:25 p.m. OK PyPy 3-64 TESTS 17 248 19865600 1300
205298518 hash1023 C May 10, 2023, 7:14 a.m. OK PyPy 3-64 TESTS 17 249 19865600 1300
205031182 nealzane C May 7, 2023, 11:26 p.m. OK PyPy 3-64 TESTS 17 265 17715200 1300
205179895 JinYuManTang C May 9, 2023, 3:25 a.m. OK PyPy 3-64 TESTS 17 265 20172800 1300
205179987 JinYuManTang C May 9, 2023, 3:27 a.m. OK PyPy 3-64 TESTS 17 311 20172800 1300
205465682 Ayushman_123 C May 11, 2023, 6:08 p.m. OK PyPy 3-64 TESTS 17 312 20582400 1300
205825024 Admiring_ShockleyZns C May 14, 2023, 11:16 a.m. OK PyPy 3-64 TESTS 17 327 36556800 1300
205029418 Master_Hleb C May 7, 2023, 10:25 p.m. OK PyPy 3-64 TESTS 17 795 44953600 1300
205417346 Kiki_forest C May 11, 2023, 10:44 a.m. OK Python 3 TESTS 17 795 10752000 1300
205743081 DEAD_TCT C May 13, 2023, 4:39 p.m. OK Python 3 TESTS 17 1045 10547200 1300
205376168 Kiki_forest C May 10, 2023, 11:18 p.m. OK Python 3 TESTS 17 1138 10547200 1300
205137972 nickuuu C May 8, 2023, 3:41 p.m. OK Python 3 TESTS 17 1138 10547200 1300
205416725 Kiki_forest C May 11, 2023, 10:38 a.m. OK Python 3 TESTS 17 1216 10547200 1300
206368326 Block_Cipher C May 18, 2023, 5:04 p.m. OK Python 3 TESTS 17 1590 48844800 1300
204961484 coco.. C May 7, 2023, 10:57 a.m. OK Python 3 TESTS 17 1653 49459200 1300
204961052 coco.. C May 7, 2023, 10:53 a.m. OK Python 3 TESTS 17 2090 50073600 1300
205216067 ALSTON16 C May 9, 2023, 11:25 a.m. OK Python 3 TESTS 17 2136 17100800 1300
206019418 sridharsiddi C May 15, 2023, 6:25 p.m. OK Python 3 TESTS 17 2198 48844800 1300
205161998 kost C May 8, 2023, 8 p.m. OK Rust 2021 TESTS 17 78 16076800 1300
205059731 cottoncotton C May 8, 2023, 8:45 a.m. OK Rust 2021 TESTS 17 358 67276800 1300

remove filters

Back to search problems