Codeforces Round 228 (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
388 Codeforces Round 228 (Div. 1) FINISHED False 7500 340381199 Feb. 3, 2014, 3:40 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2481 ) B Fox and Minimal path PROGRAMMING bitmasks constructive algorithms graphs implementation math 2000

B'Fox Ciel wants to write a task for a programming contest. The task is: "You are given a simple undirected graph with n vertexes. Each its edge has unit length. You should calculate the number of shortest paths between vertex 1 and vertex 2." Same with some writers, she wants to make an example with some certain output: for example, her birthday or the number of her boyfriend. Can you help her to make a test case with answer equal exactly to k? The first line contains a single integer k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). You should output a graph G with n vertexes (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000). There must be exactly k shortest paths between vertex 1 and vertex 2 of the graph. The first line must contain an integer n. Then adjacency matrix G with n rows and n columns must follow. Each element of the matrix must be 'N ' or 'Y '. If Gij is 'Y ', then graph G has a edge connecting vertex i and vertex j. Consider the graph vertexes are numbered from 1 to n. The graph must be undirected and simple: Gii = 'N ' and Gij xe2 x80 x89= xe2 x80 x89Gji must hold. And there must be at least one path between vertex 1 and vertex 2. It 's guaranteed that the answer exists. If there multiple correct answers, you can output any of them. In first example, there are 2 shortest paths: 1-3-2 and 1-4-2. In second example, there are 9 shortest paths: 1-3-6-2, 1-3-7-2, 1-3-8-2, 1-4-6-2, 1-4-7-2, 1-4-8-2, 1-5-6-2, 1-5-7-2, 1-5-8-2.'...

Tutorials

Codeforces Round #228 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5888519 equi B Feb. 3, 2014, 6:38 p.m. OK Delphi TESTS 47 31 4096000 2000
5896933 ruban B Feb. 4, 2014, 4:14 p.m. OK Delphi TESTS 47 31 168345600 2000
5888532 Crysis B Feb. 3, 2014, 6:39 p.m. OK Delphi TESTS 47 46 4096000 2000
5882810 Oryshych B Feb. 3, 2014, 4:45 p.m. OK Delphi TESTS 47 62 3993600 2000
5881017 Frommi B Feb. 3, 2014, 4:28 p.m. OK Delphi TESTS 47 62 4096000 2000
5883863 IgorL B Feb. 3, 2014, 4:58 p.m. OK Delphi TESTS 47 109 1024000 2000
5910897 orzkbc B Feb. 6, 2014, 2:36 p.m. OK FPC TESTS 47 31 1024000 2000
5884811 Arthur B Feb. 3, 2014, 5:09 p.m. OK FPC TESTS 47 140 1126400 2000
5893112 zhzq123 B Feb. 4, 2014, 7:39 a.m. OK FPC TESTS 47 358 3993600 2000
5880739 SanSiroWaltz B Feb. 3, 2014, 4:26 p.m. OK FPC TESTS 47 390 1024000 2000
5896524 Fedosik B Feb. 4, 2014, 3:15 p.m. OK FPC TESTS 47 404 1024000 2000
10352008 xtrome B March 19, 2015, 5:48 p.m. OK FPC TESTS 47 436 1024000 2000
5880039 Alex_2oo8 B Feb. 3, 2014, 4:20 p.m. OK FPC TESTS 47 483 1024000 2000
27893333 vv_sswwww B June 19, 2017, 1:22 a.m. OK FPC TESTS 47 607 1024000 2000
27893319 vv_sswwww B June 19, 2017, 1:20 a.m. OK FPC TESTS 47 607 1024000 2000
5886293 xrz199721 B Feb. 3, 2014, 5:29 p.m. OK FPC TESTS 47 1044 100249600 2000
5909080 festivus B Feb. 6, 2014, 7:16 a.m. OK GNU C TESTS 47 15 0 2000
5909053 festivus B Feb. 6, 2014, 7:11 a.m. OK GNU C TESTS 47 15 102400 2000
7044366 vjudge5 B July 8, 2014, 3:23 a.m. OK GNU C TESTS 47 15 4096000 2000
5886467 stubbscroll B Feb. 3, 2014, 5:31 p.m. OK GNU C TESTS 47 30 1024000 2000
5901243 festivus B Feb. 5, 2014, 7:02 a.m. OK GNU C TESTS 47 78 5017600 2000
14774248 EKGMA B Dec. 12, 2015, 3:51 p.m. OK GNU C++ TESTS 47 15 0 2000
14773492 Kuzey B Dec. 12, 2015, 2:53 p.m. OK GNU C++ TESTS 47 15 0 2000
14034892 130705009 B Nov. 2, 2015, 10:56 p.m. OK GNU C++ TESTS 47 15 0 2000
11504827 chandak B June 9, 2015, 3:57 a.m. OK GNU C++ TESTS 47 15 0 2000
9288465 rperez B Dec. 28, 2014, 4:12 a.m. OK GNU C++ TESTS 47 15 0 2000
9220674 jhfjhfj1 B Dec. 22, 2014, 5:06 a.m. OK GNU C++ TESTS 47 15 0 2000
8706360 asma-hsp OOOO_ 0010 B Nov. 15, 2014, 7:23 p.m. OK GNU C++ TESTS 47 15 0 2000
6871324 xforceco B June 13, 2014, 6:21 a.m. OK GNU C++ TESTS 47 15 0 2000
5997128 vjudge4 B March 11, 2014, 2:59 p.m. OK GNU C++ TESTS 47 15 0 2000
5997103 mymelody B March 11, 2014, 2:56 p.m. OK GNU C++ TESTS 47 15 0 2000
5920576 MinakoKojima B March 4, 2014, 10:37 a.m. OK GNU C++0x TESTS 47 15 0 2000
5920164 MinakoKojima B March 4, 2014, 8:44 a.m. OK GNU C++0x TESTS 47 15 102400 2000
5907439 jsannemo B Feb. 5, 2014, 10:49 p.m. OK GNU C++0x TESTS 47 15 204800 2000
5888786 mukel B Feb. 3, 2014, 6:49 p.m. OK GNU C++0x TESTS 47 15 204800 2000
7514071 DemoVersion B Aug. 20, 2014, 7:49 a.m. OK GNU C++0x TESTS 47 15 614400 2000
7668817 gustav B Sept. 2, 2014, 3:54 p.m. OK GNU C++0x TESTS 47 15 1024000 2000
6546845 behzad.nouri B May 4, 2014, 11:17 p.m. OK GNU C++0x TESTS 47 15 1024000 2000
6149738 EarlOfDitches B March 26, 2014, 4:27 p.m. OK GNU C++0x TESTS 47 15 1024000 2000
5896091 yutaka1999 B Feb. 4, 2014, 2:19 p.m. OK GNU C++0x TESTS 47 15 1024000 2000
5888193 akaring B Feb. 3, 2014, 6:29 p.m. OK GNU C++0x TESTS 47 15 1024000 2000
22011081 cnjzxy B Nov. 3, 2016, 11:30 a.m. OK GNU C++11 TESTS 47 15 0 2000
15928296 SYury B Feb. 10, 2016, 11:52 a.m. OK GNU C++11 TESTS 47 15 0 2000
12921642 fantasyMoris B Sept. 10, 2015, 10:55 a.m. OK GNU C++11 TESTS 47 15 0 2000
27623362 RNS_CUS B June 7, 2017, 12:48 a.m. OK GNU C++11 TESTS 47 15 102400 2000
14924416 ntu_vjudge_2 B Dec. 22, 2015, 11:32 a.m. OK GNU C++11 TESTS 47 15 819200 2000
27525667 net_assassin B June 2, 2017, 2:20 p.m. OK GNU C++11 TESTS 47 15 1024000 2000
20294016 Yasola B Aug. 31, 2016, 4:48 a.m. OK GNU C++11 TESTS 47 15 1024000 2000
19057835 gohan95 B July 12, 2016, 8:16 p.m. OK GNU C++11 TESTS 47 15 1024000 2000
15751261 ko_osaga B Feb. 2, 2016, 1:43 p.m. OK GNU C++11 TESTS 47 15 1024000 2000
15416902 glasirius B Jan. 17, 2016, 4:39 p.m. OK GNU C++11 TESTS 47 15 1024000 2000
21863439 lnovak B Oct. 29, 2016, 4:40 a.m. OK GNU C++14 TESTS 47 15 0 2000
22161364 ANTIMIRAGE B Nov. 11, 2016, 11:03 a.m. OK GNU C++14 TESTS 47 15 204800 2000
27602422 orbitingflea B June 6, 2017, 12:43 a.m. OK GNU C++14 TESTS 47 15 1024000 2000
48081069 Heisenberg4269 B Jan. 8, 2019, 7:55 a.m. OK GNU C++14 TESTS 47 15 1740800 2000
28292912 Key_v2 B July 5, 2017, 3:05 a.m. OK GNU C++14 TESTS 47 15 1945600 2000
31163778 Shuvro77 B Oct. 9, 2017, 9:51 a.m. OK GNU C++14 TESTS 47 15 2048000 2000
33699163 tick B Dec. 28, 2017, 2:32 a.m. OK GNU C++14 TESTS 47 15 2150400 2000
28136749 reotsu B June 29, 2017, 10:09 a.m. OK GNU C++14 TESTS 47 15 2252800 2000
23405280 cmd B Dec. 29, 2016, 6:38 p.m. OK GNU C++14 TESTS 47 15 2252800 2000
29299259 polossk B Aug. 9, 2017, 6:24 a.m. OK GNU C++14 TESTS 47 15 2969600 2000
69252707 vjudge2 B Jan. 21, 2020, 2:44 p.m. OK GNU C++17 TESTS 47 30 0 2000
59494778 yan.silva B Aug. 25, 2019, 9:17 p.m. OK GNU C++17 TESTS 47 30 204800 2000
66270857 dmkozyrev B Dec. 4, 2019, 12:15 p.m. OK GNU C++17 TESTS 47 30 4300800 2000
50794246 robot-dreams B March 4, 2019, 5:29 p.m. OK GNU C++17 TESTS 47 31 0 2000
69993088 Jhulia.Graziella B Feb. 1, 2020, 8:11 p.m. OK GNU C++17 TESTS 47 31 0 2000
46643439 arbitrary_A B Dec. 5, 2018, 11 a.m. OK GNU C++17 TESTS 47 31 0 2000
65764985 dlp__302 B Nov. 26, 2019, 5:30 p.m. OK GNU C++17 TESTS 47 31 102400 2000
63642930 vjudge4 B Oct. 28, 2019, 8:42 a.m. OK GNU C++17 TESTS 47 31 102400 2000
50790163 lmiskiew B March 4, 2019, 3:19 p.m. OK GNU C++17 TESTS 47 31 204800 2000
50062385 Akikaze B Feb. 17, 2019, 1:15 p.m. OK GNU C++17 TESTS 47 31 204800 2000
5913419 meridional B Feb. 6, 2014, 10:22 p.m. OK Haskell TESTS 47 15 0 2000
6017710 erikr B March 15, 2014, 2:43 a.m. OK Haskell TESTS 47 15 1024000 2000
8511036 islam-al-aarag B Nov. 1, 2014, 11:16 a.m. OK Java 6 TESTS 47 93 0 2000
6016367 mashinist B March 14, 2014, 6:23 p.m. OK Java 6 TESTS 47 93 204800 2000
5886795 bohuss B Feb. 3, 2014, 5:34 p.m. OK Java 6 TESTS 47 93 204800 2000
6359962 xiaowuc1 B April 14, 2014, 8:53 p.m. OK Java 6 TESTS 47 93 716800 2000
5879724 shilov B Feb. 3, 2014, 4:18 p.m. OK Java 6 TESTS 47 124 204800 2000
6016232 GR1n B March 14, 2014, 5:55 p.m. OK Java 6 TESTS 47 733 204800 2000
5908600 0p9o8i B Feb. 6, 2014, 5:14 a.m. OK Java 7 TESTS 47 77 0 2000
5908575 1q2w3e4r B Feb. 6, 2014, 5:08 a.m. OK Java 7 TESTS 47 77 0 2000
5904982 DoublePointer B Feb. 5, 2014, 3:45 p.m. OK Java 7 TESTS 47 77 0 2000
5889028 uwi B Feb. 3, 2014, 7:04 p.m. OK Java 7 TESTS 47 77 0 2000
5888408 Sinner B Feb. 3, 2014, 6:34 p.m. OK Java 7 TESTS 47 77 0 2000
5887835 NaoMeir B Feb. 3, 2014, 5:44 p.m. OK Java 7 TESTS 47 77 0 2000
5876489 Egor B Feb. 3, 2014, 3:54 p.m. OK Java 7 TESTS 47 77 0 2000
5875868 Petr B Feb. 3, 2014, 3:50 p.m. OK Java 7 TESTS 47 77 0 2000
10177355 sweiss B March 6, 2015, 1:37 p.m. OK Java 7 TESTS 47 78 0 2000
5949117 Footman B March 6, 2014, 8:19 a.m. OK Java 7 TESTS 47 78 0 2000
66151379 NMouad21 B Dec. 1, 2019, 7:10 p.m. OK Java 8 TESTS 47 124 0 2000
12293955 hama-du B July 31, 2015, 4:06 p.m. OK Java 8 TESTS 47 124 0 2000
19180316 jeffrey.xiao B July 16, 2016, 9:52 p.m. OK Java 8 TESTS 47 140 0 2000
20888924 marcose18 B Sept. 24, 2016, 1:23 p.m. OK Java 8 TESTS 47 155 0 2000
18846024 MottoX B July 1, 2016, 8:30 p.m. OK Java 8 TESTS 47 155 5017600 2000
37824088 Musin B May 1, 2018, 7:07 p.m. OK Java 8 TESTS 47 155 20684800 2000
24914414 eomole B Feb. 23, 2017, 10:58 a.m. OK Java 8 TESTS 47 155 20889600 2000
18846032 MottoX B July 1, 2016, 8:32 p.m. OK Java 8 TESTS 47 170 5017600 2000
38609485 Golmol B May 25, 2018, 12:54 p.m. OK Java 8 TESTS 47 187 0 2000
8885020 AlexFetisov B Nov. 29, 2014, 4:56 a.m. OK Java 8 TESTS 47 202 0 2000
28598171 isgulkov B July 16, 2017, 2:21 p.m. OK Mono C# TESTS 47 46 11878400 2000
11905035 ilyoan B July 3, 2015, 3:13 a.m. OK Mono C# TESTS 47 77 4198400 2000
11967091 ilyoan B July 8, 2015, 4:32 a.m. OK Mono C# TESTS 47 77 4300800 2000
23662526 camypaper B Jan. 9, 2017, 8:26 a.m. OK MS C# TESTS 47 171 12288000 2000
5882887 EmK B Feb. 3, 2014, 4:46 p.m. OK MS C# TESTS 47 1387 3686400 2000
5918813 best-effort B March 4, 2014, 1:40 a.m. OK MS C++ TESTS 47 15 0 2000
5887224 RestlessAnchoret B Feb. 3, 2014, 5:39 p.m. OK MS C++ TESTS 47 15 0 2000
5892909 a654889339 B Feb. 4, 2014, 6:54 a.m. OK MS C++ TESTS 47 15 0 2000
5886357 Taube B Feb. 3, 2014, 5:29 p.m. OK MS C++ TESTS 47 15 921600 2000
5905946 YQCMMD B Feb. 5, 2014, 5:56 p.m. OK MS C++ TESTS 47 15 1126400 2000
5888821 mirsaid_mir B Feb. 3, 2014, 6:51 p.m. OK MS C++ TESTS 47 15 1331200 2000
5893577 M.Mahdi B Feb. 4, 2014, 8:57 a.m. OK MS C++ TESTS 47 15 3993600 2000
11140376 polequoll B May 19, 2015, 4:37 a.m. OK MS C++ TESTS 47 15 4096000 2000
5915022 acrux B Feb. 7, 2014, 7:48 a.m. OK MS C++ TESTS 47 30 0 2000
5915977 PAP B Feb. 7, 2014, 10:28 a.m. OK MS C++ TESTS 47 30 102400 2000
10511829 andrey.starodubtsev B March 29, 2015, 6:45 a.m. OK Perl TESTS 47 109 2969600 2000
69274446 breno B Jan. 22, 2020, 12:37 a.m. OK PyPy 3 TESTS 47 155 1331200 2000
69253104 vjudge4 B Jan. 21, 2020, 2:51 p.m. OK PyPy 3 TESTS 47 155 1433600 2000
6484863 nwi B April 27, 2014, 2:54 p.m. OK Python 2 TESTS 47 46 102400 2000
23137639 peterpan B Dec. 19, 2016, 11:58 a.m. OK Python 2 TESTS 47 46 4710400 2000
7044071 vjudge1 B July 8, 2014, 2:24 a.m. OK Python 2 TESTS 47 61 102400 2000
5958517 yugle7 B March 7, 2014, 5:28 p.m. OK Python 2 TESTS 47 61 716800 2000
8807775 nab B Nov. 23, 2014, 12:46 a.m. OK Python 2 TESTS 47 62 0 2000
6361757 zhanrnl B April 15, 2014, 2:33 a.m. OK Python 2 TESTS 47 62 1740800 2000
5902046 bigoceanlhy B Feb. 5, 2014, 8:51 a.m. OK Python 2 TESTS 47 62 3481600 2000
27791633 ftuknights B June 15, 2017, 10:47 a.m. OK Python 2 TESTS 47 62 3993600 2000
23137831 peterpan B Dec. 19, 2016, 12:07 p.m. OK Python 2 TESTS 47 62 4915200 2000
15915210 not_bot_but_POT B Feb. 9, 2016, 2:02 p.m. OK Python 2 TESTS 47 77 0 2000
5958507 yugle7 B March 7, 2014, 5:26 p.m. OK Python 3 TESTS 47 77 614400 2000
5896614 arechitsky B Feb. 4, 2014, 3:30 p.m. OK Python 3 TESTS 47 109 921600 2000
42125404 Mk_Python_v1 B Aug. 26, 2018, 2:51 p.m. OK Python 3 TESTS 47 139 102400 2000
43542861 ItsLastDay B Sept. 28, 2018, 5:53 p.m. OK Python 3 TESTS 47 187 9113600 2000

remove filters

Back to search problems