Codeforces Round 616 (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
1291 Codeforces Round 616 (Div. 2) FINISHED False 9000 156700511 Feb. 2, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19758 ) A Even But Not Even PROGRAMMING greedy math strings 1000

B"Let's define a number ebne (even but not even) if and only if its sum of digits is divisible by 2 but the number itself is not divisible by 2 . For example, 13 , 1227 , 185217 are ebne numbers, while 12 , 2 , 177013 , 265918 are not. If you're still unsure what ebne numbers are, you can look at the sample notes for more clarification. You are given a non-negative integer s , consisting of n digits. You can delete some digits (they are not necessary consecutive/successive) to make the given number ebne. You cannot change the order of the digits, that is, after deleting the digits the remaining digits collapse. The resulting number shouldn't contain leading zeros. You can delete any number of digits between 0 (do not delete any digits at all) and n-1 . For example, if you are given s= 222373204424185217171912 then one of possible ways to make it ebne is: 222373204424185217171912 rightarrow 2237344218521717191. The sum of digits of 2237344218521717191 is equal to 70 and is divisible by 2 , but number itself is not divisible by 2 : it means that the resulting number is ebne. Find any resulting number that is ebne. If it's impossible to create an ebne number from the given number report about it. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 3000 ) -- the number of digits in the original number. The second line of each test case contains a non-negative integer number s , consisting of n digits. It is guaranteed that s does not contain leading zeros and the sum of n over all test cases does not exceed 3000 . For each test case given in the input print the answer in the following format: In the first test case"...

Tutorials

Codeforces Round #616 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
70204612 xianglli A Feb. 4, 2020, 5:53 a.m. OK Clang++17 Diagnostics TESTS 25 46 0 1000
70087371 i_will_be_less_than_zero A Feb. 2, 2020, 5:23 p.m. OK Clang++17 Diagnostics TESTS 24 61 10547200 1000
70105734 541907010414 A Feb. 3, 2020, 3:03 a.m. OK Clang++17 Diagnostics TESTS 25 62 6246400 1000
70313916 Jakub23 A Feb. 4, 2020, 8:09 p.m. OK Clang++17 Diagnostics TESTS 25 62 6348800 1000
71075952 ftiasch A Feb. 14, 2020, 5:19 p.m. OK D TESTS 25 31 4198400 1000
70061270 PAG A Feb. 2, 2020, 3:07 p.m. OK FPC TESTS 24 31 512000 1000
70074554 KieuTranCongNguyen A Feb. 2, 2020, 3:54 p.m. OK FPC TESTS 24 31 819200 1000
70103133 manhduc A Feb. 3, 2020, 1:19 a.m. OK FPC TESTS 25 31 921600 1000
70073947 tejava A Feb. 2, 2020, 3:51 p.m. OK GNU C11 TESTS 24 30 0 1000
70106577 eugalt A Feb. 3, 2020, 3:32 a.m. OK GNU C11 TESTS 25 30 0 1000
70161221 f20180638 A Feb. 3, 2020, 3:17 p.m. OK GNU C11 TESTS 25 30 921600 1000
70393850 f20190414 A Feb. 5, 2020, 8:08 p.m. OK GNU C11 TESTS 25 31 0 1000
70534053 HAORANN A Feb. 8, 2020, 1:32 a.m. OK GNU C11 TESTS 25 31 0 1000
70561255 prime235711 A Feb. 8, 2020, 11:56 a.m. OK GNU C11 TESTS 25 31 0 1000
70615842 2020FEB A Feb. 9, 2020, 9:57 a.m. OK GNU C11 TESTS 25 31 0 1000
70626832 mth1908 A Feb. 9, 2020, 1:29 p.m. OK GNU C11 TESTS 25 31 0 1000
70833533 romarioputra A Feb. 12, 2020, 9:18 a.m. OK GNU C11 TESTS 25 31 0 1000
71015009 imshahid A Feb. 13, 2020, 6:21 p.m. OK GNU C11 TESTS 25 31 0 1000
70390793 blackcoffee A Feb. 5, 2020, 7:05 p.m. OK GNU C++11 TESTS 25 15 0 1000
70052270 Srijon28 A Feb. 2, 2020, 2:43 p.m. OK GNU C++11 TESTS 24 15 0 1000
70053811 zrt0704 A Feb. 2, 2020, 2:47 p.m. OK GNU C++11 TESTS 24 15 0 1000
70078222 WinnieVenice A Feb. 2, 2020, 4:09 p.m. OK GNU C++11 TESTS 24 15 0 1000
70103930 i_wyxkk_ak A Feb. 3, 2020, 1:54 a.m. OK GNU C++11 TESTS 25 15 0 1000
70113669 smhh22 A Feb. 3, 2020, 6:26 a.m. OK GNU C++11 TESTS 25 15 0 1000
70120987 GGMU A Feb. 3, 2020, 8:41 a.m. OK GNU C++11 TESTS 25 15 0 1000
70680323 jxf378440404 A Feb. 9, 2020, 4:34 p.m. OK GNU C++11 TESTS 25 15 0 1000
70489498 hardik_899 A Feb. 7, 2020, 8:31 a.m. OK GNU C++11 TESTS 25 15 0 1000
71045184 henry-tb A Feb. 14, 2020, 8:12 a.m. OK GNU C++11 TESTS 25 30 0 1000
70474424 alejandrojsn A Feb. 7, 2020, 2:51 a.m. OK GNU C++14 TESTS 25 15 0 1000
71025545 Naseem17 A Feb. 13, 2020, 11:12 p.m. OK GNU C++14 TESTS 25 15 0 1000
70784619 Monuwar A Feb. 11, 2020, 11:56 a.m. OK GNU C++14 TESTS 25 15 0 1000
70764476 dhruv2000 A Feb. 11, 2020, 3:52 a.m. OK GNU C++14 TESTS 25 15 0 1000
70719302 nandika A Feb. 10, 2020, 9:38 a.m. OK GNU C++14 TESTS 25 15 0 1000
70625403 lliwinaci A Feb. 9, 2020, 1:03 p.m. OK GNU C++14 TESTS 25 15 0 1000
70623557 Proma A Feb. 9, 2020, 12:25 p.m. OK GNU C++14 TESTS 25 15 0 1000
70591192 SatishBehera_28 A Feb. 8, 2020, 8:29 p.m. OK GNU C++14 TESTS 25 15 0 1000
70583534 ag157 A Feb. 8, 2020, 5:56 p.m. OK GNU C++14 TESTS 25 15 0 1000
70573671 I_can_see_you A Feb. 8, 2020, 3:03 p.m. OK GNU C++14 TESTS 25 15 0 1000
70536044 2017212212083 A Feb. 8, 2020, 3:10 a.m. OK GNU C++17 TESTS 25 15 0 1000
70542351 Jonah00 A Feb. 8, 2020, 6:22 a.m. OK GNU C++17 TESTS 25 15 0 1000
70764474 gali-gay-gay A Feb. 11, 2020, 3:52 a.m. OK GNU C++17 TESTS 25 15 0 1000
70774368 SupermusicA A Feb. 11, 2020, 8:19 a.m. OK GNU C++17 TESTS 25 15 0 1000
70776657 thematdev A Feb. 11, 2020, 9:08 a.m. OK GNU C++17 TESTS 25 15 0 1000
70821325 _ISmOiL_ A Feb. 12, 2020, 4 a.m. OK GNU C++17 TESTS 25 15 0 1000
70919295 MBHuman A Feb. 12, 2020, 9:13 p.m. OK GNU C++17 TESTS 25 15 0 1000
70928625 Vayu2.0 A Feb. 13, 2020, 3:58 a.m. OK GNU C++17 TESTS 25 15 0 1000
71053371 jeff_seid A Feb. 14, 2020, 10:49 a.m. OK GNU C++17 TESTS 25 15 0 1000
71062384 pierre5340 A Feb. 14, 2020, 1:43 p.m. OK GNU C++17 TESTS 25 15 0 1000
70188378 fc-lib-xyz A Feb. 3, 2020, 11:56 p.m. OK Go TESTS 25 31 0 1000
70081172 ontake A Feb. 2, 2020, 4:22 p.m. OK Go TESTS 24 31 0 1000
70605629 SolomonWHG A Feb. 9, 2020, 6:40 a.m. OK Go TESTS 25 46 0 1000
70604921 SolomonWHG A Feb. 9, 2020, 6:21 a.m. OK Go TESTS 25 46 0 1000
70252017 Russell_Emerine A Feb. 4, 2020, 2:50 p.m. OK Haskell TESTS 25 62 102400 1000
70095107 WaheguruAnurag A Feb. 2, 2020, 7:53 p.m. OK Java 11 TESTS 25 171 0 1000
70096649 Clowyy A Feb. 2, 2020, 8:32 p.m. OK Java 11 TESTS 25 187 0 1000
70183092 ylghou A Feb. 3, 2020, 8:30 p.m. OK Java 11 TESTS 25 202 0 1000
70107964 gustavo_farani A Feb. 3, 2020, 4:11 a.m. OK Java 11 TESTS 25 202 0 1000
70100526 enricogi A Feb. 2, 2020, 10:58 p.m. OK Java 11 TESTS 25 202 0 1000
70095839 soumitri12 A Feb. 2, 2020, 8:11 p.m. OK Java 11 TESTS 25 202 0 1000
70076435 kaushal_jalan A Feb. 2, 2020, 4:02 p.m. OK Java 11 TESTS 24 202 0 1000
70060072 svitix A Feb. 2, 2020, 3:04 p.m. OK Java 11 TESTS 24 202 0 1000
70055931 nnsp635 A Feb. 2, 2020, 2:52 p.m. OK Java 11 TESTS 24 202 0 1000
70579853 StarWix A Feb. 8, 2020, 4:52 p.m. OK Java 11 TESTS 25 218 0 1000
71033843 satya_p54 A Feb. 14, 2020, 4:35 a.m. OK Java 8 TESTS 25 109 0 1000
71022988 robinz62 A Feb. 13, 2020, 9:21 p.m. OK Java 8 TESTS 25 109 0 1000
70624647 eslam.221 A Feb. 9, 2020, 12:48 p.m. OK Java 8 TESTS 25 109 0 1000
70440510 Pranay2516 A Feb. 6, 2020, 1:58 p.m. OK Java 8 TESTS 25 109 0 1000
70324163 r_sutaria A Feb. 5, 2020, 2:29 a.m. OK Java 8 TESTS 25 109 0 1000
70319322 bluesky111 A Feb. 4, 2020, 10:48 p.m. OK Java 8 TESTS 25 109 0 1000
70239292 eklompus A Feb. 4, 2020, 2:20 p.m. OK Java 8 TESTS 25 109 0 1000
70223463 Bhavya_Arora A Feb. 4, 2020, 10:49 a.m. OK Java 8 TESTS 25 109 0 1000
70164428 nandit A Feb. 3, 2020, 4:07 p.m. OK Java 8 TESTS 25 109 0 1000
70105372 luchy0120 A Feb. 3, 2020, 2:51 a.m. OK Java 8 TESTS 25 109 0 1000
70054427 macolby14 A Feb. 2, 2020, 2:49 p.m. OK JavaScript TESTS 24 31 0 1000
70828296 pseudonimoX A Feb. 12, 2020, 7:21 a.m. OK JavaScript TESTS 25 31 0 1000
70828023 pseudonimoX A Feb. 12, 2020, 7:15 a.m. OK JavaScript TESTS 25 31 0 1000
70835779 pseudonimoX A Feb. 12, 2020, 10:05 a.m. OK JavaScript TESTS 25 46 0 1000
70055694 dankarbay A Feb. 2, 2020, 2:52 p.m. OK JavaScript TESTS 24 46 0 1000
70836339 pseudonimoX A Feb. 12, 2020, 10:17 a.m. OK JavaScript TESTS 25 46 102400 1000
70055176 Rinat_ A Feb. 2, 2020, 2:51 p.m. OK JavaScript TESTS 24 46 102400 1000
70068393 vokesus A Feb. 2, 2020, 3:30 p.m. OK JavaScript TESTS 24 46 409600 1000
70056298 watarimaycry2 A Feb. 2, 2020, 2:53 p.m. OK JavaScript TESTS 24 46 1126400 1000
70103806 Spheniscine A Feb. 3, 2020, 1:49 a.m. OK Kotlin TESTS 25 109 0 1000
70503233 Rolion A Feb. 7, 2020, 12:47 p.m. OK Kotlin TESTS 25 155 0 1000
70073070 udoy A Feb. 2, 2020, 3:48 p.m. OK Kotlin TESTS 24 218 614400 1000
70093384 stanciu.adrian A Feb. 2, 2020, 7:12 p.m. OK Mono C# TESTS 25 46 0 1000
70562339 suslov93 A Feb. 8, 2020, 12:14 p.m. OK Mono C# TESTS 25 46 0 1000
70064928 Ruban_Denic A Feb. 2, 2020, 3:18 p.m. OK Mono C# TESTS 24 46 2252800 1000
70093674 stanciu.adrian A Feb. 2, 2020, 7:19 p.m. OK Mono C# TESTS 25 62 0 1000
70085849 TRR A Feb. 2, 2020, 5:07 p.m. OK Mono C# TESTS 24 62 0 1000
70067770 1champ10n A Feb. 2, 2020, 3:28 p.m. OK Mono C# TESTS 24 62 0 1000
70442448 wanderer-gray A Feb. 6, 2020, 2:23 p.m. OK Mono C# TESTS 25 62 0 1000
70572355 nastya1199 A Feb. 8, 2020, 2:42 p.m. OK Mono C# TESTS 25 62 102400 1000
70455483 mytas A Feb. 6, 2020, 5:21 p.m. OK Mono C# TESTS 25 62 102400 1000
70088237 ansergeyg A Feb. 2, 2020, 5:35 p.m. OK Mono C# TESTS 24 62 102400 1000
70715663 x_y A Feb. 10, 2020, 8:26 a.m. OK MS C++ TESTS 25 30 0 1000
70411348 vjudge3 A Feb. 6, 2020, 5:22 a.m. OK MS C++ TESTS 25 30 0 1000
70529269 tarattata1 A Feb. 7, 2020, 9:18 p.m. OK MS C++ TESTS 25 31 0 1000
70795260 najebe A Feb. 11, 2020, 3:18 p.m. OK MS C++ TESTS 25 31 0 1000
70423768 vjudge5 A Feb. 6, 2020, 9:29 a.m. OK MS C++ TESTS 25 31 0 1000
70339935 vjudge2 A Feb. 5, 2020, 8:10 a.m. OK MS C++ TESTS 25 31 0 1000
70229119 vjudge2 A Feb. 4, 2020, 11:57 a.m. OK MS C++ TESTS 25 31 0 1000
70430563 vjudge4 A Feb. 6, 2020, 11:21 a.m. OK MS C++ TESTS 25 31 0 1000
70519517 vjudge1 A Feb. 7, 2020, 5:24 p.m. OK MS C++ TESTS 25 31 0 1000
70413230 vjudge1 A Feb. 6, 2020, 6:09 a.m. OK MS C++ TESTS 25 31 0 1000
70054483 bibibihhh A Feb. 2, 2020, 2:49 p.m. OK MS C++ 2017 TESTS 24 30 0 1000
70056724 manav272 A Feb. 2, 2020, 2:54 p.m. OK MS C++ 2017 TESTS 24 30 0 1000
70766118 csDrugAddict A Feb. 11, 2020, 4:52 a.m. OK MS C++ 2017 TESTS 25 30 307200 1000
70233574 meanman A Feb. 4, 2020, 1:04 p.m. OK MS C++ 2017 TESTS 25 30 307200 1000
70217170 natehc A Feb. 4, 2020, 10:03 a.m. OK MS C++ 2017 TESTS 25 31 0 1000
70896197 vjudge4 A Feb. 12, 2020, 4:20 p.m. OK MS C++ 2017 TESTS 25 31 0 1000
70766304 GUESSER A Feb. 11, 2020, 4:58 a.m. OK MS C++ 2017 TESTS 25 31 0 1000
70466295 Tangerine A Feb. 6, 2020, 8:37 p.m. OK MS C++ 2017 TESTS 25 31 0 1000
70349879 Gee1 A Feb. 5, 2020, 10:36 a.m. OK MS C++ 2017 TESTS 25 31 0 1000
70317918 dimdem A Feb. 4, 2020, 9:52 p.m. OK MS C++ 2017 TESTS 25 31 0 1000
70066034 OrelHere A Feb. 2, 2020, 3:22 p.m. OK PascalABC.NET TESTS 24 358 614400 1000
70148709 rsFalse A Feb. 3, 2020, 12:26 p.m. OK Perl TESTS 25 46 0 1000
70133342 xlk A Feb. 3, 2020, 11:03 a.m. OK Perl TESTS 25 61 0 1000
70148040 rsFalse A Feb. 3, 2020, 12:16 p.m. OK Perl TESTS 25 62 0 1000
70562046 mayakin A Feb. 8, 2020, 12:09 p.m. OK PHP TESTS 25 46 409600 1000
70057140 Kiral55 A Feb. 2, 2020, 2:56 p.m. OK PHP TESTS 24 62 409600 1000
70053519 WhatsCode A Feb. 2, 2020, 2:46 p.m. OK PyPy 2 TESTS 24 186 2560000 1000
70323696 aaa_bbb_ccc A Feb. 5, 2020, 2:14 a.m. OK PyPy 2 TESTS 25 202 2150400 1000
70095416 e2468015 A Feb. 2, 2020, 8 p.m. OK PyPy 2 TESTS 25 218 921600 1000
70204438 Gaurav1 A Feb. 4, 2020, 5:49 a.m. OK PyPy 2 TESTS 25 233 2048000 1000
70148349 TimurABS A Feb. 3, 2020, 12:20 p.m. OK PyPy 3 TESTS 25 155 2048000 1000
70148082 TimurABS A Feb. 3, 2020, 12:16 p.m. OK PyPy 3 TESTS 25 155 2048000 1000
70231780 KirKhal A Feb. 4, 2020, 12:39 p.m. OK PyPy 3 TESTS 25 155 2764800 1000
70052386 zqx1392 A Feb. 2, 2020, 2:44 p.m. OK PyPy 3 TESTS 24 170 1945600 1000
70062245 chkdmin A Feb. 2, 2020, 3:10 p.m. OK PyPy 3 TESTS 24 171 1945600 1000
70050196 vaibhavsarda A Feb. 2, 2020, 2:38 p.m. OK PyPy 3 TESTS 24 171 2457600 1000
70055073 pranavcool4 A Feb. 2, 2020, 2:50 p.m. OK PyPy 3 TESTS 24 171 2560000 1000
70094516 apoorvwatsky A Feb. 2, 2020, 7:39 p.m. OK PyPy 3 TESTS 25 171 3174400 1000
70052224 sam997 A Feb. 2, 2020, 2:43 p.m. OK PyPy 3 TESTS 24 186 3072000 1000
70097043 shinsusenju A Feb. 2, 2020, 8:43 p.m. OK PyPy 3 TESTS 25 186 3891200 1000
70184932 elistark A Feb. 3, 2020, 9:21 p.m. OK Python 2 TESTS 25 171 0 1000
70052788 Mike10 A Feb. 2, 2020, 2:45 p.m. OK Python 2 TESTS 24 202 102400 1000
70093201 Maryam_Oly A Feb. 2, 2020, 7:08 p.m. OK Python 3 TESTS 25 108 0 1000
70087585 udd_jaa A Feb. 2, 2020, 5:26 p.m. OK Python 3 TESTS 24 108 0 1000
70105574 ashishkirtiwed A Feb. 3, 2020, 2:57 a.m. OK Python 3 TESTS 25 108 307200 1000
70091594 a4aakash A Feb. 2, 2020, 6:34 p.m. OK Python 3 TESTS 25 108 307200 1000
70103674 UVK_15 A Feb. 3, 2020, 1:44 a.m. OK Python 3 TESTS 25 108 512000 1000
70776098 durgesh30508 A Feb. 11, 2020, 8:56 a.m. OK Python 3 TESTS 25 109 0 1000
70751617 LintuStorm A Feb. 10, 2020, 7:14 p.m. OK Python 3 TESTS 25 109 0 1000
70538381 mr.devil7 A Feb. 8, 2020, 4:44 a.m. OK Python 3 TESTS 25 109 0 1000
70468485 tushar284 A Feb. 6, 2020, 9:53 p.m. OK Python 3 TESTS 25 109 0 1000
70356526 vismaya A Feb. 5, 2020, 12:21 p.m. OK Python 3 TESTS 25 109 0 1000
70055536 f67 A Feb. 2, 2020, 2:51 p.m. OK Ruby TESTS 24 124 102400 1000
70654191 terraformer A Feb. 9, 2020, 2:50 p.m. OK Rust TESTS 25 31 0 1000
70054551 motoras A Feb. 2, 2020, 2:49 p.m. OK Rust TESTS 24 46 0 1000
70057479 hir12111 A Feb. 2, 2020, 2:56 p.m. OK Rust TESTS 24 46 102400 1000

remove filters

Back to search problems