Codeforces Round 230 (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
392 Codeforces Round 230 (Div. 1) FINISHED False 7200 344969997 Feb. 18, 2014, 1 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 959 ) B Tower of Hanoi PROGRAMMING dp

B"The Tower of Hanoi is a well-known mathematical puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape. The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules: With three disks, the puzzle can be solved in seven moves. The minimum number of moves required to solve a Tower of Hanoi puzzle is 2n xe2 x80 x89- xe2 x80 x891, where n is the number of disks. (c) Wikipedia. SmallY's puzzle is very similar to the famous Tower of Hanoi. In the Tower of Hanoi puzzle you need to solve a puzzle in minimum number of moves, in SmallY's puzzle each move costs some money and you need to solve the same puzzle but for minimal cost. At the beginning of SmallY's puzzle all n disks are on the first rod. Moving a disk from rod i to rod j (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i, xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893) costs tij units of money. The goal of the puzzle is to move all the disks to the third rod. In the problem you are given matrix t and an integer n. You need to count the minimal cost of solving SmallY's puzzle, consisting of n disks. Each of the first three lines contains three integers -- matrix t. The j-th integer in the i-th line is tij (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89tij xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910000; i xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89j). The following line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8940) -- the number of disks. It is guaranteed that for all i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893), tii xe2 x80 x89= xe2 x80 x890. Print a single integer -- the minimum cost of solving SmallY's puzzle."...

Tutorials

83942

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57715953 eric161324 B July 25, 2019, 2:42 a.m. OK Clang++17 Diagnostics TESTS 60 46 0
6011113 Nik_Storm_2010 B March 13, 2014, 5:12 p.m. OK Delphi TESTS 60 31 102400
6001803 SanSiroWaltz B March 12, 2014, 9:21 a.m. OK FPC TESTS 60 15 0
6909951 vietdoan B June 19, 2014, 3:35 a.m. OK FPC TESTS 60 15 102400
5926139 ZeRoGerc B March 4, 2014, 7:05 p.m. OK FPC TESTS 60 15 102400
5924892 Alex_2oo8 B March 4, 2014, 3:26 p.m. OK FPC TESTS 60 15 102400
38915803 chaorenhaha B June 3, 2018, 9:05 a.m. OK FPC TESTS 60 30 3072000
11256908 Felix_Mate B May 24, 2015, 5:06 p.m. OK FPC TESTS 60 31 0
6909879 vietdoan B June 19, 2014, 3:15 a.m. OK FPC TESTS 60 31 102400
38915823 chaorenhaha B June 3, 2018, 9:05 a.m. OK FPC TESTS 60 31 3072000
12701599 shyamelc B Aug. 25, 2015, 10:14 p.m. OK GNU C TESTS 60 15 0
10743931 bnuvjudge2 B April 16, 2015, 5:12 p.m. OK GNU C TESTS 60 15 0
6712391 ivanilos B May 25, 2014, 11:18 p.m. OK GNU C TESTS 60 15 0
6158813 pwh620 B March 27, 2014, 6:16 a.m. OK GNU C TESTS 60 30 0
30048200 vjudge4 B Sept. 4, 2017, 6:59 a.m. OK GNU C++ TESTS 60 15 0
21888809 vjudge1 B Oct. 30, 2016, 8:26 a.m. OK GNU C++ TESTS 60 15 0
21864319 vjudge2 B Oct. 29, 2016, 5:45 a.m. OK GNU C++ TESTS 60 15 0
21864289 -Sali- B Oct. 29, 2016, 5:44 a.m. OK GNU C++ TESTS 60 15 0
19561012 Yash_ B Aug. 1, 2016, 12:58 p.m. OK GNU C++ TESTS 60 15 0
19431101 Steven_Chen B July 27, 2016, 12:37 a.m. OK GNU C++ TESTS 60 15 0
19381866 Ajatar B July 24, 2016, 10:30 a.m. OK GNU C++ TESTS 60 15 0
19381859 Ajatar B July 24, 2016, 10:29 a.m. OK GNU C++ TESTS 60 15 0
19267428 vjudge5 B July 20, 2016, 3:01 a.m. OK GNU C++ TESTS 60 15 0
19267356 vjudge2 B July 20, 2016, 2:57 a.m. OK GNU C++ TESTS 60 15 0
10062810 Dirak B Feb. 28, 2015, 10:50 a.m. OK GNU C++0x TESTS 60 15 0
9503088 Jin_Haonan B Jan. 22, 2015, 2:30 p.m. OK GNU C++0x TESTS 60 15 0
9222456 Kei.One B Dec. 22, 2014, 10:37 a.m. OK GNU C++0x TESTS 60 15 0
8929575 kriii B Dec. 2, 2014, 9:04 a.m. OK GNU C++0x TESTS 60 15 0
8926195 samiemad B Dec. 2, 2014, 12:57 a.m. OK GNU C++0x TESTS 60 15 0
7044321 Amor727 B July 8, 2014, 3:15 a.m. OK GNU C++0x TESTS 60 15 0
6579220 zerokugi B May 9, 2014, 6:18 p.m. OK GNU C++0x TESTS 60 15 0
6534984 miskcoo B May 3, 2014, 2:21 a.m. OK GNU C++0x TESTS 60 15 0
6163509 Lightless B March 27, 2014, 6:47 p.m. OK GNU C++0x TESTS 60 15 0
6158355 danielfleischman B March 27, 2014, 3:46 a.m. OK GNU C++0x TESTS 60 15 0
31169740 j31234 B Oct. 9, 2017, 2:16 p.m. OK GNU C++11 TESTS 60 15 0
27351294 zscc B May 26, 2017, 8:08 a.m. OK GNU C++11 TESTS 60 15 0
22166575 vjudge4 B Nov. 11, 2016, 5 p.m. OK GNU C++11 TESTS 60 15 0
21746132 vjudge3 B Oct. 24, 2016, 1:59 p.m. OK GNU C++11 TESTS 60 15 0
20562536 jjjjjjjjjjj B Sept. 13, 2016, 8:23 a.m. OK GNU C++11 TESTS 60 15 0
18733313 joisino B June 26, 2016, 10:55 a.m. OK GNU C++11 TESTS 60 15 0
18533872 akaru B June 17, 2016, 1:19 a.m. OK GNU C++11 TESTS 60 15 0
16560968 PouriaId B March 7, 2016, 6:23 a.m. OK GNU C++11 TESTS 60 15 0
16375015 batyrkhan14 B Feb. 27, 2016, 7:40 a.m. OK GNU C++11 TESTS 60 15 0
16374788 Algiz B Feb. 27, 2016, 7:31 a.m. OK GNU C++11 TESTS 60 15 0
50251383 GiovaGa B Feb. 20, 2019, 5:26 p.m. OK GNU C++14 TESTS 60 15 0
31965506 MegaOwIer B Nov. 2, 2017, 12:51 a.m. OK GNU C++14 TESTS 60 15 0
30934288 Boyou B Oct. 2, 2017, 6 a.m. OK GNU C++14 TESTS 60 15 0
30775209 SJ_1397 B Sept. 27, 2017, 11:28 a.m. OK GNU C++14 TESTS 60 15 0
30366430 suibaka B Sept. 15, 2017, 3:28 p.m. OK GNU C++14 TESTS 60 15 0
30227288 Big_black_jujube B Sept. 9, 2017, 1:54 p.m. OK GNU C++14 TESTS 60 15 0
27662948 LiChenKoh B June 8, 2017, 4:30 a.m. OK GNU C++14 TESTS 60 15 0
27605232 Lucas97 B June 6, 2017, 4:56 a.m. OK GNU C++14 TESTS 60 15 0
27599902 itu B June 5, 2017, 7:55 p.m. OK GNU C++14 TESTS 60 15 0
27191892 zhengsai B May 18, 2017, 7:20 a.m. OK GNU C++14 TESTS 60 15 0
42838423 loyolman B Sept. 13, 2018, 5:04 p.m. OK GNU C++17 TESTS 60 30 0
38982040 chielo B June 6, 2018, 2:44 a.m. OK GNU C++17 TESTS 60 30 0
49665329 vjudge2 B Feb. 9, 2019, 2:11 p.m. OK GNU C++17 TESTS 60 30 307200
44961360 asady529 B Oct. 27, 2018, 4:40 p.m. OK GNU C++17 TESTS 60 30 307200
71066716 PDAnik B Feb. 14, 2020, 2:45 p.m. OK GNU C++17 TESTS 60 31 0
71055410 REdwan99 B Feb. 14, 2020, 11:32 a.m. OK GNU C++17 TESTS 60 31 0
70809642 manavspg2 B Feb. 11, 2020, 7:50 p.m. OK GNU C++17 TESTS 60 31 0
69481213 vmik7 B Jan. 24, 2020, 5:49 p.m. OK GNU C++17 TESTS 60 31 0
68374386 Sidratul_Muntaha B Jan. 7, 2020, 7:05 p.m. OK GNU C++17 TESTS 60 31 0
68010721 AbidAsh B Dec. 31, 2019, 3:37 p.m. OK GNU C++17 TESTS 60 31 0
69714868 WangJialei B Jan. 29, 2020, 8:38 a.m. OK Go TESTS 60 31 0
5954323 erikr B March 7, 2014, 1:20 a.m. OK Haskell TESTS 60 31 0
5926621 mkirsche B March 4, 2014, 8:41 p.m. OK Java 6 TESTS 60 62 0
5948140 Mikhos B March 6, 2014, 5:11 a.m. OK Java 6 TESTS 60 77 0
9813501 vjudge5 B Feb. 13, 2015, 5:51 a.m. OK Java 6 TESTS 60 93 0
6165895 qingwen B March 28, 2014, 10:04 a.m. OK Java 7 TESTS 60 62 0
12701478 kuldeeppatel B Aug. 25, 2015, 9:50 p.m. OK Java 7 TESTS 60 77 0
9136304 Lewin B Dec. 15, 2014, 3:53 a.m. OK Java 7 TESTS 60 77 0
6836844 0p9o8i B June 8, 2014, 12:21 p.m. OK Java 7 TESTS 60 77 0
6193715 vjudge4 B March 30, 2014, 10:06 p.m. OK Java 7 TESTS 60 77 0
5924956 edorundo B March 4, 2014, 3:36 p.m. OK Java 7 TESTS 60 77 0
11728537 BadDuck B June 23, 2015, 9:23 p.m. OK Java 7 TESTS 60 92 0
12701587 HMK B Aug. 25, 2015, 10:12 p.m. OK Java 7 TESTS 60 93 0
5944923 jakabfia B March 5, 2014, 6:24 p.m. OK Java 7 TESTS 60 93 0
17529098 bancsy B April 26, 2016, 10:45 p.m. OK Java 7 TESTS 60 124 39424000
10260319 Pimpom B March 13, 2015, 4:31 p.m. OK Java 8 TESTS 60 124 0
16270369 Aleks B Feb. 22, 2016, 3:11 a.m. OK Java 8 TESTS 60 140 0
12701486 Code.coding B Aug. 25, 2015, 9:52 p.m. OK Java 8 TESTS 60 155 0
10198809 AStepanov B March 7, 2015, 10:40 p.m. OK Java 8 TESTS 60 202 0
16319948 poopi B Feb. 25, 2016, 4:48 a.m. OK MS C++ TESTS 60 15 0
11200095 polequoll B May 22, 2015, 10:29 a.m. OK MS C++ TESTS 60 15 0
9063137 Filyan B Dec. 9, 2014, 8:21 p.m. OK MS C++ TESTS 60 15 0
7300628 vjudge1 B July 31, 2014, 3:04 p.m. OK MS C++ TESTS 60 15 0
6199872 AleksanderBalobanov B March 31, 2014, 5:54 p.m. OK MS C++ TESTS 60 15 0
5996394 vjudge5 B March 11, 2014, 1:21 p.m. OK MS C++ TESTS 60 15 0
5930276 _TMB_ B March 5, 2014, 10:02 a.m. OK MS C++ TESTS 60 15 0
5927470 Death_Knight_DK B March 5, 2014, 1:09 a.m. OK MS C++ TESTS 60 15 0
5924850 M.Mahdi B March 4, 2014, 3:20 p.m. OK MS C++ TESTS 60 15 0
8612639 shaonianguai B Nov. 8, 2014, 8:47 a.m. OK MS C++ TESTS 60 30 102400
45208343 wangkan2001 B Nov. 2, 2018, 1:54 p.m. OK PyPy 2 TESTS 60 155 0
47374981 H4Wk3ye B Dec. 22, 2018, 4:39 p.m. OK PyPy 3 TESTS 60 140 0
67657789 Georgy.B B Dec. 26, 2019, 2:33 p.m. OK PyPy 3 TESTS 60 155 0
6030045 Martial B March 16, 2014, 2:44 p.m. OK Python 2 TESTS 60 46 0
6484903 nwi B April 27, 2014, 2:59 p.m. OK Python 2 TESTS 60 62 0
5928746 mzhang B March 5, 2014, 5:46 a.m. OK Python 2 TESTS 60 93 1638400
68231912 Golla_Nikhitha B Jan. 5, 2020, 9:31 a.m. OK Python 2 TESTS 60 187 102400
6101552 instrnts B March 22, 2014, 2:05 a.m. OK Python 3 TESTS 60 78 512000
25358275 cympfh B March 9, 2017, 11:26 a.m. OK Rust TESTS 60 15 1536000

remove filters

Back to search problems