Codeforces Round 210 (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
360 Codeforces Round 210 (Div. 1) FINISHED False 7200 347720399 Nov. 10, 2013, 5 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1109 ) C Levko and Strings PROGRAMMING combinatorics dp 2700

B'Levko loves strings of length n, consisting of lowercase English letters, very much. He has one such string s. For each string t of length n, Levko defines its beauty relative to s as the number of pairs of indexes i, j (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), such that substring t[i..j] is lexicographically larger than substring s[i..j]. The boy wondered how many strings t are there, such that their beauty relative to s equals exactly k. Help him, find the remainder after division this number by 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). A substring s[i..j] of string s xe2 x80 x89= xe2 x80 x89s1s2... sn is string sisi xe2 x80 x89 xe2 x80 x89+ xe2 x80 x89 xe2 x80 x891... sj. String x xe2 x80 x89 xe2 x80 x89= xe2 x80 x89 xe2 x80 x89x1x2... xp is lexicographically larger than string y xe2 x80 x89 xe2 x80 x89= xe2 x80 x89 xe2 x80 x89y1y2... yp, if there is such number r (r xe2 x80 x89< xe2 x80 x89p), that x1 xe2 x80 x89 xe2 x80 x89= xe2 x80 x89 xe2 x80 x89y1, xe2 x80 x89 xe2 x80 x89x2 xe2 x80 x89 xe2 x80 x89= xe2 x80 x89 xe2 x80 x89y2, xe2 x80 x89 xe2 x80 x89... , xe2 x80 x89 xe2 x80 x89xr xe2 x80 x89 xe2 x80 x89= xe2 x80 x89 xe2 x80 x89yr and xr xe2 x80 x89 xe2 x80 x89+ xe2 x80 x89 xe2 x80 x891 xe2 x80 x89> xe2 x80 x89yr xe2 x80 x89 xe2 x80 x89+ xe2 x80 x89 xe2 x80 x891. The string characters are compared by their ASCII codes. The first line contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892000, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892000). The second line contains a non-empty string s of length n. String s consists only of lowercase English letters. Print a single number -- the answer to the problem modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897).'...

Tutorials

Codeforces Round #210 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
6520287 yosupo C May 2, 2014, 5:36 a.m. OK D TESTS 29 280 32563200 2700
6520280 yosupo C May 2, 2014, 5:35 a.m. OK D TESTS 29 280 33075200 2700
22288250 heklo C Nov. 17, 2016, 12:46 p.m. OK FPC TESTS 29 405 256614400 2700
5186109 pal3 C Nov. 21, 2013, 3:33 p.m. OK FPC TESTS 29 546 64204800 2700
5070498 Reventon1 C Nov. 11, 2013, 5:30 p.m. OK FPC TESTS 29 608 64512000 2700
5091580 Misha100896 C Nov. 13, 2013, 5:38 p.m. OK FPC TESTS 29 670 32563200 2700
10139863 403369233 C March 4, 2015, 2:18 a.m. OK FPC TESTS 29 982 32460800 2700
5098544 mike199250 C Nov. 14, 2013, 3:18 p.m. OK GNU C TESTS 29 343 33177600 2700
14752188 supersayajeans C Dec. 11, 2015, 2:43 a.m. OK GNU C TESTS 29 373 33075200 2700
5068009 heyihong C Nov. 11, 2013, 1:03 p.m. OK GNU C++ TESTS 29 93 32358400 2700
5242883 PSDEV C Nov. 26, 2013, 12:07 p.m. OK GNU C++ TESTS 29 109 35328000 2700
5129608 zhj C Nov. 17, 2013, 7:49 a.m. OK GNU C++ TESTS 29 109 35328000 2700
5354485 kharzai C Dec. 5, 2013, 1:48 p.m. OK GNU C++ TESTS 29 124 16076800 2700
5128416 Victoralin10 C Nov. 17, 2013, 12:27 a.m. OK GNU C++ TESTS 29 124 16076800 2700
17200037 bardek C April 7, 2016, 7:20 a.m. OK GNU C++ TESTS 29 124 18227200 2700
5073629 RsEnts C Nov. 12, 2013, 3:58 a.m. OK GNU C++ TESTS 29 124 32358400 2700
7072861 tankche1 C July 13, 2014, 8:05 a.m. OK GNU C++ TESTS 29 124 35328000 2700
7494354 adurysk C Aug. 17, 2014, 4:41 p.m. OK GNU C++ TESTS 29 124 64204800 2700
5072184 olimpo C Nov. 11, 2013, 9:32 p.m. OK GNU C++ TESTS 29 124 72192000 2700
5095445 Shik C Nov. 14, 2013, 8:49 a.m. OK GNU C++0x TESTS 29 187 64819200 2700
5195862 dc. C Nov. 23, 2013, 3:51 a.m. OK GNU C++0x TESTS 29 202 33689600 2700
5903555 rares.buhai C Feb. 5, 2014, 12:50 p.m. OK GNU C++0x TESTS 29 218 32153600 2700
5055393 MinakoKojima C Nov. 10, 2013, 8:08 p.m. OK GNU C++0x TESTS 29 218 32358400 2700
5076664 fanzhengchen C Nov. 12, 2013, 12:14 p.m. OK GNU C++0x TESTS 29 218 71475200 2700
5048366 niyaznigmatul C Nov. 10, 2013, 5:54 p.m. OK GNU C++0x TESTS 29 218 79155200 2700
7688759 mtomic C Sept. 5, 2014, 2:49 p.m. OK GNU C++0x TESTS 29 234 16076800 2700
7502965 ztk C Aug. 18, 2014, 5:14 p.m. OK GNU C++0x TESTS 29 234 16076800 2700
5116685 2011330300713 C Nov. 15, 2013, 12:05 p.m. OK GNU C++0x TESTS 29 234 32153600 2700
5116657 2011330300713 C Nov. 15, 2013, 12:03 p.m. OK GNU C++0x TESTS 29 234 32153600 2700
63954237 shuashuawan C Nov. 1, 2019, 12:01 a.m. OK GNU C++11 TESTS 29 108 16076800 2700
11846167 cq_phqg C June 30, 2015, 6:23 a.m. OK GNU C++11 TESTS 29 109 48332800 2700
44769147 laurageorgescu C Oct. 24, 2018, 11:32 a.m. OK GNU C++11 TESTS 29 124 48128000 2700
54501343 WOSHIGEPACHONG2 C May 22, 2019, 9:09 p.m. OK GNU C++11 TESTS 29 140 16179200 2700
52897830 menjiantong C April 17, 2019, 9:48 a.m. OK GNU C++11 TESTS 29 140 16179200 2700
10696140 -XraY- C April 13, 2015, 4:16 p.m. OK GNU C++11 TESTS 29 140 16179200 2700
27297191 RNS_CUS C May 23, 2017, 8:38 a.m. OK GNU C++11 TESTS 29 171 16384000 2700
41338774 Onozuka C Aug. 8, 2018, 1:57 p.m. OK GNU C++11 TESTS 29 171 32256000 2700
54879480 _Jumbo C May 31, 2019, 1:30 p.m. OK GNU C++11 TESTS 29 171 32358400 2700
41323232 Isrothy C Aug. 8, 2018, 2:59 a.m. OK GNU C++11 TESTS 29 171 64307200 2700
33961483 Flash-boy C Jan. 6, 2018, 11:19 a.m. OK GNU C++14 TESTS 29 124 18022400 2700
32888172 Flash-boy C Dec. 3, 2017, 1:39 a.m. OK GNU C++14 TESTS 29 124 18022400 2700
50085828 GreymaneSilverfang C Feb. 18, 2019, 7:22 a.m. OK GNU C++14 TESTS 29 155 64204800 2700
69657545 yan-zp C Jan. 28, 2020, 8:06 a.m. OK GNU C++14 TESTS 29 156 16793600 2700
60475905 Origenes C Sept. 13, 2019, 8:07 a.m. OK GNU C++14 TESTS 29 156 36147200 2700
30809459 LincHpin C Sept. 28, 2017, 3:44 p.m. OK GNU C++14 TESTS 29 156 64819200 2700
41983933 Marckess C Aug. 23, 2018, 4:30 a.m. OK GNU C++14 TESTS 29 171 32256000 2700
41298229 Solashiro C Aug. 7, 2018, 8:27 a.m. OK GNU C++14 TESTS 29 171 32563200 2700
55824659 Aidos C June 20, 2019, 10:16 a.m. OK GNU C++14 TESTS 29 171 32768000 2700
32655946 Arg_007 C Nov. 25, 2017, 7:50 p.m. OK GNU C++14 TESTS 29 171 66355200 2700
51565425 Shayan.P C March 20, 2019, 9:31 a.m. OK GNU C++17 TESTS 29 155 64819200 2700
61986471 ivan100sic C Oct. 6, 2019, 1:42 p.m. OK GNU C++17 TESTS 29 156 32256000 2700
68155701 justfocusplease C Jan. 4, 2020, 8:52 a.m. OK GNU C++17 TESTS 29 171 16076800 2700
41337130 vjudge1 C Aug. 8, 2018, 12:52 p.m. OK GNU C++17 TESTS 29 171 16896000 2700
52929860 Vexoben C April 18, 2019, 12:30 a.m. OK GNU C++17 TESTS 29 187 32256000 2700
55813937 mohammadrobot C June 20, 2019, 5:30 a.m. OK GNU C++17 TESTS 29 202 16179200 2700
41276662 XuZihan C Aug. 6, 2018, 1:35 p.m. OK GNU C++17 TESTS 29 202 16179200 2700
67134016 I_love_Inori_Yuzuriha C Dec. 18, 2019, 2:43 a.m. OK GNU C++17 TESTS 29 202 64819200 2700
41276671 vjudge1 C Aug. 6, 2018, 1:35 p.m. OK GNU C++17 TESTS 29 217 16179200 2700
67564528 ivanilos C Dec. 24, 2019, 6:43 p.m. OK GNU C++17 TESTS 29 217 32256000 2700
5050542 mmaxio C Nov. 10, 2013, 6:13 p.m. OK Java 7 TESTS 29 249 14540800 2700
5051740 Egor C Nov. 10, 2013, 6:44 p.m. OK Java 7 TESTS 29 265 54067200 2700
5454545 uwi C Dec. 17, 2013, 10:06 a.m. OK Java 7 TESTS 29 312 53350400 2700
5052042 cerealguy C Nov. 10, 2013, 6:51 p.m. OK Java 7 TESTS 29 343 53657600 2700
5071657 qwerty787788 C Nov. 11, 2013, 8:01 p.m. OK Java 7 TESTS 29 358 53350400 2700
7495491 karan173 C Aug. 17, 2014, 7:48 p.m. OK Java 7 TESTS 29 389 53452800 2700
5051727 chavit C Nov. 10, 2013, 6:43 p.m. OK Java 7 TESTS 29 405 142438400 2700
5056617 littlesheep2012 C Nov. 11, 2013, 12:53 a.m. OK Java 7 TESTS 29 468 53350400 2700
5207539 Azat_Yusupov C Nov. 24, 2013, 10:37 a.m. OK Java 7 TESTS 29 499 54169600 2700
5067263 ftiasch C Nov. 11, 2013, 11:30 a.m. OK Java 7 TESTS 29 514 14540800 2700
37027890 Noureldin C April 6, 2018, 5:33 p.m. OK Java 8 TESTS 29 686 40038400 2700
10034856 azukun C Feb. 26, 2015, 4:23 p.m. OK MS C# TESTS 29 405 33075200 2700
5362742 GlebsHP C Dec. 6, 2013, 8:02 p.m. OK MS C++ TESTS 29 140 50073600 2700
5051440 RAVEman C Nov. 10, 2013, 6:35 p.m. OK MS C++ TESTS 29 187 32256000 2700
6300253 blueseen C April 8, 2014, 8:34 a.m. OK MS C++ TESTS 29 234 32153600 2700
5055943 dergach C Nov. 10, 2013, 9:24 p.m. OK MS C++ TESTS 29 280 32051200 2700
5051251 DPR-pavlin C Nov. 10, 2013, 6:30 p.m. OK MS C++ TESTS 29 280 96358400 2700
6172484 Scorpy C March 29, 2014, 9:05 a.m. OK MS C++ TESTS 29 296 64614400 2700
5054849 Merlininice C Nov. 10, 2013, 7:29 p.m. OK MS C++ TESTS 29 296 96563200 2700
5052167 NALP C Nov. 10, 2013, 6:54 p.m. OK MS C++ TESTS 29 327 64921600 2700
5066637 alex.alex C Nov. 11, 2013, 10:38 a.m. OK MS C++ TESTS 29 343 64102400 2700
5066775 alex.alex C Nov. 11, 2013, 10:48 a.m. OK MS C++ TESTS 29 358 64102400 2700

remove filters

Back to search problems