Codeforces Round 265 (Div. 1)

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
464 Codeforces Round 265 (Div. 1) FINISHED False 7200 327335387 Sept. 7, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5941 ) A No to Palindromes! PROGRAMMING greedy strings 1700

B'Paul hates palindromes. He assumes that string s is tolerable if each its character is one of the first p letters of the English alphabet and s doesn 't contain any palindrome contiguous substring of length 2 or more. Paul has found a tolerable string s of length n. Help him find the lexicographically next tolerable string of the same length or else state that such string does not exist. The first line contains two space-separated integers: n and p (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8926). The second line contains string s, consisting of n small English letters. It is guaranteed that the string is tolerable (according to the above definition). If the lexicographically next tolerable string of the same length exists, print it. Otherwise, print "NO" (without the quotes). String s is lexicographically larger (or simply larger) than string t with the same length, if there is number i, such that s1 xe2 x80 x89= xe2 x80 x89t1, ..., si xe2 x80 x89= xe2 x80 x89ti, si xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89> xe2 x80 x89ti xe2 x80 x89+ xe2 x80 x891. The lexicographically next tolerable string is the lexicographically minimum tolerable string which is larger than the given one. A palindrome is a string that reads the same forward or reversed.'...

Tutorials

Codeforces Round #265 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
22299945 JoeBlow A Nov. 18, 2016, 4:50 a.m. OK D TESTS 73 15 0 1700
22299672 JoeBlow A Nov. 18, 2016, 4:14 a.m. OK D TESTS 73 15 0 1700
7703988 Gassa A Sept. 7, 2014, 3:49 p.m. OK D TESTS 73 62 0 1700
7703789 hos.lyric A Sept. 7, 2014, 3:48 p.m. OK D TESTS 73 62 1433600 1700
7715054 igor.glushkov A Sept. 7, 2014, 6:59 p.m. OK Delphi TESTS 73 31 102400 1700
7713834 danildudin A Sept. 7, 2014, 6:16 p.m. OK Delphi TESTS 73 46 102400 1700
7721422 Trans A Sept. 8, 2014, 1:15 p.m. OK FPC TESTS 73 15 0 1700
7727853 voquocthang A Sept. 9, 2014, 12:02 p.m. OK FPC TESTS 73 15 307200 1700
7719828 graceoflives A Sept. 8, 2014, 9:38 a.m. OK FPC TESTS 73 15 307200 1700
29241074 TShT A Aug. 6, 2017, 12:22 p.m. OK FPC TESTS 73 15 1740800 1700
26335238 zhanggengchen A April 13, 2017, 11:03 a.m. OK FPC TESTS 73 15 5529600 1700
7747237 alc A Sept. 11, 2014, 9:37 p.m. OK FPC TESTS 73 30 307200 1700
7725111 shine_hai A Sept. 9, 2014, 2:23 a.m. OK FPC TESTS 73 30 409600 1700
7812930 Leshka A Sept. 16, 2014, 8 p.m. OK FPC TESTS 73 30 409600 1700
7714844 Nikiktafokusnik A Sept. 7, 2014, 6:48 p.m. OK FPC TESTS 73 31 0 1700
7708026 platina A Sept. 7, 2014, 4:23 p.m. OK FPC TESTS 73 31 0 1700
18897078 aiswarya339 A July 5, 2016, 9:32 a.m. OK GNU C TESTS 73 15 0 1700
8061702 Capture_A_Lag A Oct. 2, 2014, 5:19 p.m. OK GNU C TESTS 73 15 0 1700
7818616 404_codenotfound A Sept. 17, 2014, 2:02 p.m. OK GNU C TESTS 73 15 0 1700
7798659 sdlzx A Sept. 15, 2014, 5:04 a.m. OK GNU C TESTS 73 15 0 1700
20672442 avinash_47 A Sept. 17, 2016, 3:59 a.m. OK GNU C TESTS 73 30 0 1700
8449033 NoSoul A Oct. 28, 2014, 11:55 a.m. OK GNU C TESTS 73 30 0 1700
7813009 Mamedov A Sept. 16, 2014, 8:15 p.m. OK GNU C TESTS 73 30 0 1700
7737833 ss2 A Sept. 10, 2014, 9:26 p.m. OK GNU C TESTS 73 30 0 1700
7717069 picaso A Sept. 8, 2014, 1:22 a.m. OK GNU C TESTS 73 30 0 1700
27369236 ayushrai09 A May 27, 2017, 7:45 a.m. OK GNU C TESTS 73 30 3993600 1700
29727668 ahsan0045 A Aug. 24, 2017, 9:44 a.m. OK GNU C++ TESTS 73 15 0 1700
30613994 ea6102 A Sept. 22, 2017, 12:19 p.m. OK GNU C++ TESTS 73 15 0 1700
27728176 Cozette A June 11, 2017, 10:35 p.m. OK GNU C++ TESTS 73 15 0 1700
27707696 aks1886 A June 10, 2017, 2:09 p.m. OK GNU C++ TESTS 73 15 0 1700
22725437 kinshukkashyap.1999 A Dec. 6, 2016, 8:04 a.m. OK GNU C++ TESTS 73 15 0 1700
22705057 charity A Dec. 5, 2016, 5:28 a.m. OK GNU C++ TESTS 73 15 0 1700
22642566 decker A Dec. 1, 2016, 3:02 p.m. OK GNU C++ TESTS 73 15 0 1700
22324559 tridorje A Nov. 19, 2016, 11:19 a.m. OK GNU C++ TESTS 73 15 0 1700
21974552 sanngu A Nov. 1, 2016, 5:22 p.m. OK GNU C++ TESTS 73 15 0 1700
20776324 HitmanBBa A Sept. 20, 2016, 1:04 p.m. OK GNU C++ TESTS 73 15 0 1700
10312582 bhargav104 A March 17, 2015, 4:20 p.m. OK GNU C++0x TESTS 73 15 0 1700
10255424 Scomip A March 13, 2015, 8:52 a.m. OK GNU C++0x TESTS 73 15 0 1700
9744337 VishalTheBEAST A Feb. 7, 2015, 11:53 a.m. OK GNU C++0x TESTS 73 15 0 1700
9512005 noor148 A Jan. 23, 2015, 10:51 a.m. OK GNU C++0x TESTS 73 15 0 1700
8905209 Kanaunara A Dec. 1, 2014, 1:30 p.m. OK GNU C++0x TESTS 73 15 0 1700
8509973 _iris_ A Nov. 1, 2014, 8:38 a.m. OK GNU C++0x TESTS 73 15 0 1700
8437386 diametralis A Oct. 27, 2014, 4:13 p.m. OK GNU C++0x TESTS 73 15 0 1700
8436489 skrydg A Oct. 27, 2014, 2:50 p.m. OK GNU C++0x TESTS 73 15 0 1700
8416604 suchir A Oct. 25, 2014, 11:54 p.m. OK GNU C++0x TESTS 73 15 0 1700
8130750 mtomic A Oct. 7, 2014, 1:03 p.m. OK GNU C++0x TESTS 73 15 0 1700
57903692 rainboy A July 28, 2019, 4:44 p.m. OK GNU C11 TESTS 73 31 0 1700
32513136 vb7401 A Nov. 20, 2017, 11:43 p.m. OK GNU C++11 TESTS 73 15 0 1700
32345399 pedrohlf A Nov. 16, 2017, 3:37 a.m. OK GNU C++11 TESTS 73 15 0 1700
32195306 folcotandiono A Nov. 10, 2017, 12:44 p.m. OK GNU C++11 TESTS 73 15 0 1700
31991845 trytolearn A Nov. 2, 2017, 8:09 p.m. OK GNU C++11 TESTS 73 15 0 1700
31937627 BThero A Nov. 1, 2017, 3:56 a.m. OK GNU C++11 TESTS 73 15 0 1700
31277534 Gh0stMan A Oct. 13, 2017, 2:41 p.m. OK GNU C++11 TESTS 73 15 0 1700
30907987 N3SL A Oct. 1, 2017, 12:02 p.m. OK GNU C++11 TESTS 73 15 0 1700
30839435 vampire_slayer A Sept. 29, 2017, 7:17 p.m. OK GNU C++11 TESTS 73 15 0 1700
30491042 Valgt A Sept. 19, 2017, 7:58 a.m. OK GNU C++11 TESTS 73 15 0 1700
32535253 eu3neuom A Nov. 21, 2017, 8:28 p.m. OK GNU C++11 TESTS 73 15 0 1700
32571428 AJAYHAYAGREEVE A Nov. 23, 2017, 9:58 a.m. OK GNU C++14 TESTS 73 15 0 1700
32370022 ArlanKuralbayev A Nov. 17, 2017, 5:32 a.m. OK GNU C++14 TESTS 73 15 0 1700
32157611 Kideri A Nov. 9, 2017, 12:30 p.m. OK GNU C++14 TESTS 73 15 0 1700
32061613 GLAYS A Nov. 4, 2017, 7:03 p.m. OK GNU C++14 TESTS 73 15 0 1700
31225021 shiv0408 A Oct. 11, 2017, 6:22 p.m. OK GNU C++14 TESTS 73 15 0 1700
30916443 Rishab_arora A Oct. 1, 2017, 6:38 p.m. OK GNU C++14 TESTS 73 15 0 1700
30857845 Valour A Sept. 30, 2017, 7:32 a.m. OK GNU C++14 TESTS 73 15 0 1700
30781197 Photon_ A Sept. 27, 2017, 3:26 p.m. OK GNU C++14 TESTS 73 15 0 1700
30773977 cryptomanic A Sept. 27, 2017, 10:30 a.m. OK GNU C++14 TESTS 73 15 0 1700
32370027 ArlanKuralbayev A Nov. 17, 2017, 5:32 a.m. OK GNU C++14 TESTS 73 15 0 1700
39014685 jimmy18 A June 7, 2018, 9:34 a.m. OK GNU C++17 TESTS 73 15 0 1700
36051492 nonis A March 7, 2018, 4:37 p.m. OK GNU C++17 TESTS 73 15 1945600 1700
35338374 3agwa A Feb. 16, 2018, 1:20 p.m. OK GNU C++17 TESTS 73 15 1945600 1700
55944818 LeoRiether A June 22, 2019, 6:59 p.m. OK GNU C++17 TESTS 73 30 0 1700
64301969 amankrsingh A Nov. 5, 2019, 10:21 a.m. OK GNU C++17 TESTS 73 30 0 1700
63553001 darijee A Oct. 27, 2019, 12:07 p.m. OK GNU C++17 TESTS 73 30 0 1700
61932538 AK. A Oct. 5, 2019, 4:49 p.m. OK GNU C++17 TESTS 73 30 0 1700
61237682 cyber_rajat A Sept. 24, 2019, 6:42 p.m. OK GNU C++17 TESTS 73 30 0 1700
58216392 bojverdict2 A Aug. 3, 2019, 10:55 a.m. OK GNU C++17 TESTS 73 30 0 1700
58163944 HolyRomanEmpire A Aug. 2, 2019, 8:23 a.m. OK GNU C++17 TESTS 73 30 0 1700
7706790 Rotsor A Sept. 7, 2014, 4:09 p.m. OK Haskell TESTS 73 31 0 1700
8022782 asinkevich A Sept. 29, 2014, 9:12 a.m. OK Java 6 TESTS 73 77 0 1700
7714429 meijun A Sept. 7, 2014, 6:31 p.m. OK Java 6 TESTS 73 92 0 1700
8045587 sahil93.iitd A Oct. 1, 2014, 10:25 a.m. OK Java 6 TESTS 73 93 0 1700
7708853 bohuss A Sept. 7, 2014, 4:32 p.m. OK Java 6 TESTS 73 93 0 1700
9330506 xiaowuc1 A Dec. 31, 2014, 5:47 a.m. OK Java 6 TESTS 73 139 0 1700
7718604 dnk A Sept. 8, 2014, 6:22 a.m. OK Java 7 TESTS 73 62 0 1700
13058526 Trasier A Sept. 17, 2015, 1:51 a.m. OK Java 7 TESTS 73 77 0 1700
12842802 Hartha A Sept. 4, 2015, 4:01 p.m. OK Java 7 TESTS 73 77 0 1700
9216573 szilard A Dec. 21, 2014, 3:15 p.m. OK Java 7 TESTS 73 77 0 1700
9163267 KNIGHT0X300 A Dec. 17, 2014, 3:30 p.m. OK Java 7 TESTS 73 77 0 1700
8773328 trunghieu11 A Nov. 21, 2014, 11:33 a.m. OK Java 7 TESTS 73 77 0 1700
8471898 KNIGHT0X300 A Oct. 29, 2014, 5:15 p.m. OK Java 7 TESTS 73 77 0 1700
7737095 AndreiNet A Sept. 10, 2014, 6:36 p.m. OK Java 7 TESTS 73 77 0 1700
7731070 Vlad3d A Sept. 9, 2014, 8:59 p.m. OK Java 7 TESTS 73 77 0 1700
7726042 abi.cmu A Sept. 9, 2014, 6:56 a.m. OK Java 7 TESTS 73 77 0 1700
62169870 sonusingh.nitaa A Oct. 8, 2019, 11:29 p.m. OK Java 8 TESTS 73 109 0 1700
45490226 mandark27 A Nov. 9, 2018, 6:45 p.m. OK Java 8 TESTS 73 109 0 1700
31953654 ShafinKhadem A Nov. 1, 2017, 2:37 p.m. OK Java 8 TESTS 73 109 0 1700
12604493 TranCongDuy A Aug. 19, 2015, 2:31 p.m. OK Java 8 TESTS 73 109 0 1700
12343821 Bat-Orgil A Aug. 4, 2015, 11:09 p.m. OK Java 8 TESTS 73 109 0 1700
27945919 xodiac A June 21, 2017, 12:39 p.m. OK Java 8 TESTS 73 109 20480000 1700
31448686 coderbond007 A Oct. 17, 2017, 12:44 p.m. OK Java 8 TESTS 73 109 20787200 1700
68138137 johnny16 A Jan. 3, 2020, 8:04 p.m. OK Java 8 TESTS 73 124 0 1700
62169838 sonusingh.nitaa A Oct. 8, 2019, 11:27 p.m. OK Java 8 TESTS 73 124 0 1700
58520363 saurabhs1206 A Aug. 10, 2019, 4:09 a.m. OK Java 8 TESTS 73 124 0 1700
7706349 riversouther A Sept. 7, 2014, 4:05 p.m. OK JavaScript TESTS 73 46 0 1700
10203609 aladdin3 A March 8, 2015, 10:02 a.m. OK MS C# TESTS 73 62 1228800 1700
11700530 sicon54 A June 21, 2015, 5:57 p.m. OK MS C# TESTS 73 62 2457600 1700
26450631 YakovPolykovsky A April 17, 2017, 9:33 a.m. OK MS C# TESTS 73 62 13312000 1700
7705576 azukun A Sept. 7, 2014, 3:59 p.m. OK MS C# TESTS 73 77 5324800 1700
7713929 suwik A Sept. 7, 2014, 6:18 p.m. OK MS C# TESTS 73 171 5324800 1700
18587324 Salim_Shebli A June 18, 2016, 9:40 p.m. OK MS C++ TESTS 73 15 0 1700
12069737 FISHTOBY A July 15, 2015, 10:07 a.m. OK MS C++ TESTS 73 15 0 1700
8684753 dotorya A Nov. 13, 2014, 2:16 p.m. OK MS C++ TESTS 73 15 0 1700
8278217 Maffka A Oct. 17, 2014, 8:12 a.m. OK MS C++ TESTS 73 15 0 1700
8142323 EarlOfDitches A Oct. 8, 2014, 3:58 p.m. OK MS C++ TESTS 73 15 0 1700
8065628 Graygoo A Oct. 3, 2014, 6:43 a.m. OK MS C++ TESTS 73 15 0 1700
7800889 VolodymyrK A Sept. 15, 2014, 12:17 p.m. OK MS C++ TESTS 73 15 0 1700
7800206 romanova A Sept. 15, 2014, 10:12 a.m. OK MS C++ TESTS 73 15 0 1700
7741519 Kmcode A Sept. 11, 2014, 12:18 p.m. OK MS C++ TESTS 73 15 0 1700
7741453 yurboss A Sept. 11, 2014, 12:12 p.m. OK MS C++ TESTS 73 15 0 1700
49187615 makorro A Jan. 30, 2019, 6:49 a.m. OK MS C++ 2017 TESTS 73 31 0 1700
59532679 yorky A Aug. 26, 2019, 3:40 p.m. OK MS C++ 2017 TESTS 73 46 0 1700
20889565 dsharma080 A Sept. 24, 2016, 1:55 p.m. OK PyPy 2 TESTS 73 93 0 1700
10509633 beched A March 28, 2015, 10:41 p.m. OK PyPy 2 TESTS 73 93 409600 1700
59069424 romil797 A Aug. 19, 2019, 3:48 a.m. OK PyPy 3 TESTS 73 155 1228800 1700
66370322 chaudhary_19 A Dec. 5, 2019, 9:40 p.m. OK PyPy 3 TESTS 73 155 2764800 1700
55206703 Mr.Inconsistent A June 6, 2019, 12:52 p.m. OK PyPy 3 TESTS 73 171 1331200 1700
59343486 iamssk A Aug. 23, 2019, 8:37 a.m. OK PyPy 3 TESTS 73 327 9318400 1700
7749384 Endagorion A Sept. 12, 2014, 7:57 a.m. OK Python 2 TESTS 73 46 0 1700
7716667 swaroop.vajrapu A Sept. 7, 2014, 11:20 p.m. OK Python 2 TESTS 73 46 0 1700
8080606 rkjha A Oct. 4, 2014, 8:06 p.m. OK Python 2 TESTS 73 61 0 1700
7749511 Endagorion A Sept. 12, 2014, 8:17 a.m. OK Python 2 TESTS 73 61 0 1700
7721710 AirPlus A Sept. 8, 2014, 1:51 p.m. OK Python 2 TESTS 73 61 0 1700
7725150 abc_1988_1106 A Sept. 9, 2014, 2:34 a.m. OK Python 2 TESTS 73 61 716800 1700
17878830 m7mdkamal A May 12, 2016, 4:30 p.m. OK Python 2 TESTS 73 61 5632000 1700
27556542 arpitkath A June 4, 2017, 6:05 a.m. OK Python 2 TESTS 73 62 0 1700
22836367 Programmer_C A Dec. 9, 2016, 2:43 p.m. OK Python 2 TESTS 73 62 0 1700
11132624 geek_geek A May 18, 2015, 8:12 a.m. OK Python 2 TESTS 73 62 0 1700
8138005 yugle7 A Oct. 8, 2014, 9:29 a.m. OK Python 3 TESTS 73 62 0 1700
7988590 yugle7 A Sept. 27, 2014, 8:03 p.m. OK Python 3 TESTS 73 62 0 1700
7988548 yugle7 A Sept. 27, 2014, 7:55 p.m. OK Python 3 TESTS 73 62 0 1700
7988457 yugle7 A Sept. 27, 2014, 7:40 p.m. OK Python 3 TESTS 73 62 0 1700
7715188 WARenie A Sept. 7, 2014, 7:09 p.m. OK Python 3 TESTS 73 62 102400 1700
15889900 orailly A Feb. 8, 2016, 3:13 a.m. OK Python 3 TESTS 73 77 0 1700
28528071 Sheemon7 A July 13, 2017, 6:39 p.m. OK Python 3 TESTS 73 77 5529600 1700
7705921 nbasic A Sept. 7, 2014, 4:01 p.m. OK Python 3 TESTS 73 93 0 1700
24855028 Aalchemist A Feb. 20, 2017, 8:55 p.m. OK Python 3 TESTS 73 93 4608000 1700
37460249 nowyyz A April 19, 2018, 11:57 a.m. OK Python 3 TESTS 73 93 7065600 1700
58245158 bojverdict2 A Aug. 4, 2019, 4:54 a.m. OK Ruby TESTS 73 62 102400 1700
7714763 kronos A Sept. 7, 2014, 6:44 p.m. OK Ruby TESTS 73 62 1638400 1700
17539193 reldan A April 27, 2016, 2:39 p.m. OK Scala TESTS 73 389 40038400 1700

remove filters

Back to search problems