Codeforces Beta Round 33 (Codeforces format)

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
33 Codeforces Beta Round 33 (Codeforces format) FINISHED False 7200 451666793 Oct. 7, 2010, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4710 ) B String Problem PROGRAMMING shortest paths #v#hard way#changing a string 1800

B"Boy Valera likes strings. And even more he likes them, when they are identical. That's why in his spare time Valera plays the following game. He takes any two strings, consisting of lower case Latin letters, and tries to make them identical. According to the game rules, with each move Valera can change one arbitrary character Ai in one of the strings into arbitrary character Bi, but he has to pay for every move a particular sum of money, equal to Wi. He is allowed to make as many moves as he needs. Since Valera is a very economical boy and never wastes his money, he asked you, an experienced programmer, to help him answer the question: what minimum amount of money should Valera have to get identical strings. The first input line contains two initial non-empty strings s and t, consisting of lower case Latin letters. The length of each string doesn't exceed 105. The following line contains integer n (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89500) -- amount of possible changings. Then follow n lines, each containing characters Ai and Bi (lower case Latin letters) and integer Wi (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89Wi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100), saying that it's allowed to change character Ai into character Bi in any of the strings and spend sum of money Wi. If the answer exists, output the answer to the problem, and the resulting string. Otherwise output -1 in the only line. If the answer is not unique, output any."...

Tutorials

Codeforces Beta Round #33 (personal participation commentaries)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55275846 rr_ B June 7, 2019, 6:59 p.m. OK D TESTS 61 92 11776000 1800
2984293 gohard B Jan. 22, 2013, 3 p.m. OK Delphi TESTS 61 46 409600 1800
141602 tourist B Oct. 7, 2010, 3:06 p.m. OK Delphi TESTS 61 60 1228800 1800
2473111 Misha100896 B Oct. 31, 2012, 7:14 a.m. OK Delphi TESTS 61 62 409600 1800
3227178 Mosyagin B March 1, 2013, 8:09 p.m. OK Delphi TESTS 61 62 409600 1800
2511960 gohard B Nov. 5, 2012, 4:35 p.m. OK Delphi TESTS 61 78 409600 1800
142437 sankear B Oct. 7, 2010, 3:28 p.m. OK Delphi TESTS 61 80 1331200 1800
146080 ruban B Oct. 8, 2010, 11:01 a.m. OK Delphi TESTS 61 80 1945600 1800
146844 Spoorock B Oct. 10, 2010, 3:17 p.m. OK Delphi TESTS 61 90 1331200 1800
143078 masha B Oct. 7, 2010, 3:46 p.m. OK Delphi TESTS 61 90 1331200 1800
242552 valikluks1995 B Jan. 8, 2011, 11:41 p.m. OK Delphi TESTS 61 90 1433600 1800
368612 Mark_tven B April 1, 2011, 8:11 a.m. OK FPC TESTS 61 30 1331200 1800
935610 Surogatov_S B Dec. 8, 2011, 1:11 p.m. OK FPC TESTS 61 50 1331200 1800
792719 nlbao B Oct. 24, 2011, 4:03 a.m. OK FPC TESTS 61 50 1331200 1800
792714 nlbao B Oct. 24, 2011, 3:57 a.m. OK FPC TESTS 61 50 1331200 1800
792654 siuvit B Oct. 24, 2011, 2:59 a.m. OK FPC TESTS 61 50 1331200 1800
837518 Nik_Storm_2010 B Nov. 6, 2011, 7:25 a.m. OK FPC TESTS 61 50 1433600 1800
706109 thanhsonzorro B Oct. 7, 2010, 4:22 p.m. OK FPC TESTS 61 50 1536000 1800
705944 MazterQuang B Sept. 17, 2011, 4:45 a.m. OK FPC TESTS 61 50 1638400 1800
792915 nhcuong95 B Oct. 24, 2011, 7:01 a.m. OK FPC TESTS 61 50 2560000 1800
792910 sgtrouge B Oct. 24, 2011, 6:58 a.m. OK FPC TESTS 61 50 2560000 1800
4208931 rootial B July 31, 2013, 11:26 a.m. OK GNU C TESTS 61 30 204800 1800
4208906 vjudge2 B July 31, 2013, 11:19 a.m. OK GNU C TESTS 61 30 204800 1800
4208901 rootial B July 31, 2013, 11:18 a.m. OK GNU C TESTS 61 30 204800 1800
4207499 vjudge2 B July 31, 2013, 6:31 a.m. OK GNU C TESTS 61 30 204800 1800
3080322 binom B Feb. 7, 2013, 10:25 a.m. OK GNU C TESTS 61 31 307200 1800
683869 kawatea B Sept. 8, 2011, 10:02 p.m. OK GNU C TESTS 61 50 1536000 1800
147558 madxmad B Dec. 1, 2010, 7:05 p.m. OK GNU C TESTS 61 50 1536000 1800
512510 scottai1 B June 28, 2011, 4 a.m. OK GNU C TESTS 61 50 2048000 1800
144694 plokzfadai B Oct. 7, 2010, 4:48 p.m. OK GNU C TESTS 61 50 2048000 1800
142046 LayCurse B Oct. 7, 2010, 3:16 p.m. OK GNU C TESTS 61 50 2355200 1800
3819229 ftiasch B June 3, 2013, 3:58 p.m. OK GNU C++ TESTS 61 15 204800 1800
2805380 coderz B Dec. 22, 2012, 5:12 a.m. OK GNU C++ TESTS 61 15 307200 1800
3937661 vjudge1 B June 23, 2013, 5:59 a.m. OK GNU C++ TESTS 61 15 307200 1800
3175342 yenthanh.t7 B Feb. 23, 2013, 8:19 a.m. OK GNU C++ TESTS 61 15 307200 1800
3141676 stevenkplus B Feb. 17, 2013, 7:41 p.m. OK GNU C++ TESTS 61 15 307200 1800
2981611 Poseidon B Jan. 22, 2013, 12:15 a.m. OK GNU C++ TESTS 61 15 307200 1800
4109392 mnorouzi B July 20, 2013, 3:06 a.m. OK GNU C++ TESTS 61 15 512000 1800
2862371 H3X B Jan. 1, 2013, 12:17 a.m. OK GNU C++ TESTS 61 15 614400 1800
6166921 vjudge1 B March 28, 2014, 12:53 p.m. OK GNU C++ TESTS 61 30 204800 1800
5565817 michael153 B Dec. 30, 2013, 2:38 a.m. OK GNU C++ TESTS 61 30 204800 1800
8556834 aliasadiiii B Nov. 5, 2014, 10:52 a.m. OK GNU C++0x TESTS 61 30 512000 1800
4485062 lemur B Sept. 16, 2013, 7:06 p.m. OK GNU C++0x TESTS 61 30 512000 1800
487250 Archon.JK B June 14, 2011, 7:35 a.m. OK GNU C++0x TESTS 61 30 1536000 1800
547879 ZiyaoWei B July 15, 2011, 7:02 p.m. OK GNU C++0x TESTS 61 60 1740800 1800
1257372 vad13 B March 2, 2012, 2:53 p.m. OK GNU C++0x TESTS 61 60 1945600 1800
7098561 wx2486 B July 14, 2014, 8:30 a.m. OK GNU C++0x TESTS 61 62 409600 1800
5835652 marat.snowbear B Jan. 30, 2014, 2:09 a.m. OK GNU C++0x TESTS 61 62 409600 1800
4450227 tomb_raider B Sept. 13, 2013, 3:40 a.m. OK GNU C++0x TESTS 61 62 512000 1800
4450224 tomb_raider B Sept. 13, 2013, 3:39 a.m. OK GNU C++0x TESTS 61 62 512000 1800
8044831 hakobyan.tigran B Oct. 1, 2014, 9:02 a.m. OK GNU C++0x TESTS 61 62 614400 1800
14974868 oxx1108 B Dec. 24, 2015, 2:57 p.m. OK GNU C++11 TESTS 61 30 0 1800
14465427 munaiyi B Nov. 25, 2015, 8:33 a.m. OK GNU C++11 TESTS 61 30 0 1800
21238887 echo_an B Oct. 6, 2016, 3:19 p.m. OK GNU C++11 TESTS 61 30 204800 1800
14676941 froghramar B Dec. 6, 2015, 2:38 p.m. OK GNU C++11 TESTS 61 30 409600 1800
27671845 artur.socha B June 8, 2017, 1:03 p.m. OK GNU C++11 TESTS 61 30 614400 1800
16484996 gepardo B March 3, 2016, 3:29 p.m. OK GNU C++11 TESTS 61 30 614400 1800
15679280 sudharsansai B Jan. 30, 2016, 1:45 p.m. OK GNU C++11 TESTS 61 30 614400 1800
15288768 m.Sina B Jan. 11, 2016, 2:26 p.m. OK GNU C++11 TESTS 61 30 614400 1800
23196309 y_shindoh B Dec. 21, 2016, 10:19 a.m. OK GNU C++11 TESTS 61 30 2048000 1800
31470736 The-Legend B Oct. 18, 2017, 6:41 a.m. OK GNU C++11 TESTS 61 30 2252800 1800
32573194 charlieyan B Nov. 23, 2017, 11:17 a.m. OK GNU C++14 TESTS 61 30 307200 1800
20567839 Silver_ B Sept. 13, 2016, 12:56 p.m. OK GNU C++14 TESTS 61 30 512000 1800
29617909 Kaneki_04 B Aug. 20, 2017, 10:04 a.m. OK GNU C++14 TESTS 61 30 716800 1800
27345136 RedStone B May 25, 2017, 8:59 p.m. OK GNU C++14 TESTS 61 30 716800 1800
28477945 DATVN B July 12, 2017, 3:17 p.m. OK GNU C++14 TESTS 61 30 2355200 1800
34258323 Paradosk B Jan. 17, 2018, 5:27 p.m. OK GNU C++14 TESTS 61 30 2457600 1800
34965488 ashishj123 B Feb. 6, 2018, 8:57 a.m. OK GNU C++14 TESTS 61 30 2560000 1800
29187545 vjudge1 B Aug. 4, 2017, 7:51 a.m. OK GNU C++14 TESTS 61 30 2560000 1800
29187506 vjudge5 B Aug. 4, 2017, 7:48 a.m. OK GNU C++14 TESTS 61 30 2560000 1800
28397427 P0LyFish B July 10, 2017, 3:33 a.m. OK GNU C++14 TESTS 61 30 2560000 1800
59236707 Anmol321 B Aug. 21, 2019, 5:43 p.m. OK GNU C++17 TESTS 61 60 614400 1800
43669776 luogu_bot5 B Oct. 2, 2018, 3:36 a.m. OK GNU C++17 TESTS 61 62 204800 1800
59687747 pkgunboat B Aug. 30, 2019, 3:13 a.m. OK GNU C++17 TESTS 61 62 204800 1800
55329820 vjudge1 B June 9, 2019, 10:17 a.m. OK GNU C++17 TESTS 61 62 204800 1800
55321814 cyh1213 B June 9, 2019, 5:19 a.m. OK GNU C++17 TESTS 61 62 204800 1800
50053317 tnakao B Feb. 17, 2019, 9:04 a.m. OK GNU C++17 TESTS 61 62 204800 1800
43670138 luogu_bot1 B Oct. 2, 2018, 3:54 a.m. OK GNU C++17 TESTS 61 62 204800 1800
69946877 vjudge2 B Feb. 1, 2020, 7:50 a.m. OK GNU C++17 TESTS 61 62 307200 1800
69881386 1W_W1 B Jan. 31, 2020, 6:29 a.m. OK GNU C++17 TESTS 61 62 307200 1800
69881050 1W_W1 B Jan. 31, 2020, 6:21 a.m. OK GNU C++17 TESTS 61 62 307200 1800
147204 KTR B Oct. 16, 2010, 3:02 a.m. OK Haskell TESTS 61 110 11571200 1800
147203 KTR B Oct. 16, 2010, 2:59 a.m. OK Haskell TESTS 61 110 11571200 1800
145644 route150 B Oct. 8, 2010, 1:55 a.m. OK Haskell TESTS 61 160 10547200 1800
145639 route150 B Oct. 8, 2010, 1:52 a.m. OK Haskell TESTS 61 170 10547200 1800
145025 anhdt B Oct. 7, 2010, 5:04 p.m. OK Java 6 TESTS 61 90 43417600 1800
3357645 coder245 B March 19, 2013, 3:25 p.m. OK Java 6 TESTS 61 109 204800 1800
142202 mastersobg B Oct. 7, 2010, 3:21 p.m. OK Java 6 TESTS 61 110 43315200 1800
141933 winger B Oct. 7, 2010, 3:13 p.m. OK Java 6 TESTS 61 110 43417600 1800
145427 ivanromanov B Oct. 7, 2010, 7:47 p.m. OK Java 6 TESTS 61 110 43520000 1800
2256041 ksh78 B Sept. 27, 2012, 1:46 p.m. OK Java 6 TESTS 61 125 204800 1800
2770536 AbdelrahmanAsal B Dec. 15, 2012, 3:05 p.m. OK Java 6 TESTS 61 125 307200 1800
142309 SpookyCookie B Oct. 7, 2010, 3:24 p.m. OK Java 6 TESTS 61 130 43315200 1800
146214 Ahmed_Salama B Oct. 8, 2010, 1:20 p.m. OK Java 6 TESTS 61 130 43417600 1800
146204 juver B Oct. 8, 2010, 1:15 p.m. OK Java 6 TESTS 61 130 43417600 1800
2960003 alexyz B Jan. 19, 2013, 2:30 p.m. OK Java 7 TESTS 61 93 204800 1800
7495141 DL.Meteor B Aug. 17, 2014, 6:50 p.m. OK Java 7 TESTS 61 186 0 1800
5489909 Zyflair B Dec. 22, 2013, 2:49 a.m. OK Java 7 TESTS 61 186 102400 1800
9864456 myduomilia B Feb. 15, 2015, 9:12 p.m. OK Java 7 TESTS 61 216 0 1800
8331059 Javanochka B Oct. 20, 2014, 1:24 p.m. OK Java 7 TESTS 61 216 102400 1800
4656377 Arsenal911 B Oct. 4, 2013, 11:32 a.m. OK Java 7 TESTS 61 218 204800 1800
5629158 cupcup B Jan. 6, 2014, 7:28 p.m. OK Java 7 TESTS 61 248 204800 1800
14353057 kws4679 B Nov. 20, 2015, 1:48 a.m. OK Java 7 TESTS 61 278 0 1800
16867645 MazzForces B March 22, 2016, 9:29 a.m. OK Java 7 TESTS 61 278 49049600 1800
8331323 manoprenko B Oct. 20, 2014, 1:43 p.m. OK Java 7 TESTS 61 466 102400 1800
53013296 hongquanntct B April 19, 2019, 1:03 p.m. OK Java 8 TESTS 61 248 0 1800
51365542 wanderer163 B March 16, 2019, 9:24 a.m. OK Java 8 TESTS 61 248 0 1800
47028338 KulikAlex B Dec. 15, 2018, 8:19 a.m. OK Java 8 TESTS 61 248 0 1800
11392997 tomdmitriev B June 2, 2015, 5:01 p.m. OK Java 8 TESTS 61 248 0 1800
10027913 biltharesatyendra B Feb. 26, 2015, 4:47 a.m. OK Java 8 TESTS 61 278 0 1800
31187436 di_halt B Oct. 10, 2017, 11:01 a.m. OK Java 8 TESTS 61 280 0 1800
10023037 alibaba B Feb. 25, 2015, 5:05 p.m. OK Java 8 TESTS 61 280 0 1800
26503769 pitfall B April 19, 2017, 8:17 p.m. OK Java 8 TESTS 61 280 20582400 1800
38203186 Minaa B May 14, 2018, 1:08 a.m. OK Java 8 TESTS 61 280 20787200 1800
17430164 mkirsche B April 22, 2016, 5:18 a.m. OK Java 8 TESTS 61 280 20889600 1800
45255868 nordiccat B Nov. 3, 2018, 7:44 p.m. OK Kotlin TESTS 61 404 614400 1800
56029513 bohuss B June 25, 2019, 8:45 a.m. OK Kotlin TESTS 61 842 614400 1800
145540 m.zandy B Oct. 7, 2010, 11:06 p.m. OK Mono C# TESTS 61 140 7680000 1800
145594 tanzaku B Oct. 8, 2010, 12:41 a.m. OK Mono C# TESTS 61 160 7680000 1800
142148 Hadi_Asiaie B Oct. 7, 2010, 3:19 p.m. OK Mono C# TESTS 61 170 7680000 1800
146273 mfkhr B Oct. 8, 2010, 2:41 p.m. OK Mono C# TESTS 61 200 8396800 1800
145533 m.zandy B Oct. 7, 2010, 10:30 p.m. OK Mono C# TESTS 61 220 7884800 1800
146141 x3mka B Oct. 8, 2010, 12:12 p.m. OK Mono C# TESTS 61 250 8499200 1800
146917 amit5148 B Oct. 11, 2010, 4:14 a.m. OK Mono C# TESTS 61 440 7680000 1800
25896935 fr0st B March 29, 2017, 1:38 p.m. OK MS C# TESTS 61 156 10342400 1800
3937672 vjudge3 B June 23, 2013, 6:03 a.m. OK MS C++ TESTS 61 15 204800 1800
3938078 kkcld B June 23, 2013, 8:24 a.m. OK MS C++ TESTS 61 15 204800 1800
3938079 vjudge4 B June 23, 2013, 8:25 a.m. OK MS C++ TESTS 61 15 204800 1800
2800310 YX201314 B Dec. 21, 2012, 5:45 a.m. OK MS C++ TESTS 61 15 614400 1800
5095997 serglag B Nov. 14, 2013, 9:58 a.m. OK MS C++ TESTS 61 30 307200 1800
6925170 pacu B June 19, 2014, 10:15 p.m. OK MS C++ TESTS 61 30 409600 1800
146525 Vacwei B Oct. 9, 2010, 3:35 a.m. OK MS C++ TESTS 61 30 1536000 1800
146002 andrey-tsb B Oct. 8, 2010, 9:28 a.m. OK MS C++ TESTS 61 30 1536000 1800
145899 Sasuke B Oct. 8, 2010, 7:23 a.m. OK MS C++ TESTS 61 30 1536000 1800
147131 t__nt B Oct. 14, 2010, 11:12 a.m. OK MS C++ TESTS 61 30 1536000 1800
69457465 vjudge3 B Jan. 24, 2020, 9:14 a.m. OK MS C++ 2017 TESTS 61 92 307200 1800
146417 cmd B Oct. 8, 2010, 6:58 p.m. OK PHP TESTS 61 280 6553600 1800
11577813 poikniok B June 14, 2015, 6:54 a.m. OK PyPy 3 TESTS 61 498 11980800 1800
144464 hirosegolf B Oct. 7, 2010, 4:38 p.m. OK Python 2 TESTS 61 200 9011200 1800
14694491 someday1235 B Dec. 8, 2015, 6:59 a.m. OK Python 2 TESTS 61 372 2048000 1800
574834 sevenkplus B Aug. 1, 2011, 12:37 p.m. OK Python 2 TESTS 61 1060 3276800 1800
506922 DDDDDDDDDDDDDDDDDDDDDDDD B June 21, 2011, 6:06 p.m. OK Python 2 TESTS 61 1140 7884800 1800
6167356 vjudge5 B March 28, 2014, 1:53 p.m. OK Python 2 TESTS 61 1154 2457600 1800
6167280 vjudge1 B March 28, 2014, 1:43 p.m. OK Python 2 TESTS 61 1154 2457600 1800
145396 zibada B Oct. 7, 2010, 7:21 p.m. OK Python 2 TESTS 61 1170 3174400 1800
6167292 grated B March 28, 2014, 1:44 p.m. OK Python 2 TESTS 61 1216 2457600 1800
5959970 jackowitzd2 B March 8, 2014, 12:43 a.m. OK Python 2 TESTS 61 1526 5836800 1800
2531668 laurion B Nov. 10, 2012, 11:22 p.m. OK Python 2 TESTS 61 1562 307200 1800
12095609 Eeyore B July 17, 2015, 1:09 p.m. OK Python 3 TESTS 61 280 1945600 1800
7408900 xando B Aug. 9, 2014, 10:15 p.m. OK Python 3 TESTS 61 1682 614400 1800
7408965 xando B Aug. 9, 2014, 10:40 p.m. OK Python 3 TESTS 61 1684 614400 1800
7408961 xando B Aug. 9, 2014, 10:37 p.m. OK Python 3 TESTS 61 1714 614400 1800
45151607 high_kii_savage B Oct. 31, 2018, 8:19 p.m. OK Python 3 TESTS 61 1996 512000 1800
738117 K_operafan B Oct. 5, 2011, 8:35 a.m. OK Ruby TESTS 61 310 5324800 1800

remove filters

Back to search problems