Codeforces Round 311 (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
557 Codeforces Round 311 (Div. 2) FINISHED False 7200 340729223 June 30, 2015, 3 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1211 ) E Ann and Half-Palindrome PROGRAMMING data structures dp graphs string suffix structures strings trees 2700

Tomorrow Ann takes the hardest exam of programming where she should get an excellent mark. On the last theoretical class the teacher introduced the notion of a half-palindrome . String t is a half-palindrome , if for all the odd positions i ( ) the following condition is held: t i = t | t | - i + 1 , where | t | is the length of string t if positions are indexed from 1 . For example, strings " abaa ", " a ", " bb ", " abbbaa " are half-palindromes and strings " ab ", " bba " and " aaabaa " are not. Ann knows that on the exam she will get string s , consisting only of letters a and b , and number k . To get an excellent mark she has to find the k -th in the lexicographical order string among all substrings of s that are half-palyndromes. Note that each substring in this order is considered as many times as many times it occurs in s . The teachers guarantees that the given number k doesn't exceed the number of substrings of the given string that are half-palindromes. Can you cope with this problem? The first line of the input contains string s ( 1 ≤ | s | ≤ 5000 ), consisting only of characters ' a ' and ' b ', where | s | is the length of string s . The second line contains a positive integer k — the lexicographical number of the requested string among all the half-palindrome substrings of the given string s . The strings are numbered starting from one. It is guaranteed that number k doesn't exceed the number of substrings of the given string that are half-palindromes. Print a substring of the given string that is the k -th in the lexicographical order of all substrings of the given string that are half-palindromes. By definition, string a = a 1 a 2 ... a n is lexicographically less than string b = b 1 b 2 ... b m , if either a is a prefix of b and doesn't coincide with b , or there exists such i , that a 1 = b 1 , a 2 = b 2 , ... a i - 1 = b i - 1 , a i < b i . In the first sample half-palindrome substrings are the following strings — a , a , a , a , aa ,

Tutorials

Codeforces Round #311 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
11885070 z55250825 E July 1, 2015, 4:30 p.m. OK FPC TESTS 75 155 427315200 2700
11885762 qjc98 E July 1, 2015, 5:41 p.m. OK FPC TESTS 75 218 431411200 2700
12083821 igdor99 E July 16, 2015, 12:51 p.m. OK FPC TESTS 75 264 241561600 2700
11921934 sanketM E July 4, 2015, 11:20 a.m. OK GNU C TESTS 75 701 396902400 2700
11910291 triploblastic E July 3, 2015, 11:54 a.m. OK GNU C++ TESTS 75 46 25395200 2700
11865749 keyvankhademi E June 30, 2015, 4:52 p.m. OK GNU C++ TESTS 75 62 32153600 2700
24914726 farmerboy E Feb. 23, 2017, 11:15 a.m. OK GNU C++ TESTS 75 78 27955200 2700
12214386 sunzeyu E July 24, 2015, 1 p.m. OK GNU C++ TESTS 75 78 325836800 2700
13924825 VitoCorleone E Oct. 29, 2015, 12:09 a.m. OK GNU C++ TESTS 75 93 401510400 2700
11871014 nwi E June 30, 2015, 7:46 p.m. OK GNU C++ TESTS 75 108 101478400 2700
19058411 vjudge1 E July 12, 2016, 9:14 p.m. OK GNU C++ TESTS 75 124 25292800 2700
12019142 jugal_sahu E July 12, 2015, 12:50 p.m. OK GNU C++ TESTS 75 124 25497600 2700
12218503 aditya09 E July 24, 2015, 7:47 p.m. OK GNU C++ TESTS 75 124 100556800 2700
17031900 Hikari9 E March 30, 2016, 10:40 a.m. OK GNU C++ TESTS 75 124 100864000 2700
21761150 orailly E Oct. 24, 2016, 11:53 p.m. OK GNU C11 TESTS 75 46 25395200 2700
40986392 ReaLNero1 E July 30, 2018, 8:31 p.m. OK GNU C++11 TESTS 75 46 25395200 2700
21008965 SGZW E Sept. 30, 2016, 7:11 a.m. OK GNU C++11 TESTS 75 46 25497600 2700
11883174 CWD4RKC0D3R E July 1, 2015, 2:03 p.m. OK GNU C++11 TESTS 75 62 100659200 2700
50262378 hankeke E Feb. 21, 2019, 2:18 a.m. OK GNU C++11 TESTS 75 77 100556800 2700
11966851 Skyshirk E July 8, 2015, 3:48 a.m. OK GNU C++11 TESTS 75 77 326963200 2700
12214233 vjudge2 E July 24, 2015, 12:45 p.m. OK GNU C++11 TESTS 75 77 326963200 2700
69163123 vjudge1 E Jan. 20, 2020, 1:49 a.m. OK GNU C++11 TESTS 75 78 26316800 2700
12027919 Player12 E July 13, 2015, 10:18 a.m. OK GNU C++11 TESTS 75 93 402636800 2700
48011808 ShafinKhadem E Jan. 5, 2019, 7:37 p.m. OK GNU C++11 TESTS 75 109 3276800 2700
20959477 Wuvin E Sept. 28, 2016, 3:48 a.m. OK GNU C++11 TESTS 75 109 32153600 2700
34917986 Shuvro77 E Feb. 4, 2018, 8:35 a.m. OK GNU C++14 TESTS 75 77 27443200 2700
59686009 Scut82 E Aug. 30, 2019, 1:34 a.m. OK GNU C++14 TESTS 75 78 126361600 2700
48644372 Restinpeace E Jan. 20, 2019, 4:41 p.m. OK GNU C++14 TESTS 75 93 50688000 2700
34126288 Hemant_323 E Jan. 13, 2018, 12:01 p.m. OK GNU C++14 TESTS 75 93 327987200 2700
28390321 StillFantasy E July 9, 2017, 3:48 p.m. OK GNU C++14 TESTS 75 109 423116800 2700
26240578 apoorv_kulsh E April 9, 2017, 3:45 p.m. OK GNU C++14 TESTS 75 124 27648000 2700
46843885 calabash_boy E Dec. 10, 2018, 9:39 a.m. OK GNU C++14 TESTS 75 124 425881600 2700
50209725 Beast_Within E Feb. 19, 2019, 9:58 p.m. OK GNU C++14 TESTS 75 124 426803200 2700
27527454 lnzva E June 2, 2017, 3:56 p.m. OK GNU C++14 TESTS 75 140 101376000 2700
28141778 jufusong E June 29, 2017, 2:29 p.m. OK GNU C++14 TESTS 75 140 102604800 2700
54587760 ArshiaDadras E May 25, 2019, 7:32 a.m. OK GNU C++17 TESTS 75 156 3276800 2700
36086572 vjudge2 E March 9, 2018, 4:24 a.m. OK GNU C++17 TESTS 75 171 228352000 2700
56641304 aurinegro E July 7, 2019, 2:02 a.m. OK GNU C++17 TESTS 75 187 178995200 2700
41240314 pushpendra1997 E Aug. 5, 2018, 9:49 a.m. OK GNU C++17 TESTS 75 202 32358400 2700
42257092 fsshakkhor E Aug. 29, 2018, 10:47 p.m. OK GNU C++17 TESTS 75 202 100761600 2700
44108962 ivan100sic E Oct. 11, 2018, 10:51 a.m. OK GNU C++17 TESTS 75 202 125440000 2700
62572268 shuerss E Oct. 14, 2019, 2:51 p.m. OK GNU C++17 TESTS 75 202 265830400 2700
41305738 tusikalanse E Aug. 7, 2018, 12:57 p.m. OK GNU C++17 TESTS 75 202 503193600 2700
59602435 haleyk100198 E Aug. 28, 2019, 6:59 a.m. OK GNU C++17 TESTS 75 233 100966400 2700
44108805 ivan100sic E Oct. 11, 2018, 10:46 a.m. OK GNU C++17 TESTS 75 233 277299200 2700
13071217 mashinist E Sept. 17, 2015, 4:17 p.m. OK Java 7 TESTS 75 499 234393600 2700
12081202 mkirsche E July 16, 2015, 9:01 a.m. OK Java 7 TESTS 75 608 521523200 2700
11874328 tehqin E July 1, 2015, 1:48 a.m. OK Java 7 TESTS 75 780 521523200 2700
31796855 tomdmitriev E Oct. 27, 2017, 1:26 p.m. OK Java 8 TESTS 75 265 40345600 2700
11949641 AndreiNet E July 6, 2015, 2:54 p.m. OK Java 8 TESTS 75 452 422092800 2700
46295777 BiIIy E Nov. 28, 2018, 2:20 a.m. OK Java 8 TESTS 75 467 342323200 2700
12013000 searcher774 E July 11, 2015, 9:59 p.m. OK Java 8 TESTS 75 467 520192000 2700
15038372 physmatman E Dec. 26, 2015, 11:49 p.m. OK Java 8 TESTS 75 468 485068800 2700
15038394 physmatman E Dec. 26, 2015, 11:52 p.m. OK Java 8 TESTS 75 483 485068800 2700
22609131 p1p13 E Nov. 29, 2016, 7:29 p.m. OK Java 8 TESTS 75 498 342630400 2700
41920862 Ahmad E Aug. 21, 2018, 4:03 a.m. OK Java 8 TESTS 75 499 342835200 2700
13071211 mashinist E Sept. 17, 2015, 4:16 p.m. OK Java 8 TESTS 75 530 233676800 2700
11905738 YakutovDmitriy E July 3, 2015, 4:55 a.m. OK Java 8 TESTS 75 561 421888000 2700
11868884 azukun E June 30, 2015, 6:04 p.m. OK MS C# TESTS 75 343 213913600 2700
11997549 AnatolyTolstobrov E July 10, 2015, 12:23 p.m. OK MS C# TESTS 75 358 1126400 2700
11868991 azukun E June 30, 2015, 6:07 p.m. OK MS C# TESTS 75 780 364544000 2700
11979884 pacu E July 9, 2015, 4:09 a.m. OK MS C++ TESTS 75 155 25190400 2700
11870818 CleRIC E June 30, 2015, 7:34 p.m. OK MS C++ TESTS 75 186 453632000 2700
11866704 iamexist E June 30, 2015, 5:22 p.m. OK MS C++ TESTS 75 218 180531200 2700
11972175 iblacksun E July 8, 2015, 12:46 p.m. OK MS C++ TESTS 75 233 401715200 2700
11897712 Death_Knight_DK E July 2, 2015, 1:15 p.m. OK MS C++ TESTS 75 233 425984000 2700
11975530 Volja E July 8, 2015, 5:36 p.m. OK MS C++ TESTS 75 249 26009600 2700
11959265 X-ray-X E July 7, 2015, 11:11 a.m. OK MS C++ TESTS 75 249 125542400 2700
11923807 SDil E July 4, 2015, 2:38 p.m. OK MS C++ TESTS 75 265 316211200 2700
11905858 Carups E July 3, 2015, 5:08 a.m. OK MS C++ TESTS 75 280 501145600 2700
11881751 TonySnark E July 1, 2015, 12:14 p.m. OK MS C++ TESTS 75 311 175513600 2700

remove filters

Back to search problems