Codeforces Round 607 (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
1281 Codeforces Round 607 (Div. 2) FINISHED False 7200 155436899 Dec. 15, 2019, 5:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8327 ) B Azamon Web Services PROGRAMMING greedy 1500

B"Your friend Jeff Zebos has been trying to run his new online company, but it's not going very well. He's not getting a lot of sales on his website which he decided to call Azamon. His big problem, you think, is that he's not ranking high enough on the search engines. If only he could rename his products to have better names than his competitors, then he'll be at the top of the search results and will be a millionaire. After doing some research, you find out that search engines only sort their results lexicographically. If your friend could rename his products to lexicographically smaller strings than his competitor's, then he'll be at the top of the rankings! To make your strategy less obvious to his competitors, you decide to swap no more than two letters of the product names. Please help Jeff to find improved names for his products that are lexicographically smaller than his competitor's! Given the string s representing Jeff's product name and the string c representing his competitor's product name, find a way to swap at most one pair of characters in s (that is, find two distinct indices i and j and swap s_i and s_j ) such that the resulting new name becomes strictly lexicographically smaller than c , or determine that it is impossible. Note: String a is strictly lexicographically smaller than string b if and only if one of the following holds: The first line of input contains a single integer t ( 1 <= t <= 1500 ) denoting the number of test cases. The next lines contain descriptions of the test cases. Each test case consists of a single line containing two space-separated strings s and c ( 2 <= |s| <= 5000, 1 <= |c| <= 5000 ). The strings s and c consists of uppercase English letters. It is guaranteed that the sum of |s| in the input is at most 5000 and the sum of the |c| in the input is at most 5000 . For each test case, output "...

Tutorials

Codeforces Round #607 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
67076853 ChrisConstant B Dec. 17, 2019, 2:47 p.m. OK Clang++17 Diagnostics TESTS 79 62 7372800 1500
68878610 vjudge5 B Jan. 15, 2020, 5:51 p.m. OK Clang++17 Diagnostics TESTS 80 62 7372800 1500
67006605 riteshraj1014 B Dec. 16, 2019, 8:13 a.m. OK Clang++17 Diagnostics TESTS 79 826 7372800 1500
67303852 Harbin B Dec. 20, 2019, 8:01 p.m. OK Clang++17 Diagnostics TESTS 80 904 7372800 1500
66928113 daut-dlang B Dec. 15, 2019, 6:57 a.m. OK D TESTS 79 46 4198400 1500
66923996 ruban B Dec. 15, 2019, 6:37 a.m. OK Delphi TESTS 79 124 9011200 1500
66923363 igor_kz B Dec. 15, 2019, 6:34 a.m. OK FPC TESTS 79 62 1433600 1500
67422933 rahulgoel B Dec. 22, 2019, 12:24 p.m. OK GNU C11 TESTS 80 31 0 1500
67442916 FE40536 B Dec. 22, 2019, 8:16 p.m. OK GNU C11 TESTS 80 31 0 1500
68483502 chowdhuryshashwoto B Jan. 10, 2020, 8:44 a.m. OK GNU C11 TESTS 80 31 0 1500
66906829 pengin_2000 B Dec. 15, 2019, 5:27 a.m. OK GNU C11 TESTS 79 31 0 1500
66936593 Enginerr B Dec. 15, 2019, 8:39 a.m. OK GNU C11 TESTS 79 31 0 1500
66987707 palashitb B Dec. 15, 2019, 6:51 p.m. OK GNU C11 TESTS 79 31 0 1500
67056293 rubber_duckieOwOwO B Dec. 17, 2019, 7 a.m. OK GNU C11 TESTS 79 31 0 1500
66970883 Triumph_2000 B Dec. 15, 2019, 1:10 p.m. OK GNU C11 TESTS 79 31 102400 1500
66913539 Dream.to B Dec. 15, 2019, 5:51 a.m. OK GNU C11 TESTS 79 46 0 1500
67648361 kshiteshkasaraneni B Dec. 26, 2019, 11:07 a.m. OK GNU C11 TESTS 80 46 102400 1500
69198781 anderson1208 B Jan. 20, 2020, 3:48 p.m. OK GNU C++11 TESTS 80 31 0 1500
69073899 jintiandun B Jan. 19, 2020, 1:19 a.m. OK GNU C++11 TESTS 80 31 0 1500
69055598 jintiandun B Jan. 18, 2020, 2:21 p.m. OK GNU C++11 TESTS 80 31 0 1500
69579404 iaNTU B Jan. 26, 2020, 4:45 p.m. OK GNU C++11 TESTS 80 31 0 1500
69294568 crescent7122 B Jan. 22, 2020, 11:41 a.m. OK GNU C++11 TESTS 80 31 0 1500
69227708 xtd B Jan. 21, 2020, 8:04 a.m. OK GNU C++11 TESTS 80 31 0 1500
69198884 anderson1208 B Jan. 20, 2020, 3:50 p.m. OK GNU C++11 TESTS 80 31 0 1500
69194775 monk B Jan. 20, 2020, 2:35 p.m. OK GNU C++11 TESTS 80 31 0 1500
69461913 wang639026 B Jan. 24, 2020, 11:10 a.m. OK GNU C++11 TESTS 80 31 0 1500
69518694 Bulboaca_Eugen B Jan. 25, 2020, 12:48 p.m. OK GNU C++11 TESTS 80 31 0 1500
67050903 cervello B Dec. 17, 2019, 3:57 a.m. OK GNU C++14 TESTS 79 30 0 1500
66934426 saurabhshadow B Dec. 15, 2019, 8:06 a.m. OK GNU C++14 TESTS 79 30 0 1500
67980220 Sambhu.98 B Dec. 30, 2019, 6:51 p.m. OK GNU C++14 TESTS 80 30 0 1500
68012555 AbdallahHemdan B Dec. 31, 2019, 4:36 p.m. OK GNU C++14 TESTS 80 30 0 1500
68061246 payback_1996 B Jan. 2, 2020, 4:14 a.m. OK GNU C++14 TESTS 80 30 0 1500
66936684 ripu B Dec. 15, 2019, 8:40 a.m. OK GNU C++14 TESTS 79 30 102400 1500
68102909 hoanghuan25 B Jan. 3, 2020, 5 a.m. OK GNU C++14 TESTS 80 30 102400 1500
66985909 the_ellusionist7 B Dec. 15, 2019, 6:06 p.m. OK GNU C++14 TESTS 79 30 102400 1500
67070030 Bogdan1110 B Dec. 17, 2019, 12:26 p.m. OK GNU C++14 TESTS 79 30 204800 1500
67314983 nshul B Dec. 21, 2019, 5:30 a.m. OK GNU C++14 TESTS 80 30 204800 1500
67476036 wellox B Dec. 23, 2019, 2:24 p.m. OK GNU C++17 TESTS 80 30 0 1500
67642096 amul_agrawal B Dec. 26, 2019, 8:36 a.m. OK GNU C++17 TESTS 80 30 0 1500
67978020 Mohammed_Imtiaz B Dec. 30, 2019, 5:48 p.m. OK GNU C++17 TESTS 80 30 0 1500
67978078 imtiaz246 B Dec. 30, 2019, 5:50 p.m. OK GNU C++17 TESTS 80 30 0 1500
67051804 Kavit_Kheni B Dec. 17, 2019, 4:36 a.m. OK GNU C++17 TESTS 79 30 102400 1500
69496577 WhySoSerious6490 B Jan. 25, 2020, 4:25 a.m. OK GNU C++17 TESTS 80 30 102400 1500
68087903 DVM18 B Jan. 2, 2020, 4:58 p.m. OK GNU C++17 TESTS 80 30 204800 1500
66927475 sensible B Dec. 15, 2019, 6:54 a.m. OK GNU C++17 TESTS 79 30 3891200 1500
69497671 sayd17 B Jan. 25, 2020, 5:05 a.m. OK GNU C++17 TESTS 80 31 0 1500
69538179 Ahmadsm2005 B Jan. 25, 2020, 7:52 p.m. OK GNU C++17 TESTS 80 31 0 1500
68044571 amarjeetanand B Jan. 1, 2020, 3:52 p.m. OK Go TESTS 80 46 0 1500
68044778 amarjeetanand B Jan. 1, 2020, 3:57 p.m. OK Go TESTS 80 46 0 1500
67091820 maguroguma B Dec. 17, 2019, 3:37 p.m. OK Go TESTS 79 46 0 1500
66919384 maguroguma B Dec. 15, 2019, 6:15 a.m. OK Go TESTS 79 46 0 1500
67075737 OniValKeloni B Dec. 17, 2019, 2:23 p.m. OK Go TESTS 79 77 0 1500
67486769 machhra B Dec. 23, 2019, 5:45 p.m. OK Java 11 TESTS 80 186 0 1500
66978164 Oom B Dec. 15, 2019, 3:25 p.m. OK Java 11 TESTS 79 187 0 1500
67438454 hakr_2104 B Dec. 22, 2019, 6:12 p.m. OK Java 11 TESTS 80 202 0 1500
67658060 mustafausama B Dec. 26, 2019, 2:39 p.m. OK Java 11 TESTS 80 218 0 1500
67304736 enricogi B Dec. 20, 2019, 8:32 p.m. OK Java 11 TESTS 80 218 0 1500
66930857 serafimkoo B Dec. 15, 2019, 7:28 a.m. OK Java 11 TESTS 79 218 0 1500
68380560 codingmaster B Jan. 8, 2020, 12:26 a.m. OK Java 11 TESTS 80 233 0 1500
68149541 kamesh.joshi B Jan. 4, 2020, 6:18 a.m. OK Java 11 TESTS 80 233 0 1500
68099306 marwlod B Jan. 3, 2020, 12:37 a.m. OK Java 11 TESTS 80 233 0 1500
67435174 programmer21 B Dec. 22, 2019, 4:50 p.m. OK Java 11 TESTS 80 233 0 1500
67297739 alexis779 B Dec. 20, 2019, 5:31 p.m. OK Java 8 TESTS 80 124 0 1500
69003823 nidhigoel B Jan. 17, 2020, 9:17 p.m. OK Java 8 TESTS 80 124 0 1500
68835934 Omar_Othman B Jan. 15, 2020, 3:08 a.m. OK Java 8 TESTS 80 124 0 1500
68835740 Omar_Othman B Jan. 15, 2020, 3 a.m. OK Java 8 TESTS 80 124 0 1500
68835523 Omar_Othman B Jan. 15, 2020, 2:51 a.m. OK Java 8 TESTS 80 124 0 1500
68835394 Omar_Othman B Jan. 15, 2020, 2:45 a.m. OK Java 8 TESTS 80 124 0 1500
68835243 Omar_Othman B Jan. 15, 2020, 2:40 a.m. OK Java 8 TESTS 80 124 0 1500
67665477 Aman_23_Gupta B Dec. 26, 2019, 5:40 p.m. OK Java 8 TESTS 80 124 0 1500
67520767 ZeyadKhattab B Dec. 24, 2019, 12:20 p.m. OK Java 8 TESTS 80 124 0 1500
67414819 wretar B Dec. 22, 2019, 9:32 a.m. OK Java 8 TESTS 80 124 0 1500
67525301 Spheniscine B Dec. 24, 2019, 1:49 p.m. OK Kotlin TESTS 80 171 0 1500
67010787 hcmdgh B Dec. 16, 2019, 9:46 a.m. OK Kotlin TESTS 79 186 1024000 1500
68077553 youRooock B Jan. 2, 2020, 1:10 p.m. OK Mono C# TESTS 80 61 307200 1500
66922497 dev8546 B Dec. 15, 2019, 6:30 a.m. OK Mono C# TESTS 79 62 307200 1500
66908242 csgo B Dec. 15, 2019, 5:32 a.m. OK Mono C# TESTS 79 62 34099200 1500
66904517 tomomo2b2 B Dec. 15, 2019, 5:19 a.m. OK Mono C# TESTS 79 77 307200 1500
66923876 kolokolo21kolo B Dec. 15, 2019, 6:37 a.m. OK Mono C# TESTS 79 77 2457600 1500
66906446 plasma-effect B Dec. 15, 2019, 5:26 a.m. OK Mono C# TESTS 79 77 3993600 1500
66922944 mban259 B Dec. 15, 2019, 6:32 a.m. OK Mono C# TESTS 79 93 3276800 1500
67387074 nastya1199 B Dec. 21, 2019, 6:11 p.m. OK Mono C# TESTS 80 124 512000 1500
67473795 wajdi123 B Dec. 23, 2019, 1:40 p.m. OK MS C++ TESTS 80 31 0 1500
66917051 platter B Dec. 15, 2019, 6:05 a.m. OK MS C++ TESTS 79 31 0 1500
68760052 vjudge1 B Jan. 14, 2020, 8:29 a.m. OK MS C++ TESTS 80 31 102400 1500
68853469 rures B Jan. 15, 2020, 9:50 a.m. OK MS C++ TESTS 80 31 204800 1500
68990576 vjudge4 B Jan. 17, 2020, 2:02 p.m. OK MS C++ TESTS 80 46 0 1500
69090535 vjudge5 B Jan. 19, 2020, 9:59 a.m. OK MS C++ TESTS 80 46 0 1500
68932292 vjudge1 B Jan. 16, 2020, 11:40 a.m. OK MS C++ TESTS 80 46 0 1500
68916034 vjudge1 B Jan. 16, 2020, 8:30 a.m. OK MS C++ TESTS 80 46 0 1500
69030096 vjudge4 B Jan. 18, 2020, 7:57 a.m. OK MS C++ TESTS 80 46 0 1500
69048511 vjudge3 B Jan. 18, 2020, 11:51 a.m. OK MS C++ TESTS 80 46 0 1500
66903522 youx B Dec. 15, 2019, 5:16 a.m. OK MS C++ 2017 TESTS 79 31 0 1500
68659128 sudha_18501 B Jan. 12, 2020, 1:06 p.m. OK MS C++ 2017 TESTS 80 31 0 1500
68087617 QAZlixw B Jan. 2, 2020, 4:51 p.m. OK MS C++ 2017 TESTS 80 31 0 1500
66920704 tahtarovserver B Dec. 15, 2019, 6:22 a.m. OK MS C++ 2017 TESTS 79 31 0 1500
66918916 nacl_jht B Dec. 15, 2019, 6:13 a.m. OK MS C++ 2017 TESTS 79 31 0 1500
66918195 efyjef B Dec. 15, 2019, 6:10 a.m. OK MS C++ 2017 TESTS 79 31 0 1500
66994877 comrade8 B Dec. 16, 2019, 12:04 a.m. OK MS C++ 2017 TESTS 79 31 102400 1500
68074974 CygneNoir B Jan. 2, 2020, 12:06 p.m. OK MS C++ 2017 TESTS 80 31 307200 1500
68441604 nodays0502 B Jan. 9, 2020, 11:08 a.m. OK MS C++ 2017 TESTS 80 31 307200 1500
68700084 AleksanderBalobanov B Jan. 13, 2020, 9:10 a.m. OK MS C++ 2017 TESTS 80 31 307200 1500
68096693 mayakin B Jan. 2, 2020, 9:22 p.m. OK PHP TESTS 80 46 512000 1500
66932727 vaibhavsarda B Dec. 15, 2019, 7:46 a.m. OK PyPy 2 TESTS 79 155 1331200 1500
67001869 aaa_bbb_ccc B Dec. 16, 2019, 6:10 a.m. OK PyPy 2 TESTS 79 171 1638400 1500
66910355 Mukundan314 B Dec. 15, 2019, 5:39 a.m. OK PyPy 2 TESTS 79 202 2355200 1500
66904352 MVP B Dec. 15, 2019, 5:19 a.m. OK PyPy 2 TESTS 79 217 2969600 1500
66905641 Pyar.Mahobat.Dhoka.Hai B Dec. 15, 2019, 5:23 a.m. OK PyPy 2 TESTS 79 218 4096000 1500
67030647 iamprayush B Dec. 16, 2019, 3:45 p.m. OK PyPy 2 TESTS 79 233 3379200 1500
67253408 golfbaby B Dec. 19, 2019, 8:18 p.m. OK PyPy 2 TESTS 79 233 3993600 1500
68458511 shehebe B Jan. 9, 2020, 5:12 p.m. OK PyPy 2 TESTS 80 249 5734400 1500
66907372 Zeyu B Dec. 15, 2019, 5:29 a.m. OK PyPy 2 TESTS 79 265 2252800 1500
67403637 slitherhiss B Dec. 22, 2019, 5:21 a.m. OK PyPy 3 TESTS 80 171 2969600 1500
68039520 Ingem99 B Jan. 1, 2020, 1:39 p.m. OK PyPy 3 TESTS 80 186 3276800 1500
67127374 mitribunskiy B Dec. 17, 2019, 8:50 p.m. OK PyPy 3 TESTS 79 186 3379200 1500
66921986 FahimSifnatul B Dec. 15, 2019, 6:28 a.m. OK PyPy 3 TESTS 79 187 2560000 1500
68095980 Affe B Jan. 2, 2020, 8:49 p.m. OK PyPy 3 TESTS 80 202 3379200 1500
66914028 cgfs10000 B Dec. 15, 2019, 5:53 a.m. OK PyPy 3 TESTS 79 202 3993600 1500
68752492 harshchaplot11 B Jan. 14, 2020, 7:10 a.m. OK PyPy 3 TESTS 80 202 5222400 1500
67264642 1900011715 B Dec. 20, 2019, 5:33 a.m. OK PyPy 3 TESTS 80 217 4915200 1500
66908527 wattaihei B Dec. 15, 2019, 5:33 a.m. OK PyPy 3 TESTS 79 218 3891200 1500
68103787 tkst B Jan. 3, 2020, 5:43 a.m. OK PyPy 3 TESTS 80 218 4812800 1500
67666419 Ritik._.garg B Dec. 26, 2019, 6:03 p.m. OK Python 2 TESTS 80 187 102400 1500
67661704 sjay05 B Dec. 26, 2019, 4:06 p.m. OK Python 2 TESTS 80 202 102400 1500
66914025 ashashwat B Dec. 15, 2019, 5:53 a.m. OK Python 2 TESTS 79 327 5324800 1500
67423395 dj_contest B Dec. 22, 2019, 12:34 p.m. OK Python 3 TESTS 80 109 307200 1500
68450199 Praseedakatari B Jan. 9, 2020, 2:04 p.m. OK Python 3 TESTS 80 124 0 1500
68279498 17wh1a0550 B Jan. 5, 2020, 4:32 p.m. OK Python 3 TESTS 80 124 0 1500
67278773 nikhita5a6 B Dec. 20, 2019, 12:26 p.m. OK Python 3 TESTS 80 124 0 1500
67259797 ninima B Dec. 20, 2019, 2:28 a.m. OK Python 3 TESTS 80 124 204800 1500
67258224 GTrigger B Dec. 20, 2019, 12:58 a.m. OK Python 3 TESTS 80 124 204800 1500
67208640 sharanreddy B Dec. 19, 2019, 1:18 p.m. OK Python 3 TESTS 79 124 204800 1500
67205583 kuliti B Dec. 19, 2019, 12:19 p.m. OK Python 3 TESTS 79 124 204800 1500
67196150 ninima B Dec. 19, 2019, 9:07 a.m. OK Python 3 TESTS 79 124 204800 1500
67186384 Tarun_122 B Dec. 19, 2019, 4:57 a.m. OK Python 3 TESTS 79 124 204800 1500
67525781 Karnaj B Dec. 24, 2019, 1:58 p.m. OK Ruby TESTS 80 93 204800 1500
66906510 kyon2326 B Dec. 15, 2019, 5:26 a.m. OK Ruby TESTS 79 93 204800 1500
66935859 erica3179 B Dec. 15, 2019, 8:27 a.m. OK Ruby TESTS 79 109 102400 1500
67454921 Andimeo B Dec. 23, 2019, 6:24 a.m. OK Rust TESTS 80 46 102400 1500
66921604 manta1130 B Dec. 15, 2019, 6:26 a.m. OK Rust TESTS 79 46 204800 1500
66914779 akiradeveloper B Dec. 15, 2019, 5:56 a.m. OK Rust TESTS 79 61 307200 1500
66906231 terraformer B Dec. 15, 2019, 5:25 a.m. OK Rust TESTS 79 187 102400 1500

remove filters

Back to search problems