Codeforces Round 830 (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
1732 Codeforces Round 830 (Div. 2) FINISHED False 7200 65303699 Oct. 23, 2022, 10:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8758 ) D1 Balance (Easy version) PROGRAMMING brute force data structures implementation 1500

B'This is the easy version of the problem. The only difference is that in this version there are no "remove" queries. Initially you have a set containing one element -- 0 . You need to handle q queries of the following types: In our problem, we define the k text{-mex} of a set of integers as the smallest non-negative integer x that is divisible by k and which is not contained in the set. The first line contains an integer q ( 1 <= q q <= q 2 cdot 10^5 ) -- the number of queries. The following q lines describe the queries. An addition query of integer x is given in the format + x ( 1 <= q x <= q 10^{18} ). It is guaranteed that x was not contained in the set. A search query of k text{-mex} is given in the format ? k ( 1 <= q k <= q 10^{18} ). It is guaranteed that there will be at least one query of type ?. For each query of type ? output a single integer -- the k text{-mex} of the set. In the first example: After the first and second queries, the set will contain elements {0, 1, 2 } . The smallest non-negative number that is divisible by 1 and is not contained in the set is 3 . After the fourth query, the set will contain the elements {0, 1, 2, 4 } . The smallest non-negative number that is divisible by 2 and is not contained in the set is 6 . In the second example: '...

Tutorials

108327

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
177635762 DmitriyAnikeyev D1 Oct. 23, 2022, 11:41 a.m. OK C# 10 TESTS 33 1060 21094400 1500
177658676 Tdyx D1 Oct. 23, 2022, 2:32 p.m. OK C# 8 TESTS 33 342 39219200 1500
177632448 kakel_san D1 Oct. 23, 2022, 11:29 a.m. OK C# 8 TESTS 33 467 56934400 1500
177648780 chro4896 D1 Oct. 23, 2022, 1:27 p.m. OK GNU C11 TESTS 33 920 7987200 1500
177639083 MonkeyGoesCoding D1 Oct. 23, 2022, 11:54 a.m. OK GNU C11 TESTS 33 935 6553600 1500
177632078 octoant D1 Oct. 23, 2022, 11:28 a.m. OK GNU C++14 TESTS 33 202 6041600 1500
177639678 Two-One-One D1 Oct. 23, 2022, 11:56 a.m. OK GNU C++14 TESTS 33 202 14028800 1500
177629563 wlxhkk D1 Oct. 23, 2022, 11:19 a.m. OK GNU C++14 TESTS 33 218 5939200 1500
177632403 CCSU_LRF D1 Oct. 23, 2022, 11:29 a.m. OK GNU C++14 TESTS 33 218 7065600 1500
177630512 syf2008 D1 Oct. 23, 2022, 11:23 a.m. OK GNU C++14 TESTS 33 218 8908800 1500
177648564 aghiad_qashqash2003 D1 Oct. 23, 2022, 1:26 p.m. OK GNU C++14 TESTS 33 218 8908800 1500
177631639 ExRoc__ D1 Oct. 23, 2022, 11:26 a.m. OK GNU C++14 TESTS 33 233 6041600 1500
177706469 Z-301 D1 Oct. 24, 2022, 12:58 a.m. OK GNU C++14 TESTS 39 233 8396800 1500
177669948 Gpish D1 Oct. 23, 2022, 4:02 p.m. OK GNU C++14 TESTS 33 233 8908800 1500
177640026 Ruhan_The_Error_Coder D1 Oct. 23, 2022, 11:57 a.m. OK GNU C++14 TESTS 33 233 13004800 1500
177666149 Guts__ D1 Oct. 23, 2022, 3:31 p.m. OK GNU C++17 TESTS 33 186 5632000 1500
177666991 Subhashis_CSE D1 Oct. 23, 2022, 3:38 p.m. OK GNU C++17 TESTS 33 186 8294400 1500
177662726 misson_specialist D1 Oct. 23, 2022, 3:04 p.m. OK GNU C++17 TESTS 33 186 27238400 1500
177653870 GeekyCoder_PS D1 Oct. 23, 2022, 1:58 p.m. OK GNU C++17 TESTS 33 202 5632000 1500
177650234 Sayed_Elmahdy D1 Oct. 23, 2022, 1:35 p.m. OK GNU C++17 TESTS 33 202 6758400 1500
177701277 Mostafa12221 D1 Oct. 23, 2022, 10:13 p.m. OK GNU C++17 TESTS 34 202 7577600 1500
177680567 suryatrikal D1 Oct. 23, 2022, 5:41 p.m. OK GNU C++17 TESTS 34 202 7577600 1500
177701282 mostafatarek79 D1 Oct. 23, 2022, 10:13 p.m. OK GNU C++17 TESTS 34 202 7577600 1500
177715225 no_ac_no_sleep D1 Oct. 24, 2022, 3:51 a.m. OK GNU C++17 TESTS 47 202 8192000 1500
177701943 Ritik_Srivastav D1 Oct. 23, 2022, 10:34 p.m. OK GNU C++17 TESTS 34 202 8294400 1500
177705416 lunchbox D1 Oct. 24, 2022, 12:25 a.m. OK GNU C++17 (64) TESTS 37 139 14950400 1500
177640601 fexla D1 Oct. 23, 2022, 11:59 a.m. OK GNU C++17 (64) TESTS 33 155 8601600 1500
177638658 YaoLingF D1 Oct. 23, 2022, 11:52 a.m. OK GNU C++17 (64) TESTS 33 171 8089600 1500
177637725 ahhhqq D1 Oct. 23, 2022, 11:49 a.m. OK GNU C++17 (64) TESTS 33 171 8601600 1500
177637807 Mission-Red D1 Oct. 23, 2022, 11:49 a.m. OK GNU C++17 (64) TESTS 33 171 14233600 1500
177639667 jamil314 D1 Oct. 23, 2022, 11:56 a.m. OK GNU C++17 (64) TESTS 33 171 18124800 1500
177636212 tnaito D1 Oct. 23, 2022, 11:43 a.m. OK GNU C++17 (64) TESTS 33 218 6860800 1500
177634428 Alexdzk D1 Oct. 23, 2022, 11:36 a.m. OK GNU C++17 (64) TESTS 33 233 8601600 1500
177698238 NK_ D1 Oct. 23, 2022, 9 p.m. OK GNU C++17 (64) TESTS 34 280 9728000 1500
177709323 hitonanode D1 Oct. 24, 2022, 2:09 a.m. OK GNU C++17 (64) TESTS 45 280 30617600 1500
177654023 desh01 D1 Oct. 23, 2022, 1:58 p.m. OK GNU C++20 (64) TESTS 33 93 5836800 1500
177655638 desh01 D1 Oct. 23, 2022, 2:09 p.m. OK GNU C++20 (64) TESTS 33 108 5836800 1500
177703769 Tx_Lcy D1 Oct. 23, 2022, 11:35 p.m. OK GNU C++20 (64) TESTS 34 108 9932800 1500
177696013 VaeVictis D1 Oct. 23, 2022, 8:22 p.m. OK GNU C++20 (64) TESTS 34 108 25190400 1500
177639051 Well1ngt0n D1 Oct. 23, 2022, 11:53 a.m. OK GNU C++20 (64) TESTS 33 108 25190400 1500
177655379 desh01 D1 Oct. 23, 2022, 2:07 p.m. OK GNU C++20 (64) TESTS 33 109 5836800 1500
177651336 Siddharth2EEE D1 Oct. 23, 2022, 1:41 p.m. OK GNU C++20 (64) TESTS 33 109 7577600 1500
177651286 AnonymousGuy12 D1 Oct. 23, 2022, 1:41 p.m. OK GNU C++20 (64) TESTS 33 109 7577600 1500
177642361 QianLiQianQiu D1 Oct. 23, 2022, 12:04 p.m. OK GNU C++20 (64) TESTS 33 109 7577600 1500
177654324 Serikbek.A D1 Oct. 23, 2022, 2 p.m. OK GNU C++20 (64) TESTS 33 109 9011200 1500
177631118 shiro D1 Oct. 23, 2022, 11:25 a.m. OK Go TESTS 33 249 8601600 1500
177720507 MubtasimShahriar D1 Oct. 24, 2022, 5:25 a.m. OK Java 11 TESTS 47 420 14028800 1500
177631694 puriabhijit000 D1 Oct. 23, 2022, 11:27 a.m. OK Java 11 TESTS 33 451 11059200 1500
177635752 the_unseen D1 Oct. 23, 2022, 11:41 a.m. OK Java 11 TESTS 33 467 3481600 1500
177692705 Eslam_Ahmed D1 Oct. 23, 2022, 7:32 p.m. OK Java 11 TESTS 34 483 11776000 1500
177640764 dzhi D1 Oct. 23, 2022, 11:59 a.m. OK Java 11 TESTS 33 499 17817600 1500
177663728 doomhammer. D1 Oct. 23, 2022, 3:12 p.m. OK Java 11 TESTS 33 514 4608000 1500
177637450 kkkkush D1 Oct. 23, 2022, 11:48 a.m. OK Java 11 TESTS 33 530 14950400 1500
177636563 profchi D1 Oct. 23, 2022, 11:44 a.m. OK Java 11 TESTS 33 732 39833600 1500
177637518 ushikawa D1 Oct. 23, 2022, 11:48 a.m. OK Java 11 TESTS 33 1388 17408000 1500
177633192 pimonster D1 Oct. 23, 2022, 11:32 a.m. OK Java 11 TESTS 33 1466 4096000 1500
177652537 kkz666 D1 Oct. 23, 2022, 1:49 p.m. OK Java 17 TESTS 33 623 13107200 1500
177722810 Mamimi D1 Oct. 24, 2022, 5:58 a.m. OK Java 17 TESTS 47 638 30310400 1500
177639447 MrOtter D1 Oct. 23, 2022, 11:55 a.m. OK Java 17 TESTS 33 2121 68710400 1500
177656667 ljaewon97 D1 Oct. 23, 2022, 2:17 p.m. OK Java 8 TESTS 33 358 16281600 1500
177674740 pakkapapad D1 Oct. 23, 2022, 4:45 p.m. OK Java 8 TESTS 34 374 8294400 1500
177692677 Eslam_Ahmed D1 Oct. 23, 2022, 7:31 p.m. OK Java 8 TESTS 34 374 8499200 1500
177632140 arutsudar D1 Oct. 23, 2022, 11:28 a.m. OK Java 8 TESTS 33 389 9113600 1500
177656949 Mr.Awesome D1 Oct. 23, 2022, 2:19 p.m. OK Java 8 TESTS 33 420 2560000 1500
177654786 ikillmyself D1 Oct. 23, 2022, 2:04 p.m. OK Java 8 TESTS 33 420 3379200 1500
177634767 Swapniltri D1 Oct. 23, 2022, 11:38 a.m. OK Java 8 TESTS 33 780 3481600 1500
177655302 ikillmyself D1 Oct. 23, 2022, 2:07 p.m. OK Java 8 TESTS 33 810 3788800 1500
177634343 onenewbie D1 Oct. 23, 2022, 11:36 a.m. OK Java 8 TESTS 33 857 4505600 1500
177655787 Kaldaruly D1 Oct. 23, 2022, 2:10 p.m. OK Java 8 TESTS 33 1294 60825600 1500
177637128 stopthecount D1 Oct. 23, 2022, 11:46 a.m. OK Kotlin 1.6 TESTS 33 1013 36352000 1500
177684584 RottenCup D1 Oct. 23, 2022, 6:20 p.m. OK MS C++ 2017 TESTS 34 546 6451200 1500
177640757 ItamarNir D1 Oct. 23, 2022, 11:59 a.m. OK MS C++ 2017 TESTS 33 608 5836800 1500
177653926 Loremon D1 Oct. 23, 2022, 1:58 p.m. OK Node.js TESTS 33 421 43929600 1500
177636514 eepsilon D1 Oct. 23, 2022, 11:44 a.m. OK PyPy 3 TESTS 33 498 27545600 1500
177634302 Greyhound D1 Oct. 23, 2022, 11:36 a.m. OK PyPy 3 TESTS 33 670 23552000 1500
177640370 RedSpica D1 Oct. 23, 2022, 11:58 a.m. OK PyPy 3 TESTS 33 2401 50073600 1500
177633707 Shirotsume D1 Oct. 23, 2022, 11:34 a.m. OK PyPy 3 TESTS 33 2948 201932800 1500
177722995 xorahsan D1 Oct. 24, 2022, 6:01 a.m. OK PyPy 3 TESTS 47 2995 26624000 1500
177666065 Wooly18 D1 Oct. 23, 2022, 3:30 p.m. OK PyPy 3-64 TESTS 33 249 15360000 1500
177680068 mrdhnv D1 Oct. 23, 2022, 5:36 p.m. OK PyPy 3-64 TESTS 34 264 19456000 1500
177665032 mikeac D1 Oct. 23, 2022, 3:22 p.m. OK PyPy 3-64 TESTS 33 264 21811200 1500
177679857 mrdhnv D1 Oct. 23, 2022, 5:34 p.m. OK PyPy 3-64 TESTS 34 265 19660800 1500
177634139 zouyu9631 D1 Oct. 23, 2022, 11:35 a.m. OK PyPy 3-64 TESTS 33 265 20172800 1500
177629583 Maruzensky D1 Oct. 23, 2022, 11:20 a.m. OK PyPy 3-64 TESTS 33 265 30720000 1500
177638409 yathin.rasineni08 D1 Oct. 23, 2022, 11:51 a.m. OK PyPy 3-64 TESTS 33 280 14336000 1500
177666411 Wooly18 D1 Oct. 23, 2022, 3:33 p.m. OK PyPy 3-64 TESTS 33 280 15462400 1500
177692681 del-user-774348 D1 Oct. 23, 2022, 7:31 p.m. OK PyPy 3-64 TESTS 34 295 25804800 1500
177656846 DrMrogon D1 Oct. 23, 2022, 2:18 p.m. OK PyPy 3-64 TESTS 33 296 28467200 1500
177638420 Mansurbek D1 Oct. 23, 2022, 11:51 a.m. OK Python 3 TESTS 33 607 9216000 1500
177630714 Calliope D1 Oct. 23, 2022, 11:23 a.m. OK Python 3 TESTS 33 655 13312000 1500
177636869 sixthcore D1 Oct. 23, 2022, 11:45 a.m. OK Python 3 TESTS 33 748 10649600 1500
177673995 juandavidarce D1 Oct. 23, 2022, 4:39 p.m. OK Python 3 TESTS 34 873 13721600 1500
177681033 bisrat_walle D1 Oct. 23, 2022, 5:45 p.m. OK Python 3 TESTS 34 1434 144793600 1500
177663150 zschora D1 Oct. 23, 2022, 3:07 p.m. OK Python 3 TESTS 33 1450 8294400 1500
177637990 p.n.v.raj.pentapati D1 Oct. 23, 2022, 11:49 a.m. OK Python 3 TESTS 33 1450 8601600 1500
177691273 willzah D1 Oct. 23, 2022, 7:12 p.m. OK Python 3 TESTS 34 1481 10240000 1500
177640144 Endu D1 Oct. 23, 2022, 11:57 a.m. OK Python 3 TESTS 33 1560 6963200 1500
177639747 code_vkd_001 D1 Oct. 23, 2022, 11:56 a.m. OK Python 3 TESTS 33 1590 9318400 1500
177640004 Shinonome_Ena D1 Oct. 23, 2022, 11:57 a.m. OK Rust 2021 TESTS 33 78 6144000 1500
177700316 avnyu D1 Oct. 23, 2022, 9:46 p.m. OK Rust 2021 TESTS 34 108 34099200 1500
177630091 rustaurance D1 Oct. 23, 2022, 11:21 a.m. OK Rust 2021 TESTS 33 109 6144000 1500
177700219 avnyu D1 Oct. 23, 2022, 9:44 p.m. OK Rust 2021 TESTS 34 139 34099200 1500

remove filters

Back to search problems