Codeforces Round 179 (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
296 Codeforces Round 179 (Div. 2) FINISHED False 7200 372004197 April 11, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2332 ) B Yaroslav and Two Strings PROGRAMMING combinatorics dp 2000

B'Yaroslav thinks that two strings s and w, consisting of digits and having length n are non-comparable if there are two numbers, i and j (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i, xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), such that si xe2 x80 x89> xe2 x80 x89wi and sj xe2 x80 x89< xe2 x80 x89wj. Here sign si represents the i-th digit of string s, similarly, wj represents the j-th digit of string w. A string 's template is a string that consists of digits and question marks ("?"). Yaroslav has two string templates, each of them has length n. Yaroslav wants to count the number of ways to replace all question marks by some integers in both templates, so as to make the resulting strings incomparable. Note that the obtained strings can contain leading zeroes and that distinct question marks can be replaced by distinct or the same integers. Help Yaroslav, calculate the remainder after dividing the described number of ways by 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the length of both templates. The second line contains the first template -- a string that consists of digits and characters "?". The string 's length equals n. The third line contains the second template in the same format. In a single line print the remainder after dividing the answer to the problem by number 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first test contains no question marks and both strings are incomparable, so the answer is 1. The second test has no question marks, but the given strings are comparable, so the answer is 0.'...

Tutorials

Codeforces Round #179 tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3519494 Casio B April 12, 2013, 7:55 p.m. OK Delphi TESTS 38 46 409600 2000
4406217 ruban B Sept. 4, 2013, 4:48 p.m. OK Delphi TESTS 38 62 409600 2000
3859721 Misha100896 B June 12, 2013, 8:23 a.m. OK Delphi TESTS 38 62 409600 2000
3507738 gohard B April 11, 2013, 4:07 p.m. OK Delphi TESTS 38 109 5222400 2000
3514214 AleksanderBalobanov B April 11, 2013, 6:46 p.m. OK Delphi TESTS 38 140 12902400 2000
3654680 chipchip3412 B April 30, 2013, 1:06 p.m. OK FPC TESTS 38 15 307200 2000
3816174 Nik_Storm_2010 B June 2, 2013, 3:15 p.m. OK FPC TESTS 38 31 307200 2000
3508500 waitnote B April 11, 2013, 4:17 p.m. OK FPC TESTS 38 31 3379200 2000
3517555 netman B April 12, 2013, 11:36 a.m. OK FPC TESTS 38 46 3891200 2000
11707190 xuanquang1999 B June 22, 2015, 9:38 a.m. OK FPC TESTS 38 60 3481600 2000
5080650 love_lt B Nov. 13, 2013, 1:25 a.m. OK FPC TESTS 38 62 7475200 2000
3510670 Omelianenko B April 11, 2013, 4:51 p.m. OK FPC TESTS 38 93 3481600 2000
3519394 RaidBoss B April 12, 2013, 7:07 p.m. OK FPC TESTS 38 93 5529600 2000
14933359 hdt B Dec. 23, 2015, 5:26 a.m. OK FPC TESTS 38 156 9625600 2000
3599301 idemura B April 21, 2013, 9:23 p.m. OK GNU C TESTS 38 15 204800 2000
3513534 kawatea B April 11, 2013, 5:54 p.m. OK GNU C TESTS 38 15 3379200 2000
14757329 supersayajeans B Dec. 11, 2015, 12:16 p.m. OK GNU C TESTS 38 30 102400 2000
4819114 Sunnat B Oct. 18, 2013, 11:42 a.m. OK GNU C TESTS 38 30 102400 2000
6637100 vjudge4 B May 16, 2014, 1:41 p.m. OK GNU C TESTS 38 30 1843200 2000
3583517 cpy B April 21, 2013, 5:17 a.m. OK GNU C TESTS 38 31 3379200 2000
6636789 vjudge4 B May 16, 2014, 12:51 p.m. OK GNU C TESTS 38 60 204800 2000
14698066 dududcbier B Dec. 8, 2015, 12:51 p.m. OK GNU C TESTS 38 62 204800 2000
14680843 dududcbier B Dec. 6, 2015, 9:59 p.m. OK GNU C TESTS 38 92 204800 2000
4075839 onmylove B July 15, 2013, 1:48 p.m. OK GNU C++ TESTS 38 15 204800 2000
4028928 sd0061 B July 6, 2013, 12:02 a.m. OK GNU C++ TESTS 38 15 204800 2000
3963333 vjudge2 B June 26, 2013, 10:40 a.m. OK GNU C++ TESTS 38 15 204800 2000
3790879 vjudge1 B May 29, 2013, 11:49 a.m. OK GNU C++ TESTS 38 15 204800 2000
3756329 And B May 22, 2013, 9:30 a.m. OK GNU C++ TESTS 38 15 204800 2000
3756320 And B May 22, 2013, 9:28 a.m. OK GNU C++ TESTS 38 15 204800 2000
3719242 zhj5chengfeng B May 14, 2013, 7:15 a.m. OK GNU C++ TESTS 38 15 204800 2000
3717485 vjudge2 B May 13, 2013, 4:18 p.m. OK GNU C++ TESTS 38 15 204800 2000
3716353 vjudge4 B May 13, 2013, 11:30 a.m. OK GNU C++ TESTS 38 15 204800 2000
3667628 sevenster B May 4, 2013, 9:06 a.m. OK GNU C++ TESTS 38 15 204800 2000
3525537 htc550605125 B April 13, 2013, 11:38 a.m. OK GNU C++0x TESTS 38 15 204800 2000
3661148 AlexFetisov B May 2, 2013, 5:44 p.m. OK GNU C++0x TESTS 38 15 1433600 2000
7803497 kondranin B Sept. 15, 2014, 5:36 p.m. OK GNU C++0x TESTS 38 30 409600 2000
7015130 nathanajah B July 5, 2014, 9:13 a.m. OK GNU C++0x TESTS 38 30 1228800 2000
6414343 wanbo B April 19, 2014, 2:05 a.m. OK GNU C++0x TESTS 38 30 2150400 2000
9727525 nikola12345 B Feb. 5, 2015, 1:13 p.m. OK GNU C++0x TESTS 38 30 38092800 2000
3618648 teru B April 24, 2013, 11:46 p.m. OK GNU C++0x TESTS 38 31 409600 2000
3585023 tatsuhiro.t B April 21, 2013, 12:44 p.m. OK GNU C++0x TESTS 38 31 409600 2000
3515221 teru B April 11, 2013, 11:18 p.m. OK GNU C++0x TESTS 38 31 409600 2000
3515219 teru B April 11, 2013, 11:15 p.m. OK GNU C++0x TESTS 38 31 409600 2000
22488390 alex20030190 B Nov. 25, 2016, 12:11 p.m. OK GNU C++11 TESTS 38 30 204800 2000
19404094 talewoods B July 25, 2016, 1:08 p.m. OK GNU C++11 TESTS 38 30 204800 2000
19282945 eddy1021 B July 20, 2016, 2:43 p.m. OK GNU C++11 TESTS 38 30 204800 2000
16599029 00001 B March 8, 2016, 10:26 a.m. OK GNU C++11 TESTS 38 30 204800 2000
14779332 brunopc B Dec. 13, 2015, 12:47 a.m. OK GNU C++11 TESTS 38 30 204800 2000
12836493 FizzyDavid B Sept. 4, 2015, 4:27 a.m. OK GNU C++11 TESTS 38 30 204800 2000
11570187 jfgm B June 13, 2015, 3:22 p.m. OK GNU C++11 TESTS 38 30 409600 2000
29523619 shengdebao B Aug. 17, 2017, 10 a.m. OK GNU C++11 TESTS 38 30 512000 2000
14962727 lixolas B Dec. 24, 2015, 2:52 a.m. OK GNU C++11 TESTS 38 30 512000 2000
14746865 jrodrigues B Dec. 10, 2015, 4:09 p.m. OK GNU C++11 TESTS 38 30 1433600 2000
31321649 danya.smelskiy B Oct. 14, 2017, 7:04 p.m. OK GNU C++14 TESTS 38 30 512000 2000
20869331 Arpa B Sept. 23, 2016, 5:09 p.m. OK GNU C++14 TESTS 38 30 512000 2000
36047125 solaimanope B March 7, 2018, 2:03 p.m. OK GNU C++14 TESTS 38 30 2048000 2000
33195753 vjudge1 B Dec. 12, 2017, 8:22 p.m. OK GNU C++14 TESTS 38 30 2048000 2000
25979763 joyfun B March 31, 2017, 1:21 p.m. OK GNU C++14 TESTS 38 30 2150400 2000
23661560 Ali.Pi B Jan. 9, 2017, 7:18 a.m. OK GNU C++14 TESTS 38 30 2150400 2000
34291557 Inugami_Kitsune B Jan. 19, 2018, 4:26 a.m. OK GNU C++14 TESTS 38 30 2457600 2000
28194483 Danial B July 1, 2017, 3:47 p.m. OK GNU C++14 TESTS 38 30 2457600 2000
30125616 ControlBear B Sept. 6, 2017, 7:54 a.m. OK GNU C++14 TESTS 38 30 2662400 2000
28194531 sincerity B July 1, 2017, 3:50 p.m. OK GNU C++14 TESTS 38 30 2969600 2000
65666059 JBer B Nov. 24, 2019, 1:58 p.m. OK GNU C++17 TESTS 38 62 204800 2000
52650966 ruo B April 12, 2019, 4:36 p.m. OK GNU C++17 TESTS 38 62 204800 2000
40693551 vjudge3 B July 24, 2018, 7:01 a.m. OK GNU C++17 TESTS 38 62 204800 2000
65269212 Petro1488 B Nov. 17, 2019, 6:45 p.m. OK GNU C++17 TESTS 38 62 512000 2000
68143186 Anachor B Jan. 4, 2020, 1:30 a.m. OK GNU C++17 TESTS 38 62 512000 2000
65191995 a2dalek B Nov. 16, 2019, 3:33 p.m. OK GNU C++17 TESTS 38 62 512000 2000
64120002 tfg B Nov. 3, 2019, 12:13 a.m. OK GNU C++17 TESTS 38 62 512000 2000
61884570 Juvitus B Oct. 5, 2019, 2:41 a.m. OK GNU C++17 TESTS 38 62 512000 2000
60676557 Eran B Sept. 16, 2019, 12:36 p.m. OK GNU C++17 TESTS 38 62 512000 2000
42025878 Dalgerok B Aug. 24, 2018, 12:26 p.m. OK GNU C++17 TESTS 38 62 512000 2000
9496091 Eeyore B Jan. 21, 2015, 7:31 p.m. OK Go TESTS 38 62 0 2000
3511719 cojna B April 11, 2013, 5:10 p.m. OK Haskell TESTS 38 171 716800 2000
3515222 autotaker B April 11, 2013, 11:18 p.m. OK Haskell TESTS 38 203 21094400 2000
3515159 autotaker B April 11, 2013, 10:38 p.m. OK Haskell TESTS 38 562 22118400 2000
3562201 droidkid B April 18, 2013, 10:27 p.m. OK Java 6 TESTS 38 93 2048000 2000
3561561 bli0042 B April 18, 2013, 6:06 p.m. OK Java 6 TESTS 38 109 0 2000
3518419 Petruchcho B April 12, 2013, 1:58 p.m. OK Java 6 TESTS 38 109 614400 2000
3934851 slycelote B June 22, 2013, 8:39 a.m. OK Java 6 TESTS 38 125 2560000 2000
3509475 shimomire B April 11, 2013, 4:32 p.m. OK Java 6 TESTS 38 140 102400 2000
3511468 julsa B April 11, 2013, 5:05 p.m. OK Java 6 TESTS 38 140 204800 2000
3511581 karia B April 11, 2013, 5:07 p.m. OK Java 6 TESTS 38 140 307200 2000
3514789 tyuan73 B April 11, 2013, 8:18 p.m. OK Java 6 TESTS 38 156 102400 2000
3511272 sergey.vasilinets B April 11, 2013, 5:01 p.m. OK Java 6 TESTS 38 156 102400 2000
3559150 willakira B April 18, 2013, 6:30 a.m. OK Java 6 TESTS 38 156 2457600 2000
3516904 rpk74m B April 12, 2013, 9:49 a.m. OK Java 7 TESTS 38 93 0 2000
3509821 ilya.krokus B April 11, 2013, 4:37 p.m. OK Java 7 TESTS 38 93 0 2000
3508495 z153 B April 11, 2013, 4:17 p.m. OK Java 7 TESTS 38 93 0 2000
3525518 Azat_Yusupov B April 13, 2013, 11:36 a.m. OK Java 7 TESTS 38 93 102400 2000
3657861 rantd B May 1, 2013, 1:38 p.m. OK Java 7 TESTS 38 93 204800 2000
3966293 Zzyzx B June 27, 2013, 7:15 a.m. OK Java 7 TESTS 38 109 0 2000
3695842 I_love_Malika B May 9, 2013, 10:58 a.m. OK Java 7 TESTS 38 109 0 2000
3508954 gh_ost B April 11, 2013, 4:24 p.m. OK Java 7 TESTS 38 109 204800 2000
3518460 vadimmm B April 12, 2013, 2:10 p.m. OK Java 7 TESTS 38 125 0 2000
10056156 AkshajK B Feb. 27, 2015, 7:54 p.m. OK Java 7 TESTS 38 154 0 2000
9450322 AStepanov B Jan. 17, 2015, 1:06 p.m. OK Java 8 TESTS 38 248 0 2000
10918110 pmarecki B April 28, 2015, 11:25 a.m. OK Java 8 TESTS 38 248 28569600 2000
36799944 Omar_Morsi B April 1, 2018, 1:39 p.m. OK Java 8 TESTS 38 310 20684800 2000
21629809 MazzForces B Oct. 20, 2016, 10:34 p.m. OK Java 8 TESTS 38 404 7475200 2000
3509423 marat.snowbear B April 11, 2013, 4:31 p.m. OK Mono C# TESTS 38 46 2252800 2000
3509289 bor.is B April 11, 2013, 4:29 p.m. OK Mono C# TESTS 38 46 4505600 2000
3523214 Guliash B April 13, 2013, 7:26 a.m. OK Mono C# TESTS 38 62 3891200 2000
3580616 r13 B April 20, 2013, 12:18 p.m. OK MS C++ TESTS 38 15 204800 2000
3645710 Kazim B April 28, 2013, 4:49 a.m. OK MS C++ TESTS 38 15 204800 2000
4130413 vjudge1 B July 21, 2013, 4:14 p.m. OK MS C++ TESTS 38 15 204800 2000
3512055 Noskov B April 11, 2013, 5:15 p.m. OK MS C++ TESTS 38 15 409600 2000
3511507 Zimbabwe23 B April 11, 2013, 5:06 p.m. OK MS C++ TESTS 38 15 409600 2000
3511027 Krainov_Dmitry B April 11, 2013, 4:57 p.m. OK MS C++ TESTS 38 15 409600 2000
3749207 muslim B May 20, 2013, 9:50 a.m. OK MS C++ TESTS 38 15 409600 2000
3702859 alpc104 B May 11, 2013, 3:17 p.m. OK MS C++ TESTS 38 15 409600 2000
3516257 hamed053 B April 12, 2013, 7:02 a.m. OK MS C++ TESTS 38 15 409600 2000
3512324 AbiriAmir B April 11, 2013, 5:20 p.m. OK MS C++ TESTS 38 15 409600 2000
60597982 platypus179 B Sept. 15, 2019, 6:49 a.m. OK PyPy 3 TESTS 38 342 3276800 2000
3511176 kit1980 B April 11, 2013, 5 p.m. OK Python 2 TESTS 38 109 2150400 2000
3661278 carvajal B May 2, 2013, 6:51 p.m. OK Python 2 TESTS 38 140 1843200 2000
3515612 micq B April 12, 2013, 2:59 a.m. OK Python 2 TESTS 38 203 2150400 2000
3558706 stareven B April 18, 2013, 3:26 a.m. OK Python 2 TESTS 38 234 5120000 2000
3509311 YhnoLh B April 11, 2013, 4:29 p.m. OK Python 2 TESTS 38 296 2252800 2000
3522883 nealzane B April 13, 2013, 6:38 a.m. OK Python 2 TESTS 38 328 2457600 2000
12297772 thepotatoranch B Aug. 1, 2015, 1:34 a.m. OK Python 2 TESTS 38 342 921600 2000
3523055 nealzane B April 13, 2013, 7:04 a.m. OK Python 2 TESTS 38 375 10444800 2000
3516311 Newer123 B April 12, 2013, 7:18 a.m. OK Python 2 TESTS 38 421 307200 2000
3516297 Newer123 B April 12, 2013, 7:13 a.m. OK Python 2 TESTS 38 437 307200 2000
28195448 rprtr258 B July 1, 2017, 4:49 p.m. OK Python 3 TESTS 38 436 6041600 2000
68554617 vjudge5 B Jan. 10, 2020, 4:33 p.m. OK Python 3 TESTS 38 528 819200 2000
28195547 rprtr258 B July 1, 2017, 4:56 p.m. OK Python 3 TESTS 38 528 6041600 2000
68554618 vjudge1 B Jan. 10, 2020, 4:33 p.m. OK Python 3 TESTS 38 530 819200 2000
53899830 Mohamed_Ayman B May 9, 2019, 8:28 a.m. OK Python 3 TESTS 38 560 614400 2000
68550249 vjudge2 B Jan. 10, 2020, 4:08 p.m. OK Python 3 TESTS 38 560 921600 2000
28195742 rprtr258 B July 1, 2017, 5:10 p.m. OK Python 3 TESTS 38 684 7065600 2000
42124576 Mk_Python_v1 B Aug. 26, 2018, 2:21 p.m. OK Python 3 TESTS 38 810 2150400 2000
28195911 rprtr258 B July 1, 2017, 5:21 p.m. OK Python 3 TESTS 38 840 7065600 2000
28195787 rprtr258 B July 1, 2017, 5:13 p.m. OK Python 3 TESTS 38 842 7577600 2000

remove filters

Back to search problems