Codeforces Round 107 (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
150 Codeforces Round 107 (Div. 1) FINISHED False 7200 402332399 Feb. 17, 2012, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4211 ) B Quantity of Strings PROGRAMMING combinatorics dfs and similar graphs math 1800

B'Just in case somebody missed it: this winter is totally cold in Nvodsk! It is so cold that one gets funny thoughts. For example, let 's say there are strings with the length exactly n, based on the alphabet of size m. Any its substring with length equal to k is a palindrome. How many such strings exist? Your task is to find their quantity modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). Be careful and don 't miss a string or two! Let us remind you that a string is a palindrome if it can be read the same way in either direction, from the left to the right and from the right to the left. The first and only line contains three integers: n, m and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m, xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892000). Print a single integer -- the number of strings of the described type modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). In the first sample only one string is valid: "a" (let 's denote the only letter of our alphabet as "a"). In the second sample (if we denote the alphabet letters as "a" and "b") the following strings are valid: "aaaaa" and "bbbbb".'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3041807 AleksanderBalobanov B Jan. 31, 2013, 5:35 p.m. OK Delphi TESTS 70 15 102400 1800
1204621 Ramp B Feb. 19, 2012, 8:29 p.m. OK Delphi TESTS 70 30 819200 1800
1201621 ruban B Feb. 18, 2012, 12:14 p.m. OK Delphi TESTS 70 30 921600 1800
1201245 Quercitron B Feb. 18, 2012, 10:33 a.m. OK Delphi TESTS 70 30 921600 1800
1196353 Toshik B Feb. 17, 2012, 4:53 p.m. OK Delphi TESTS 70 30 921600 1800
1194721 masha B Feb. 17, 2012, 4:34 p.m. OK Delphi TESTS 70 30 921600 1800
1191137 Golovanov399 B Feb. 17, 2012, 3:46 p.m. OK Delphi TESTS 70 30 921600 1800
1243854 Depool B Feb. 29, 2012, 3:21 p.m. OK Delphi TESTS 70 30 921600 1800
1201720 Petruchcho B Feb. 18, 2012, 12:58 p.m. OK Delphi TESTS 70 30 921600 1800
1198250 Affina B Feb. 17, 2012, 6:58 p.m. OK Delphi TESTS 70 30 1024000 1800
4046487 Omelianenko B July 10, 2013, 12:34 p.m. OK FPC TESTS 70 15 0 1800
15607557 Fyodor B Jan. 27, 2016, 8:08 a.m. OK FPC TESTS 70 30 0 1800
8508635 vjudge5 B Nov. 1, 2014, 6:12 a.m. OK FPC TESTS 70 30 0 1800
5022400 pal3 B Nov. 7, 2013, noon OK FPC TESTS 70 30 0 1800
1213608 EG0R B Feb. 21, 2012, 8:02 a.m. OK FPC TESTS 70 30 1024000 1800
1618950 vlad107 B April 23, 2012, 8:31 p.m. OK FPC TESTS 70 30 1024000 1800
1471045 Alex_2oo8 B April 3, 2012, 4:23 p.m. OK FPC TESTS 70 30 1024000 1800
1448195 giongto35 B April 1, 2012, 4 a.m. OK FPC TESTS 70 30 1024000 1800
1220129 boba B Feb. 23, 2012, 9:20 p.m. OK FPC TESTS 70 30 1024000 1800
1214501 Furko B Feb. 21, 2012, 2:17 p.m. OK FPC TESTS 70 30 1024000 1800
3824764 vjudge2 B June 5, 2013, 12:11 p.m. OK GNU C TESTS 70 15 0 1800
5820417 bli0042 B Jan. 27, 2014, 3:52 p.m. OK GNU C TESTS 70 30 0 1800
1193983 eha B Feb. 17, 2012, 4:25 p.m. OK GNU C TESTS 70 30 1331200 1800
1191716 LayCurse B Feb. 17, 2012, 3:53 p.m. OK GNU C TESTS 70 30 1331200 1800
1190039 kawatea B Feb. 17, 2012, 3:33 p.m. OK GNU C TESTS 70 30 1433600 1800
2494742 Uki B Nov. 3, 2012, 12:41 p.m. OK GNU C TESTS 70 31 0 1800
2425314 cpy B Oct. 25, 2012, 11:59 a.m. OK GNU C TESTS 70 31 0 1800
1198473 mage B Feb. 17, 2012, 7:33 p.m. OK GNU C TESTS 70 50 5427200 1800
32058978 HNP B Nov. 4, 2017, 4:58 p.m. OK GNU C++ TESTS 70 15 0 1800
30834890 Ptrq B Sept. 29, 2017, 4:09 p.m. OK GNU C++ TESTS 70 15 0 1800
27738215 cobs14 B June 12, 2017, 12:59 p.m. OK GNU C++ TESTS 70 15 0 1800
27728750 scli B June 12, 2017, 12:18 a.m. OK GNU C++ TESTS 70 15 0 1800
27123549 vjudge1 B May 15, 2017, 2:21 p.m. OK GNU C++ TESTS 70 15 0 1800
22691139 vjudge3 B Dec. 4, 2016, 7:51 a.m. OK GNU C++ TESTS 70 15 0 1800
4930308 Son-Goku B Oct. 29, 2013, 5:39 p.m. OK GNU C++ TESTS 70 15 0 1800
4145269 vjudge4 B July 24, 2013, 7:27 a.m. OK GNU C++ TESTS 70 15 0 1800
4145229 yejinru B July 24, 2013, 7:20 a.m. OK GNU C++ TESTS 70 15 0 1800
4145226 vjudge3 B July 24, 2013, 7:20 a.m. OK GNU C++ TESTS 70 15 0 1800
3176463 Doxer B Feb. 23, 2013, 2:26 p.m. OK GNU C++0x TESTS 70 15 0 1800
4849307 FAU.rot B Oct. 23, 2013, 7:59 a.m. OK GNU C++0x TESTS 70 30 0 1800
7453119 saichandu6 B Aug. 15, 2014, 12:13 p.m. OK GNU C++0x TESTS 70 30 0 1800
7299267 tenshi_kanade B July 31, 2014, 11:52 a.m. OK GNU C++0x TESTS 70 30 0 1800
4687102 laquendi B Oct. 6, 2013, 12:15 p.m. OK GNU C++0x TESTS 70 30 0 1800
1197724 lyoz B Feb. 17, 2012, 6:01 p.m. OK GNU C++0x TESTS 70 30 1433600 1800
1194875 cafelier B Feb. 17, 2012, 4:36 p.m. OK GNU C++0x TESTS 70 30 1433600 1800
1200620 doraemon B Feb. 18, 2012, 7:52 a.m. OK GNU C++0x TESTS 70 30 1433600 1800
1199846 Archon.JK B Feb. 18, 2012, 5:31 a.m. OK GNU C++0x TESTS 70 30 1433600 1800
1199833 Archon.JK B Feb. 18, 2012, 5:29 a.m. OK GNU C++0x TESTS 70 30 1433600 1800
36141763 2465806616 B March 10, 2018, 7:33 a.m. OK GNU C11 TESTS 70 15 1843200 1800
58927567 rainboy B Aug. 16, 2019, 8:34 p.m. OK GNU C11 TESTS 70 31 102400 1800
27913404 konbu B June 19, 2017, 9:45 p.m. OK GNU C++11 TESTS 70 15 0 1800
27232667 Mohammad_Kartoumeh B May 20, 2017, 9:35 a.m. OK GNU C++11 TESTS 70 15 0 1800
27111174 vjudge3 B May 14, 2017, 6:27 p.m. OK GNU C++11 TESTS 70 15 0 1800
22408310 Mostafa.Negm B Nov. 22, 2016, 5:21 p.m. OK GNU C++11 TESTS 70 15 0 1800
22324289 DeadPillow B Nov. 19, 2016, 11:08 a.m. OK GNU C++11 TESTS 70 15 0 1800
22293501 srinu37 B Nov. 17, 2016, 4:58 p.m. OK GNU C++11 TESTS 70 15 0 1800
30982199 vjudge2 B Oct. 4, 2017, 3:28 a.m. OK GNU C++11 TESTS 70 15 0 1800
30311304 final_tsu B Sept. 13, 2017, 4:06 p.m. OK GNU C++11 TESTS 70 15 0 1800
30311318 yaksha B Sept. 13, 2017, 4:07 p.m. OK GNU C++11 TESTS 70 15 0 1800
29530024 zadrga B Aug. 17, 2017, 4:06 p.m. OK GNU C++11 TESTS 70 15 0 1800
31873914 Shuvro77 B Oct. 29, 2017, 5:55 p.m. OK GNU C++14 TESTS 70 15 0 1800
32550778 vjudge3 B Nov. 22, 2017, 12:54 p.m. OK GNU C++14 TESTS 70 15 0 1800
32550665 _Vortex B Nov. 22, 2017, 12:50 p.m. OK GNU C++14 TESTS 70 15 0 1800
32353166 bash B Nov. 16, 2017, 11:15 a.m. OK GNU C++14 TESTS 70 15 0 1800
32202161 ujjwal9895 B Nov. 10, 2017, 5:41 p.m. OK GNU C++14 TESTS 70 15 0 1800
31226667 analog123 B Oct. 11, 2017, 7:46 p.m. OK GNU C++14 TESTS 70 15 0 1800
31000184 Gasser B Oct. 4, 2017, 6:08 p.m. OK GNU C++14 TESTS 70 15 0 1800
30868376 Mockingjay B Sept. 30, 2017, 1:52 p.m. OK GNU C++14 TESTS 70 15 0 1800
30841829 Aristos B Sept. 29, 2017, 9:44 p.m. OK GNU C++14 TESTS 70 15 0 1800
30829228 Lvitsa B Sept. 29, 2017, 12:44 p.m. OK GNU C++14 TESTS 70 15 0 1800
41301798 partha_mbstu B Aug. 7, 2018, 10:41 a.m. OK GNU C++17 TESTS 70 15 0 1800
67001536 ffao B Dec. 16, 2019, 6 a.m. OK GNU C++17 TESTS 70 30 0 1800
57160359 sauravray2587 B July 16, 2019, 6:44 p.m. OK GNU C++17 TESTS 70 30 204800 1800
37895722 TEAs B May 5, 2018, 4:25 a.m. OK GNU C++17 TESTS 70 30 3379200 1800
35971525 Anti-Dark B March 5, 2018, 4:14 p.m. OK GNU C++17 TESTS 70 30 11264000 1800
69450136 ST_C B Jan. 24, 2020, 5:47 a.m. OK GNU C++17 TESTS 70 31 0 1800
69675210 antontrygubO_o B Jan. 28, 2020, 2:05 p.m. OK GNU C++17 TESTS 70 31 0 1800
69675111 Ari B Jan. 28, 2020, 2:03 p.m. OK GNU C++17 TESTS 70 31 0 1800
69627957 m.hasan01 B Jan. 27, 2020, 4:21 p.m. OK GNU C++17 TESTS 70 31 0 1800
69091238 GreatRoboCreator B Jan. 19, 2020, 10:14 a.m. OK GNU C++17 TESTS 70 31 0 1800
13109941 CyberZHG B Sept. 20, 2015, 5:29 a.m. OK Haskell TESTS 70 30 0 1800
4609312 DimsFromDergachy B Sept. 30, 2013, 2:53 a.m. OK Haskell TESTS 70 30 102400 1800
1218284 tjwilson B Feb. 23, 2012, 12:54 a.m. OK Haskell TESTS 70 30 2048000 1800
1215667 JamaDharma B Feb. 22, 2012, 8:45 a.m. OK Haskell TESTS 70 50 2048000 1800
13109936 vjudge5 B Sept. 20, 2015, 5:28 a.m. OK Haskell TESTS 70 62 0 1800
3658363 pavel.rosputko B May 1, 2013, 3:46 p.m. OK Haskell TESTS 70 656 57958400 1800
1370279 mdldml B March 16, 2012, 7:48 p.m. OK Java 6 TESTS 70 80 43110400 1800
1198827 xDEMONx B Feb. 17, 2012, 9:32 p.m. OK Java 6 TESTS 70 80 43110400 1800
1198249 wackloner B Feb. 17, 2012, 6:57 p.m. OK Java 6 TESTS 70 80 43110400 1800
1197994 iksuy B Feb. 17, 2012, 6:24 p.m. OK Java 6 TESTS 70 80 43110400 1800
1197460 madkite B Feb. 17, 2012, 5:45 p.m. OK Java 6 TESTS 70 80 43110400 1800
1193053 Abra B Feb. 17, 2012, 4:13 p.m. OK Java 6 TESTS 70 80 43110400 1800
1191335 yarrr B Feb. 17, 2012, 3:48 p.m. OK Java 6 TESTS 70 80 43110400 1800
1188267 Egor B Feb. 17, 2012, 3:14 p.m. OK Java 6 TESTS 70 80 43110400 1800
1197763 AlexErofeev B Feb. 17, 2012, 6:06 p.m. OK Java 6 TESTS 70 80 43212800 1800
1212799 ai9128429340875 B Feb. 20, 2012, 7:04 p.m. OK Java 6 TESTS 70 80 44851200 1800
2929167 Spellbound B Jan. 16, 2013, 9:35 a.m. OK Java 7 TESTS 70 78 0 1800
4006262 MOSJAVA B July 3, 2013, 10:26 a.m. OK Java 7 TESTS 70 93 0 1800
1743843 mostafa_fahim B May 30, 2012, 10 p.m. OK Java 7 TESTS 70 110 44953600 1800
5317977 0p9o8i B Dec. 1, 2013, 1:09 a.m. OK Java 7 TESTS 70 124 0 1800
6542377 nickbuelich B May 4, 2014, 3:58 a.m. OK Java 7 TESTS 70 154 0 1800
9238678 upsolving B Dec. 24, 2014, 7:37 a.m. OK Java 7 TESTS 70 156 0 1800
7009599 owenomar B July 4, 2014, 9:21 a.m. OK Java 7 TESTS 70 156 0 1800
5447659 vjudge5 B Dec. 16, 2013, 12:07 a.m. OK Java 7 TESTS 70 156 0 1800
5447448 vjudge3 B Dec. 15, 2013, 9:59 p.m. OK Java 7 TESTS 70 156 0 1800
4214392 amin-55 B Aug. 1, 2013, 2:17 p.m. OK Java 7 TESTS 70 156 0 1800
68944758 sakt_coder B Jan. 16, 2020, 3:43 p.m. OK Java 8 TESTS 70 124 0 1800
49323793 boltUsain B Feb. 1, 2019, 1:20 p.m. OK Java 8 TESTS 70 124 0 1800
46179122 KulikAlex B Nov. 24, 2018, 4:47 p.m. OK Java 8 TESTS 70 124 0 1800
45312394 ViciousCoder B Nov. 5, 2018, 5:29 a.m. OK Java 8 TESTS 70 124 0 1800
40567480 tsumit023 B July 20, 2018, 6:22 a.m. OK Java 8 TESTS 70 124 0 1800
32246389 Kammola B Nov. 12, 2017, 2:41 p.m. OK Java 8 TESTS 70 124 0 1800
32001443 IntueorDaniel B Nov. 3, 2017, 8:19 a.m. OK Java 8 TESTS 70 124 0 1800
25136615 MazzForces B March 1, 2017, 9:43 p.m. OK Java 8 TESTS 70 124 20480000 1800
33615458 sanket407 B Dec. 25, 2017, 11:41 a.m. OK Java 8 TESTS 70 124 20684800 1800
58927566 Dukkha B Aug. 16, 2019, 8:34 p.m. OK Java 8 TESTS 70 155 0 1800
52285458 hongquanntct B April 3, 2019, 7:27 p.m. OK Mono C# TESTS 70 62 3584000 1800
52285797 hongquanntct B April 3, 2019, 7:40 p.m. OK Mono C# TESTS 70 62 3584000 1800
52285523 hongquanntct B April 3, 2019, 7:29 p.m. OK Mono C# TESTS 70 77 3686400 1800
1198669 Lyova B Feb. 17, 2012, 8:38 p.m. OK Mono C# TESTS 70 90 9932800 1800
1198209 NickSerg B Feb. 17, 2012, 6:51 p.m. OK Mono C# TESTS 70 90 10035200 1800
1216037 onigiri B Feb. 22, 2012, 1:05 p.m. OK Mono C# TESTS 70 90 10035200 1800
1213842 Kolyanich B Feb. 21, 2012, 9:29 a.m. OK Mono C# TESTS 70 90 10035200 1800
1195438 fiver B Feb. 17, 2012, 4:43 p.m. OK Mono C# TESTS 70 110 13004800 1800
5636519 abbyy B Jan. 8, 2014, 8:28 a.m. OK MS C# TESTS 70 92 102400 1800
15830940 og.kostya B Feb. 5, 2016, 6:05 p.m. OK MS C# TESTS 70 92 102400 1800
3952314 Mosyagin B June 23, 2013, 7 p.m. OK MS C++ TESTS 70 15 0 1800
3810473 vjudge3 B June 1, 2013, 8:53 a.m. OK MS C++ TESTS 70 15 0 1800
3647559 ACMac B April 28, 2013, 11:23 a.m. OK MS C++ TESTS 70 15 0 1800
3540702 qian99 B April 15, 2013, 11:40 a.m. OK MS C++ TESTS 70 15 0 1800
3519372 tomas.svab B April 12, 2013, 7:02 p.m. OK MS C++ TESTS 70 15 0 1800
25450943 Alladdin B March 13, 2017, 10:09 a.m. OK MS C++ TESTS 70 15 2150400 1800
15208970 NVAL B Jan. 6, 2016, 3:59 p.m. OK MS C++ TESTS 70 30 0 1800
9271955 AU.Bahosain B Dec. 25, 2014, 11:57 p.m. OK MS C++ TESTS 70 30 0 1800
9812469 xiaoyu20123 B Feb. 13, 2015, 12:30 a.m. OK MS C++ TESTS 70 30 0 1800
11142950 OmarHashim B May 19, 2015, 11:04 a.m. OK MS C++ TESTS 70 30 0 1800
57731730 Kevinz1 B July 25, 2019, 8:46 a.m. OK MS C++ 2017 TESTS 70 31 0 1800
58217339 vjudge3 B Aug. 3, 2019, 11:16 a.m. OK MS C++ 2017 TESTS 70 31 0 1800
56786952 Natali1 B July 10, 2019, 8:51 a.m. OK MS C++ 2017 TESTS 70 31 0 1800
56762715 bourosh B July 9, 2019, 4:40 p.m. OK MS C++ 2017 TESTS 70 31 0 1800
1190424 alexey.shchepin B Feb. 17, 2012, 3:37 p.m. OK Ocaml TESTS 70 30 2662400 1800
23923636 Yash_ B Jan. 18, 2017, 1:52 p.m. OK PyPy 2 TESTS 70 108 22016000 1800
1205146 marcus B Feb. 20, 2012, 7:31 a.m. OK Python 2 TESTS 70 50 2867200 1800
1218236 sophiebits B Feb. 23, 2012, 12:13 a.m. OK Python 2 TESTS 70 60 2867200 1800
1214679 maos B Feb. 21, 2012, 3:25 p.m. OK Python 2 TESTS 70 60 2867200 1800
1205302 fromoon B Feb. 20, 2012, 10:06 a.m. OK Python 2 TESTS 70 60 2867200 1800
1202796 isgulkov B Feb. 19, 2012, 3:56 a.m. OK Python 2 TESTS 70 60 2867200 1800
1201579 Thomas_Ahle B Feb. 18, 2012, noon OK Python 2 TESTS 70 60 2867200 1800
1200744 zhyu B Feb. 18, 2012, 8:26 a.m. OK Python 2 TESTS 70 60 2867200 1800
1198124 trukanduk B Feb. 17, 2012, 6:33 p.m. OK Python 2 TESTS 70 60 2867200 1800
1195232 Martial B Feb. 17, 2012, 4:40 p.m. OK Python 2 TESTS 70 60 2867200 1800
3197663 lovefly1983 B Feb. 26, 2013, 7:24 a.m. OK Python 2 TESTS 70 62 0 1800
32285072 kryden B Nov. 13, 2017, 1:15 p.m. OK Python 3 TESTS 70 62 0 1800
30334014 a_kabdygali B Sept. 14, 2017, 4:51 p.m. OK Python 3 TESTS 70 62 0 1800
33016824 ChickenInKitchen B Dec. 8, 2017, 7:38 a.m. OK Python 3 TESTS 70 62 5529600 1800
23931422 ItsLastDay B Jan. 18, 2017, 8:59 p.m. OK Python 3 TESTS 70 77 4608000 1800
33089352 shirsho B Dec. 11, 2017, 5:14 a.m. OK Python 3 TESTS 70 77 5529600 1800
37858899 Aditya_Ramesh B May 3, 2018, 10:24 a.m. OK Python 3 TESTS 70 78 7065600 1800
38022406 abrunoaa B May 8, 2018, 1:51 p.m. OK Python 3 TESTS 70 93 7372800 1800
52470788 vinodreddyg28 B April 7, 2019, 6:25 p.m. OK Python 3 TESTS 70 109 0 1800
67528130 MinecraftFuns B Dec. 24, 2019, 2:41 p.m. OK Python 3 TESTS 70 124 0 1800
42203250 modestas_ B Aug. 28, 2018, 10 a.m. OK Python 3 TESTS 70 124 0 1800
1219633 K_operafan B Feb. 23, 2012, 2:50 p.m. OK Ruby TESTS 70 110 5632000 1800
1199726 hogehogehoge B Feb. 18, 2012, 5:11 a.m. OK Ruby TESTS 70 110 5632000 1800

remove filters

Back to search problems