Codeforces Round 603 (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
1263 Codeforces Round 603 (Div. 2) FINISHED False 7200 162401087 Nov. 29, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11461 ) B PIN Codes PROGRAMMING greedy implementation 1400

B"A PIN code is a string that consists of exactly 4 digits. Examples of possible PIN codes: 7013, 0000 and 0990. Please note that the PIN code can begin with any digit, even with 0. Polycarp has n ( 2 <= n <= 10 ) bank cards, the PIN code of the i -th card is p_i . Polycarp has recently read a recommendation that it is better to set different PIN codes on different cards. Thus he wants to change the minimal number of digits in the PIN codes of his cards so that all n codes would become different. Formally, in one step, Polycarp picks i -th card ( 1 <= i <= n ), then in its PIN code p_i selects one position (from 1 to 4 ), and changes the digit in this position to any other. He needs to change the minimum number of digits so that all PIN codes become different. Polycarp quickly solved this problem. Can you solve it? The first line contains integer t ( 1 <= t <= 100 ) -- the number of test cases in the input. Then test cases follow. The first line of each of t test sets contains a single integer n ( 2 <= n <= 10 ) -- the number of Polycarp's bank cards. The next n lines contain the PIN codes p_1, p_2, ... , p_n -- one per line. The length of each of them is 4 . All PIN codes consist of digits only. Print the answers to t test sets. The answer to each set should consist of a n + 1 lines In the first line print k -- the least number of changes to make all PIN codes different. In the next n lines output the changed PIN codes in the order corresponding to their appearance in the input. If there are several optimal answers, print any of them. "...

Tutorials

Разбор Codeforces Round #603 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66575084 vjudge2 B Dec. 10, 2019, 6:55 a.m. OK Clang++17 Diagnostics TESTS 19 46 0 1400
66399690 bo233 B Dec. 6, 2019, 11:55 a.m. OK Clang++17 Diagnostics TESTS 19 46 0 1400
66372784 kjt B Dec. 5, 2019, 11:52 p.m. OK Clang++17 Diagnostics TESTS 19 46 0 1400
66311716 CapNemo B Dec. 5, 2019, 11:40 a.m. OK Clang++17 Diagnostics TESTS 19 61 0 1400
66042258 iica B Nov. 30, 2019, 1:57 p.m. OK D TESTS 19 31 102400 1400
65986537 ruban B Nov. 29, 2019, 4:11 p.m. OK Delphi TESTS 18 31 70451200 1400
66014184 StEpAn_123 B Nov. 30, 2019, 4:30 a.m. OK FPC TESTS 19 30 102400 1400
68647406 vjudge4 B Jan. 12, 2020, 9:33 a.m. OK GNU C11 TESTS 19 30 0 1400
68983538 vjudge1 B Jan. 17, 2020, 11:39 a.m. OK GNU C11 TESTS 19 31 0 1400
66158068 kaiboy B Dec. 2, 2019, 1:25 a.m. OK GNU C11 TESTS 19 31 0 1400
66246628 akshatdalton B Dec. 3, 2019, 8:58 p.m. OK GNU C11 TESTS 19 31 0 1400
66267348 SkuLexX B Dec. 4, 2019, 11 a.m. OK GNU C11 TESTS 19 31 0 1400
66309021 romarioputra B Dec. 5, 2019, 10:40 a.m. OK GNU C11 TESTS 19 31 0 1400
66509720 vjudge3 B Dec. 8, 2019, 3:55 p.m. OK GNU C11 TESTS 19 31 0 1400
67414322 satya_chaitanya B Dec. 22, 2019, 9:21 a.m. OK GNU C11 TESTS 19 31 0 1400
67506706 rahulgoel B Dec. 24, 2019, 7:34 a.m. OK GNU C11 TESTS 19 31 0 1400
68588804 vjudge1 B Jan. 11, 2020, 12:04 p.m. OK GNU C11 TESTS 19 31 0 1400
66150915 i_m_Shakil B Dec. 1, 2019, 6:56 p.m. OK GNU C++11 TESTS 19 15 0 1400
66216056 lirh8121099 B Dec. 3, 2019, 8:57 a.m. OK GNU C++11 TESTS 19 15 0 1400
66232321 Crate B Dec. 3, 2019, 2:52 p.m. OK GNU C++11 TESTS 19 15 0 1400
66386651 No_CodeNoLifeSyy B Dec. 6, 2019, 7:44 a.m. OK GNU C++11 TESTS 19 15 0 1400
66444736 gandharv_01 B Dec. 7, 2019, 9:13 a.m. OK GNU C++11 TESTS 19 15 0 1400
66483509 cheetose B Dec. 8, 2019, 4:50 a.m. OK GNU C++11 TESTS 19 15 0 1400
67454342 jslijin B Dec. 23, 2019, 6:07 a.m. OK GNU C++11 TESTS 19 15 0 1400
66585308 vjudge1 B Dec. 10, 2019, 10:56 a.m. OK GNU C++11 TESTS 19 15 0 1400
66523680 cyclexit B Dec. 9, 2019, 2:24 a.m. OK GNU C++11 TESTS 19 15 0 1400
66506616 nuchenghao B Dec. 8, 2019, 2:41 p.m. OK GNU C++11 TESTS 19 15 0 1400
67382851 InshaAllah B Dec. 21, 2019, 4:52 p.m. OK GNU C++14 TESTS 19 15 0 1400
69259576 mello369 B Jan. 21, 2020, 4:39 p.m. OK GNU C++14 TESTS 19 15 0 1400
69065830 AndreiS B Jan. 18, 2020, 6:35 p.m. OK GNU C++14 TESTS 19 15 0 1400
68873228 rtlmhjbn B Jan. 15, 2020, 4 p.m. OK GNU C++14 TESTS 19 15 0 1400
68458653 ashu12_chi B Jan. 9, 2020, 5:15 p.m. OK GNU C++14 TESTS 19 15 0 1400
67859471 vjudge2 B Dec. 29, 2019, 7:31 a.m. OK GNU C++14 TESTS 19 15 0 1400
67758422 Muhammad_Hokimiyon B Dec. 27, 2019, 8:36 p.m. OK GNU C++14 TESTS 19 15 0 1400
67461256 Adi1169 B Dec. 23, 2019, 9:15 a.m. OK GNU C++14 TESTS 19 15 0 1400
67443883 SebasV8 B Dec. 22, 2019, 8:48 p.m. OK GNU C++14 TESTS 19 15 0 1400
67403145 _FariD_ B Dec. 22, 2019, 5:06 a.m. OK GNU C++14 TESTS 19 15 0 1400
68300337 vindicate_code B Jan. 6, 2020, 6:10 a.m. OK GNU C++17 TESTS 19 15 0 1400
68431145 prince_24 B Jan. 9, 2020, 6:53 a.m. OK GNU C++17 TESTS 19 15 0 1400
68880219 Abhayp001 B Jan. 15, 2020, 6:28 p.m. OK GNU C++17 TESTS 19 15 0 1400
69022074 vjudge4 B Jan. 18, 2020, 6:32 a.m. OK GNU C++17 TESTS 19 15 0 1400
69025291 vjudge1 B Jan. 18, 2020, 7:06 a.m. OK GNU C++17 TESTS 19 15 0 1400
69074659 vjudge5 B Jan. 19, 2020, 2:03 a.m. OK GNU C++17 TESTS 19 15 0 1400
69267369 deepGajera18 B Jan. 21, 2020, 7:09 p.m. OK GNU C++17 TESTS 19 15 0 1400
69284056 19045221xay B Jan. 22, 2020, 7:20 a.m. OK GNU C++17 TESTS 19 15 0 1400
69652517 bidirectionalprograming B Jan. 28, 2020, 6:01 a.m. OK GNU C++17 TESTS 19 15 0 1400
69815268 wish2lucky B Jan. 30, 2020, 5:57 a.m. OK GNU C++17 TESTS 19 15 0 1400
68234392 amarjeetanand B Jan. 5, 2020, 10:23 a.m. OK Go TESTS 19 31 0 1400
66017299 maguroguma B Nov. 30, 2019, 5:59 a.m. OK Go TESTS 19 31 0 1400
68148355 amarjeetanand B Jan. 4, 2020, 5:45 a.m. OK Go TESTS 19 46 0 1400
68147393 amarjeetanand B Jan. 4, 2020, 5:14 a.m. OK Go TESTS 19 46 0 1400
66065537 mikolaychuknn B Nov. 30, 2019, 7:20 p.m. OK Go TESTS 19 46 0 1400
66028425 maguroguma B Nov. 30, 2019, 9:23 a.m. OK Go TESTS 19 46 0 1400
66414196 Laurens B Dec. 6, 2019, 4:25 p.m. OK Haskell TESTS 19 46 102400 1400
67978603 machhra B Dec. 30, 2019, 6:04 p.m. OK Java 11 TESTS 19 171 0 1400
67602625 Tarun27 B Dec. 25, 2019, 12:28 p.m. OK Java 11 TESTS 19 171 0 1400
66026261 1NVAL1D B Nov. 30, 2019, 8:47 a.m. OK Java 11 TESTS 19 171 0 1400
66152712 kiberKotleta2009 B Dec. 1, 2019, 7:54 p.m. OK Java 11 TESTS 19 186 0 1400
66248388 enricogi B Dec. 3, 2019, 10:27 p.m. OK Java 11 TESTS 19 187 0 1400
66015057 davisrollman B Nov. 30, 2019, 4:59 a.m. OK Java 11 TESTS 19 187 0 1400
66297708 Ash3008Kr B Dec. 5, 2019, 5:27 a.m. OK Java 11 TESTS 19 202 0 1400
66026961 1NVAL1D B Nov. 30, 2019, 8:58 a.m. OK Java 11 TESTS 19 202 0 1400
67670254 cribabby B Dec. 26, 2019, 7:58 p.m. OK Java 11 TESTS 19 217 0 1400
67495361 pushpraj17307 B Dec. 23, 2019, 10:12 p.m. OK Java 11 TESTS 19 217 0 1400
66388896 romit17 spectre009 B Dec. 6, 2019, 8:27 a.m. OK Java 8 TESTS 19 108 0 1400
66123731 kocko B Dec. 1, 2019, 10:22 a.m. OK Java 8 TESTS 19 108 0 1400
65994923 Washoum B Nov. 29, 2019, 5:24 p.m. OK Java 8 TESTS 18 108 0 1400
65984165 wretar B Nov. 29, 2019, 4 p.m. OK Java 8 TESTS 18 108 0 1400
69222986 kostasanemozalis B Jan. 21, 2020, 5:46 a.m. OK Java 8 TESTS 19 109 0 1400
67502136 gouh9qn B Dec. 24, 2019, 5:21 a.m. OK Java 8 TESTS 19 109 0 1400
67178237 Akshita_Maheshwari B Dec. 18, 2019, 8:31 p.m. OK Java 8 TESTS 19 109 0 1400
66571258 Lavrov B Dec. 10, 2019, 4:41 a.m. OK Java 8 TESTS 19 109 0 1400
66390490 Oland B Dec. 6, 2019, 8:58 a.m. OK Java 8 TESTS 19 109 0 1400
66359782 rameshwar17180 B Dec. 5, 2019, 5:26 p.m. OK Java 8 TESTS 19 109 0 1400
65989345 rndg B Nov. 29, 2019, 4:24 p.m. OK JavaScript TESTS 18 31 512000 1400
66010141 Spheniscine B Nov. 30, 2019, 1:53 a.m. OK Kotlin TESTS 19 124 0 1400
65987613 AlexPaniman B Nov. 29, 2019, 4:16 p.m. OK Kotlin TESTS 18 187 1228800 1400
66151960 Leniwwwiy B Dec. 1, 2019, 7:28 p.m. OK Mono C# TESTS 19 61 0 1400
66235665 ansergeyg B Dec. 3, 2019, 4:03 p.m. OK Mono C# TESTS 19 62 102400 1400
65993514 hyzhangzhy B Nov. 29, 2019, 5:11 p.m. OK Mono C# TESTS 18 62 3788800 1400
66307247 nastya1199 B Dec. 5, 2019, 9:54 a.m. OK Mono C# TESTS 19 77 3788800 1400
66812378 csgo B Dec. 14, 2019, 3:41 a.m. OK Mono C# TESTS 19 77 33996800 1400
65988249 dev8546 B Nov. 29, 2019, 4:19 p.m. OK Mono C# TESTS 18 93 4096000 1400
69882430 vjudge2 B Jan. 31, 2020, 6:53 a.m. OK MS C++ TESTS 19 15 0 1400
67028170 vjudge4 B Dec. 16, 2019, 3 p.m. OK MS C++ TESTS 19 30 0 1400
66466820 kinanrod B Dec. 7, 2019, 4:49 p.m. OK MS C++ TESTS 19 30 0 1400
66638531 vjudge1 B Dec. 11, 2019, 1:51 p.m. OK MS C++ TESTS 19 30 0 1400
66781191 vjudge4 B Dec. 13, 2019, 12:04 p.m. OK MS C++ TESTS 19 30 0 1400
66089156 vjudge3 B Dec. 1, 2019, 6:33 a.m. OK MS C++ TESTS 19 30 0 1400
69082793 vjudge5 B Jan. 19, 2020, 7:07 a.m. OK MS C++ TESTS 19 31 0 1400
69024061 vjudge3 B Jan. 18, 2020, 6:53 a.m. OK MS C++ TESTS 19 31 0 1400
69717813 vjudge4 B Jan. 29, 2020, 9:35 a.m. OK MS C++ TESTS 19 31 0 1400
69622915 vjudge1 B Jan. 27, 2020, 2:58 p.m. OK MS C++ TESTS 19 31 0 1400
66116118 predelnik B Dec. 1, 2019, 9:51 a.m. OK MS C++ 2017 TESTS 19 30 0 1400
69601297 vjudge2 B Jan. 27, 2020, 7:44 a.m. OK MS C++ 2017 TESTS 19 30 0 1400
66165860 mpoleg B Dec. 2, 2019, 7:34 a.m. OK MS C++ 2017 TESTS 19 30 0 1400
66101108 loading.. B Dec. 1, 2019, 8:27 a.m. OK MS C++ 2017 TESTS 19 30 0 1400
66223300 vjudge5 B Dec. 3, 2019, 11:37 a.m. OK MS C++ 2017 TESTS 19 30 307200 1400
68318010 ZA139 B Jan. 6, 2020, 1:54 p.m. OK MS C++ 2017 TESTS 19 31 0 1400
69302164 vjudge3 B Jan. 22, 2020, 2:09 p.m. OK MS C++ 2017 TESTS 19 31 0 1400
69499727 vjudge1 B Jan. 25, 2020, 6:04 a.m. OK MS C++ 2017 TESTS 19 31 0 1400
69925756 PapaGu B Jan. 31, 2020, 8:17 p.m. OK MS C++ 2017 TESTS 19 31 0 1400
67964419 Phantom_ B Dec. 30, 2019, 12:48 p.m. OK MS C++ 2017 TESTS 19 31 0 1400
65988435 p3rfect B Nov. 29, 2019, 4:20 p.m. OK PascalABC.NET TESTS 18 358 307200 1400
65999030 mayakin B Nov. 29, 2019, 6:28 p.m. OK PHP TESTS 18 46 409600 1400
65995604 pajenegod B Nov. 29, 2019, 5:32 p.m. OK PyPy 2 TESTS 18 139 1331200 1400
66780610 bbkrgl1 B Dec. 13, 2019, 11:51 a.m. OK PyPy 2 TESTS 19 140 307200 1400
66153308 rcpc-master B Dec. 1, 2019, 8:16 p.m. OK PyPy 2 TESTS 19 202 204800 1400
66026257 yumtam B Nov. 30, 2019, 8:47 a.m. OK PyPy 2 TESTS 19 202 4710400 1400
66002091 iamprayush B Nov. 29, 2019, 7:33 p.m. OK PyPy 2 TESTS 19 233 1536000 1400
66090746 B0r0m1r B Dec. 1, 2019, 7:14 a.m. OK PyPy 2 TESTS 19 265 3379200 1400
66636665 vjudge2 B Dec. 11, 2019, 1:10 p.m. OK PyPy 3 TESTS 19 140 0 1400
65989628 ngsm B Nov. 29, 2019, 4:25 p.m. OK PyPy 3 TESTS 18 140 0 1400
66006526 Gerard14 B Nov. 29, 2019, 10:13 p.m. OK PyPy 3 TESTS 19 140 1638400 1400
66516214 O_Ramanujan B Dec. 8, 2019, 7:02 p.m. OK PyPy 3 TESTS 19 155 0 1400
66288370 d_i_m_a B Dec. 4, 2019, 8:30 p.m. OK PyPy 3 TESTS 19 155 0 1400
65986418 cgfs10000 B Nov. 29, 2019, 4:10 p.m. OK PyPy 3 TESTS 18 155 1638400 1400
65984203 aleonov B Nov. 29, 2019, 4 p.m. OK PyPy 3 TESTS 18 155 1843200 1400
66021611 Erzed B Nov. 30, 2019, 7:32 a.m. OK PyPy 3 TESTS 19 155 2048000 1400
67555395 19n1900011773 B Dec. 24, 2019, 4:30 p.m. OK PyPy 3 TESTS 19 155 2150400 1400
66267375 SMMaster B Dec. 4, 2019, 11:01 a.m. OK PyPy 3 TESTS 19 155 2150400 1400
66116402 elistark B Dec. 1, 2019, 9:57 a.m. OK Python 2 TESTS 19 171 0 1400
66156648 GTrigger B Dec. 1, 2019, 11:23 p.m. OK Python 2 TESTS 19 186 0 1400
66283977 SCube_ B Dec. 4, 2019, 6:24 p.m. OK Python 2 TESTS 19 187 0 1400
66042297 TheMasix B Nov. 30, 2019, 1:57 p.m. OK Python 3 TESTS 19 108 0 1400
67988999 latter0206 B Dec. 31, 2019, 2:40 a.m. OK Python 3 TESTS 19 108 307200 1400
67249953 Anish1712 B Dec. 19, 2019, 6:39 p.m. OK Python 3 TESTS 19 109 0 1400
66929160 K.Samyukta B Dec. 15, 2019, 7:02 a.m. OK Python 3 TESTS 19 109 0 1400
66802787 illuminati_XY B Dec. 13, 2019, 7:24 p.m. OK Python 3 TESTS 19 109 0 1400
66774623 robin646087 B Dec. 13, 2019, 9:26 a.m. OK Python 3 TESTS 19 109 0 1400
66682102 sritha B Dec. 12, 2019, 1:29 p.m. OK Python 3 TESTS 19 109 0 1400
66673598 x313x B Dec. 12, 2019, 10:23 a.m. OK Python 3 TESTS 19 109 0 1400
66597223 __ACoder B Dec. 10, 2019, 3:08 p.m. OK Python 3 TESTS 19 109 0 1400
66542581 FahimSifnatul B Dec. 9, 2019, 12:05 p.m. OK Python 3 TESTS 19 109 0 1400
65985038 majali B Nov. 29, 2019, 4:04 p.m. OK Ruby TESTS 18 46 102400 1400
65990156 kobae964 B Nov. 29, 2019, 4:28 p.m. OK Rust TESTS 18 31 307200 1400

remove filters

Back to search problems