Codeforces Round 670 (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
1406 Codeforces Round 670 (Div. 2) FINISHED False 7200 131904899 Sept. 12, 2020, 1:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21556 ) A Subset Mex PROGRAMMING greedy implementation math

B"Given a set of integers (it can contain equal elements). You have to split it into two subsets A and B (both of them can contain equal elements or be empty). You have to maximize the value of mex(A)+mex(B) . Here mex of a set denotes the smallest non-negative integer that doesn't exist in the set. For example: The set is splitted into two subsets A and B if for any integer number x the number of occurrences of x into this set is equal to the sum of the number of occurrences of x into A and the number of occurrences of x into B . The input consists of multiple test cases. The first line contains an integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n ( 1 <= q n <= q 100 ) -- the size of the set. The second line of each testcase contains n integers a_1,a_2, ... a_n ( 0 <= q a_i <= q 100 ) -- the numbers in the set. For each test case, print the maximum value of mex(A)+mex(B) . In the first test case, A= <= ft {0,1,2 right },B= <= ft {0,1,5 right } is a possible choice. In the second test case, A= <= ft {0,1,2 right },B= varnothing is a possible choice. In the third test case, A= <= ft {0,1,2 right },B= <= ft {0 right } is a possible choice. In the fourth test case, A= <= ft {1,3,5 right },B= <= ft {2,4,6 right } is a possible choice. "...

Tutorials

Codeforces Round #670 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
92648073 kumaranoop900 A Sept. 12, 2020, 4:38 p.m. OK Clang++17 Diagnostics TESTS 9 77 0
92658333 degmuk A Sept. 12, 2020, 6:32 p.m. OK FPC TESTS 9 31 0
92671512 ndocx A Sept. 13, 2020, 12:22 a.m. OK FPC TESTS 9 31 102400
92644608 CAPHENY A Sept. 12, 2020, 4:17 p.m. OK GNU C11 TESTS 9 15 0
92652250 star_force A Sept. 12, 2020, 5:18 p.m. OK GNU C11 TESTS 9 15 0
92673215 eugalt A Sept. 13, 2020, 1:27 a.m. OK GNU C11 TESTS 9 15 0
92678798 nitinkumar1729 A Sept. 13, 2020, 4:02 a.m. OK GNU C11 TESTS 9 15 0
92671684 eugalt A Sept. 13, 2020, 12:28 a.m. OK GNU C11 TESTS 9 30 0
92671718 eugalt A Sept. 13, 2020, 12:30 a.m. OK GNU C11 TESTS 9 30 0
92676809 kanik0 A Sept. 13, 2020, 3:10 a.m. OK GNU C11 TESTS 9 30 0
92676341 rubel.uu47cse A Sept. 13, 2020, 2:58 a.m. OK GNU C11 TESTS 9 31 0
92676260 fahimalhasan2019 A Sept. 13, 2020, 2:56 a.m. OK GNU C11 TESTS 9 31 0
92650685 chowdhuryshashwoto A Sept. 12, 2020, 5:02 p.m. OK GNU C11 TESTS 9 31 0
92676906 gyh20 A Sept. 13, 2020, 3:12 a.m. OK GNU C++11 TESTS 9 15 0
92684094 HLJD_HappyGuy1290 A Sept. 13, 2020, 5:43 a.m. OK GNU C++11 TESTS 9 15 0
92679500 zknpy A Sept. 13, 2020, 4:19 a.m. OK GNU C++11 TESTS 9 15 0
92677850 Heisexingqitian A Sept. 13, 2020, 3:36 a.m. OK GNU C++11 TESTS 9 15 0
92677199 ljfty A Sept. 13, 2020, 3:20 a.m. OK GNU C++11 TESTS 9 15 0
92675981 vjudge2 A Sept. 13, 2020, 2:48 a.m. OK GNU C++11 TESTS 9 15 0
92675754 WaluntOvO A Sept. 13, 2020, 2:42 a.m. OK GNU C++11 TESTS 9 15 0
92675313 luogu_bot1 A Sept. 13, 2020, 2:31 a.m. OK GNU C++11 TESTS 9 15 0
92673847 AnicoderAndy A Sept. 13, 2020, 1:47 a.m. OK GNU C++11 TESTS 9 15 0
92673522 so_ysc A Sept. 13, 2020, 1:36 a.m. OK GNU C++11 TESTS 9 15 0
92677500 kiliet A Sept. 13, 2020, 3:28 a.m. OK GNU C++14 TESTS 9 15 0
92682212 jayanth_naidu A Sept. 13, 2020, 5:13 a.m. OK GNU C++14 TESTS 9 15 0
92683125 clarkent A Sept. 13, 2020, 5:27 a.m. OK GNU C++14 TESTS 9 15 0
92642838 devansh.pant02 A Sept. 12, 2020, 4:10 p.m. OK GNU C++14 TESTS 9 15 0
92644984 Sourabh1610 A Sept. 12, 2020, 4:19 p.m. OK GNU C++14 TESTS 9 15 0
92646987 sj555 A Sept. 12, 2020, 4:30 p.m. OK GNU C++14 TESTS 9 15 0
92648018 ishan_sharma A Sept. 12, 2020, 4:37 p.m. OK GNU C++14 TESTS 9 15 102400
92657256 Kaivalya5 A Sept. 12, 2020, 6:18 p.m. OK GNU C++14 TESTS 9 15 102400
92683635 Abhi1998 A Sept. 13, 2020, 5:35 a.m. OK GNU C++14 TESTS 9 15 102400
92643472 sahilcool193 A Sept. 12, 2020, 4:11 p.m. OK GNU C++14 TESTS 9 15 204800
92649450 rajnish_pandey05 A Sept. 12, 2020, 4:50 p.m. OK GNU C++17 TESTS 9 15 0
92680344 _Ocean_ A Sept. 13, 2020, 4:38 a.m. OK GNU C++17 TESTS 9 15 0
92675622 tzy666 A Sept. 13, 2020, 2:40 a.m. OK GNU C++17 TESTS 9 15 0
92672812 yiwangzhifeng A Sept. 13, 2020, 1:14 a.m. OK GNU C++17 TESTS 9 15 0
92672246 shaswat01 A Sept. 13, 2020, 12:53 a.m. OK GNU C++17 TESTS 9 15 0
92662373 aayush_84719 A Sept. 12, 2020, 7:35 p.m. OK GNU C++17 TESTS 9 15 0
92658704 fillleon A Sept. 12, 2020, 6:37 p.m. OK GNU C++17 TESTS 9 15 0
92657786 MVP_Harry A Sept. 12, 2020, 6:25 p.m. OK GNU C++17 TESTS 9 15 0
92680769 VictorW A Sept. 13, 2020, 4:47 a.m. OK GNU C++17 TESTS 9 15 0
92656103 _idgaf_ A Sept. 12, 2020, 6:03 p.m. OK GNU C++17 TESTS 9 15 0
92656874 cse180001045 A Sept. 12, 2020, 6:12 p.m. OK GNU C++17 (64) TESTS 9 15 0
92676877 tzaph_ A Sept. 13, 2020, 3:11 a.m. OK GNU C++17 (64) TESTS 9 15 0
92676102 Ananddubey01 A Sept. 13, 2020, 2:51 a.m. OK GNU C++17 (64) TESTS 9 15 0
92670459 BugLeave A Sept. 12, 2020, 11:24 p.m. OK GNU C++17 (64) TESTS 9 15 0
92666701 user9029 A Sept. 12, 2020, 9:07 p.m. OK GNU C++17 (64) TESTS 9 15 0
92665677 hltk A Sept. 12, 2020, 8:40 p.m. OK GNU C++17 (64) TESTS 9 15 0
92663227 12tqian A Sept. 12, 2020, 7:49 p.m. OK GNU C++17 (64) TESTS 9 15 0
92661504 conquizztador A Sept. 12, 2020, 7:20 p.m. OK GNU C++17 (64) TESTS 9 15 0
92652810 gameofcodes A Sept. 12, 2020, 5:24 p.m. OK GNU C++17 (64) TESTS 9 15 0
92651391 scoobyDoobyDoo A Sept. 12, 2020, 5:09 p.m. OK GNU C++17 (64) TESTS 9 15 0
92659259 dsys A Sept. 12, 2020, 6:45 p.m. OK Go TESTS 9 31 102400
92660560 Awa149 A Sept. 12, 2020, 7:05 p.m. OK Go TESTS 9 124 0
92654474 gssakash A Sept. 12, 2020, 5:44 p.m. OK Java 11 TESTS 9 155 0
92668434 codehacker003 A Sept. 12, 2020, 9:58 p.m. OK Java 11 TESTS 9 170 0
92660282 qlf9 A Sept. 12, 2020, 7 p.m. OK Java 11 TESTS 9 170 0
92675137 codego144 A Sept. 13, 2020, 2:26 a.m. OK Java 11 TESTS 9 171 0
92681832 harshvijayvargiya8 A Sept. 13, 2020, 5:07 a.m. OK Java 11 TESTS 9 171 0
92680847 anshum_it_is A Sept. 13, 2020, 4:48 a.m. OK Java 11 TESTS 9 171 0
92673908 dmw A Sept. 13, 2020, 1:49 a.m. OK Java 11 TESTS 9 171 0
92670416 jaynils A Sept. 12, 2020, 11:22 p.m. OK Java 11 TESTS 9 171 0
92670013 housni A Sept. 12, 2020, 11:03 p.m. OK Java 11 TESTS 9 171 0
92667083 bluesky111 A Sept. 12, 2020, 9:17 p.m. OK Java 11 TESTS 9 171 0
92658284 GortenMorsa A Sept. 12, 2020, 6:31 p.m. OK Java 8 TESTS 9 93 0
92678478 tarun_sm A Sept. 13, 2020, 3:53 a.m. OK Java 8 TESTS 9 108 0
92667087 ElectronicsEngineer A Sept. 12, 2020, 9:17 p.m. OK Java 8 TESTS 9 108 0
92666211 gawsfbet A Sept. 12, 2020, 8:54 p.m. OK Java 8 TESTS 9 108 0
92657088 GortenMorsa A Sept. 12, 2020, 6:15 p.m. OK Java 8 TESTS 9 108 0
92654535 Pranay2516 A Sept. 12, 2020, 5:45 p.m. OK Java 8 TESTS 9 108 0
92678520 Utkarshn101 A Sept. 13, 2020, 3:54 a.m. OK Java 8 TESTS 9 108 0
92651758 O-infinity A Sept. 12, 2020, 5:13 p.m. OK Java 8 TESTS 9 108 0
92679406 shwetank_verma A Sept. 13, 2020, 4:16 a.m. OK Java 8 TESTS 9 108 0
92678098 Prafful_78 A Sept. 13, 2020, 3:42 a.m. OK Java 8 TESTS 9 109 0
92679058 Spheniscine A Sept. 13, 2020, 4:08 a.m. OK Kotlin TESTS 9 124 0
92672992 Spheniscine A Sept. 13, 2020, 1:20 a.m. OK Kotlin TESTS 9 140 1638400
92659200 v4_adi A Sept. 12, 2020, 6:44 p.m. OK Kotlin TESTS 9 155 2252800
92677604 fgwiebfaoish A Sept. 13, 2020, 3:31 a.m. OK Mono C# TESTS 9 62 512000
92679061 azukun A Sept. 13, 2020, 4:08 a.m. OK Mono C# TESTS 9 77 4300800
92657351 DiSTRuCtO A Sept. 12, 2020, 6:19 p.m. OK MS C++ 2017 TESTS 9 31 0
92660626 ustaritz A Sept. 12, 2020, 7:06 p.m. OK MS C++ 2017 TESTS 9 31 0
92652823 exode4 A Sept. 12, 2020, 5:25 p.m. OK MS C++ 2017 TESTS 9 31 0
92647078 little_lion A Sept. 12, 2020, 4:31 p.m. OK MS C++ 2017 TESTS 9 31 0
92646567 ustaritz A Sept. 12, 2020, 4:28 p.m. OK MS C++ 2017 TESTS 9 31 0
92645681 ZagrebaevILoveYou A Sept. 12, 2020, 4:22 p.m. OK MS C++ 2017 TESTS 9 31 0
92643800 megatortik A Sept. 12, 2020, 4:13 p.m. OK MS C++ 2017 TESTS 9 31 0
92644463 npc-number3 A Sept. 12, 2020, 4:16 p.m. OK MS C++ 2017 TESTS 9 31 102400
92651530 DiSTRuCtO A Sept. 12, 2020, 5:11 p.m. OK MS C++ 2017 TESTS 9 46 0
92660865 ustaritz A Sept. 12, 2020, 7:10 p.m. OK MS C++ 2017 TESTS 9 46 0
92646768 explorer_sifat A Sept. 12, 2020, 4:29 p.m. OK Node.js TESTS 9 62 204800
92650638 tutai A Sept. 12, 2020, 5:01 p.m. OK Node.js TESTS 9 108 1331200
92657661 jrsantos18 A Sept. 12, 2020, 6:23 p.m. OK Node.js TESTS 9 109 2457600
92656690 jrsantos18 A Sept. 12, 2020, 6:10 p.m. OK Node.js TESTS 9 109 2560000
92643520 raj1307 A Sept. 12, 2020, 4:12 p.m. OK PyPy 2 TESTS 9 108 1126400
92652882 varsha765.vc A Sept. 12, 2020, 5:25 p.m. OK PyPy 3 TESTS 9 140 1433600
92657459 hackzing404 A Sept. 12, 2020, 6:20 p.m. OK PyPy 3 TESTS 9 140 1536000
92647888 AmooQ A Sept. 12, 2020, 4:36 p.m. OK PyPy 3 TESTS 9 140 1536000
92672071 ayaoni A Sept. 13, 2020, 12:46 a.m. OK PyPy 3 TESTS 9 140 1638400
92642892 Nifer A Sept. 12, 2020, 4:10 p.m. OK PyPy 3 TESTS 9 140 1638400
92653888 lakshyaaggarwal A Sept. 12, 2020, 5:37 p.m. OK PyPy 3 TESTS 9 140 1740800
92653206 alex_code A Sept. 12, 2020, 5:29 p.m. OK PyPy 3 TESTS 9 140 3072000
92646087 neweekoff A Sept. 12, 2020, 4:24 p.m. OK PyPy 3 TESTS 9 155 1433600
92678699 vinayak333 A Sept. 13, 2020, 3:59 a.m. OK PyPy 3 TESTS 9 155 1536000
92659964 crystaalroo A Sept. 12, 2020, 6:56 p.m. OK PyPy 3 TESTS 9 155 1536000
92648689 sam15jain A Sept. 12, 2020, 4:43 p.m. OK Python 3 TESTS 9 93 0
92654487 sh1194 A Sept. 12, 2020, 5:44 p.m. OK Python 3 TESTS 9 93 0
92647880 shohidulpolash A Sept. 12, 2020, 4:36 p.m. OK Python 3 TESTS 9 93 0
92658824 ishaans1 A Sept. 12, 2020, 6:39 p.m. OK Python 3 TESTS 9 93 307200
92683941 nk007 A Sept. 13, 2020, 5:40 a.m. OK Python 3 TESTS 9 93 307200
92682684 Nikhil1002 A Sept. 13, 2020, 5:21 a.m. OK Python 3 TESTS 9 93 307200
92672211 vibhu8447 A Sept. 13, 2020, 12:52 a.m. OK Python 3 TESTS 9 93 307200
92666494 ank_sh A Sept. 12, 2020, 9:01 p.m. OK Python 3 TESTS 9 93 307200
92661782 a4vrlyui A Sept. 12, 2020, 7:25 p.m. OK Python 3 TESTS 9 93 307200
92658974 Dineshlimbu A Sept. 12, 2020, 6:41 p.m. OK Python 3 TESTS 9 93 307200
92656066 wow_ok A Sept. 12, 2020, 6:02 p.m. OK Ruby TESTS 9 514 307200
92656567 wow_ok A Sept. 12, 2020, 6:08 p.m. OK Ruby TESTS 9 561 204800
92677737 akks800 A Sept. 13, 2020, 3:34 a.m. OK Rust TESTS 9 15 204800
92676155 Ramadoka. A Sept. 13, 2020, 2:53 a.m. OK Rust TESTS 9 31 102400
92672814 sansen A Sept. 13, 2020, 1:14 a.m. OK Rust TESTS 9 31 307200
92667277 rurik A Sept. 12, 2020, 9:23 p.m. OK Scala TESTS 9 499 512000

remove filters

Back to search problems