Codeforces Round 178 (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
294 Codeforces Round 178 (Div. 2) FINISHED False 7200 366474599 April 7, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 950 ) E Shaass the Great PROGRAMMING dp trees 2700

B"The great Shaass is the new king of the Drakht empire. The empire has n cities which are connected by n xe2 x80 x89- xe2 x80 x891 bidirectional roads. Each road has an specific length and connects a pair of cities. There's a unique simple path connecting each pair of cities. His majesty the great Shaass has decided to tear down one of the roads and build another road with the same length between some pair of cities. He should build such road that it's still possible to travel from each city to any other city. He might build the same road again. You as his advisor should help him to find a way to make the described action. You should find the way that minimize the total sum of pairwise distances between cities after the action. So calculate the minimum sum. The first line of the input contains an integer n denoting the number of cities in the empire, (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000). The next n xe2 x80 x89- xe2 x80 x891 lines each contains three integers ai, bi and wi showing that two cities ai and bi are connected using a road of length wi, (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89bi, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89wi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). On the only line of the output print the minimum pairwise sum of distances between the cities. Please do not use the %lld specificator to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specificator."...

Tutorials

Codeforces Round #178 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3487433 vlad107 E April 7, 2013, 4:40 p.m. OK Delphi TESTS 36 2968 24064000 2700
3517947 fishpear E April 12, 2013, 12:39 p.m. OK FPC TESTS 36 1812 1331200 2700
27746287 vjudge1 E June 12, 2017, 11:55 p.m. OK FPC TESTS 36 2090 3379200 2700
27736946 vjudge4 E June 12, 2017, 11:33 a.m. OK FPC TESTS 36 2199 3379200 2700
3503214 niyaznigmatul E April 11, 2013, 11:31 a.m. OK FPC TESTS 36 3015 38502400 2700
3489966 hiepsieunhan E April 7, 2013, 5:51 p.m. OK FPC TESTS 36 3312 614400 2700
3487799 Rubanenko E April 7, 2013, 4:47 p.m. OK FPC TESTS 36 3500 512000 2700
5348271 vuonghy2442 E Dec. 4, 2013, 2:26 p.m. OK FPC TESTS 36 3524 512000 2700
3541423 ayin E April 15, 2013, 2:31 p.m. OK GNU C++ TESTS 36 234 716800 2700
3516349 nuoyan2010 E April 12, 2013, 7:29 a.m. OK GNU C++ TESTS 36 234 819200 2700
3491896 azlhust E April 8, 2013, 7:07 a.m. OK GNU C++ TESTS 36 234 819200 2700
4951118 shaynelq E Nov. 1, 2013, 12:57 p.m. OK GNU C++ TESTS 36 280 716800 2700
4950762 shaynelq E Nov. 1, 2013, 11:58 a.m. OK GNU C++ TESTS 36 280 716800 2700
3599561 stareven E April 22, 2013, 3:42 a.m. OK GNU C++ TESTS 36 515 1126400 2700
3488368 liouzhou_101 E April 7, 2013, 5 p.m. OK GNU C++ TESTS 36 875 716800 2700
3820540 nemomojie E June 4, 2013, 5:14 a.m. OK GNU C++ TESTS 36 921 819200 2700
4927126 MakingMaker E Oct. 29, 2013, 8:09 a.m. OK GNU C++ TESTS 36 936 614400 2700
27732020 vjudge5 E June 12, 2017, 6:14 a.m. OK GNU C++ TESTS 36 1029 921600 2700
4220341 mrTux E Aug. 3, 2013, 10:45 a.m. OK GNU C++0x TESTS 36 1872 77824000 2700
3655044 LovelyPenguin E April 30, 2013, 3 p.m. OK GNU C++0x TESTS 36 1921 819200 2700
9500140 sherlock_holms E Jan. 22, 2015, 8:48 a.m. OK GNU C++0x TESTS 36 2088 614400 2700
3490349 savinov E April 7, 2013, 6:30 p.m. OK GNU C++0x TESTS 36 2281 921600 2700
6866879 tsfn E June 12, 2014, 4:35 a.m. OK GNU C++0x TESTS 36 2308 716800 2700
3501355 MinakoKojima E April 10, 2013, 9:05 p.m. OK GNU C++0x TESTS 36 2324 614400 2700
3493228 2011330300713 E April 8, 2013, 12:54 p.m. OK GNU C++0x TESTS 36 2371 716800 2700
3493260 2011330300713 E April 8, 2013, 1:01 p.m. OK GNU C++0x TESTS 36 2402 716800 2700
3498964 Algiz E April 10, 2013, 9:33 a.m. OK GNU C++0x TESTS 36 2515 921600 2700
8371585 lucaslima E Oct. 23, 2014, 9:13 p.m. OK GNU C++0x TESTS 36 2558 716800 2700
20619200 Y_UME E Sept. 14, 2016, 2:52 p.m. OK GNU C++11 TESTS 36 15 921600 2700
61680749 luogu_bot3 E Oct. 2, 2019, 12:49 a.m. OK GNU C++11 TESTS 36 795 5836800 2700
61680727 wangyc E Oct. 2, 2019, 12:47 a.m. OK GNU C++11 TESTS 36 795 5836800 2700
54327161 vjudge2 E May 18, 2019, 3:32 a.m. OK GNU C++11 TESTS 36 967 716800 2700
54327133 Dijkstra-QFJ E May 18, 2019, 3:31 a.m. OK GNU C++11 TESTS 36 967 716800 2700
22068800 byene E Nov. 6, 2016, 5:55 a.m. OK GNU C++11 TESTS 36 998 614400 2700
40219129 Wh1t3zZ E July 12, 2018, 5:17 a.m. OK GNU C++11 TESTS 36 1060 307200 2700
60465864 FlyInTheSky E Sept. 13, 2019, 1:30 a.m. OK GNU C++11 TESTS 36 1076 921600 2700
20611359 Y_UME E Sept. 14, 2016, 10:26 a.m. OK GNU C++11 TESTS 36 1107 409600 2700
67501660 liuweih E Dec. 24, 2019, 5:03 a.m. OK GNU C++11 TESTS 36 1107 614400 2700
34085228 O_o.Donkeyking.o_O E Jan. 11, 2018, 10:03 a.m. OK GNU C++14 TESTS 36 15 2867200 2700
40989993 ReaLNero1 E July 30, 2018, 11:29 p.m. OK GNU C++14 TESTS 36 31 921600 2700
63925650 asfd221 E Oct. 31, 2019, 12:57 p.m. OK GNU C++14 TESTS 36 483 15564800 2700
22045898 lavin E Nov. 5, 2016, 12:41 a.m. OK GNU C++14 TESTS 36 733 819200 2700
56159574 NotNight E June 27, 2019, 11:47 a.m. OK GNU C++14 TESTS 36 904 921600 2700
27732571 Feeey E June 12, 2017, 6:52 a.m. OK GNU C++14 TESTS 36 1060 819200 2700
41147269 LLL_2820 E Aug. 3, 2018, 7:09 a.m. OK GNU C++14 TESTS 36 1076 1126400 2700
30831957 Powerslave E Sept. 29, 2017, 2:17 p.m. OK GNU C++14 TESTS 36 1092 819200 2700
41199698 vjudge3 E Aug. 4, 2018, 4:20 a.m. OK GNU C++14 TESTS 36 1138 819200 2700
41199711 vjudge1 E Aug. 4, 2018, 4:20 a.m. OK GNU C++14 TESTS 36 1138 921600 2700
62031033 GCCCCCCC E Oct. 7, 2019, 12:40 a.m. OK GNU C++17 TESTS 36 982 716800 2700
55977603 Shayan.P E June 23, 2019, 6:30 p.m. OK GNU C++17 TESTS 36 1013 2764800 2700
60485101 lyh1999 E Sept. 13, 2019, 12:18 p.m. OK GNU C++17 TESTS 36 1076 614400 2700
42854560 fblogy E Sept. 14, 2018, 8:25 a.m. OK GNU C++17 TESTS 36 1107 716800 2700
61975624 ivan100sic E Oct. 6, 2019, 10:26 a.m. OK GNU C++17 TESTS 36 1200 921600 2700
61881201 elManco E Oct. 4, 2019, 11:51 p.m. OK GNU C++17 TESTS 36 1201 1024000 2700
55002004 AliShahali1382 E June 3, 2019, 5:12 a.m. OK GNU C++17 TESTS 36 1216 614400 2700
48702606 vjudge4 E Jan. 22, 2019, 3:47 a.m. OK GNU C++17 TESTS 36 1231 716800 2700
63700996 hjk1030 E Oct. 29, 2019, 7:19 a.m. OK GNU C++17 TESTS 36 1247 1331200 2700
48702432 vjudge1 E Jan. 22, 2019, 3:39 a.m. OK GNU C++17 TESTS 36 1263 716800 2700
3551523 hama-du E April 16, 2013, 9:36 a.m. OK Java 6 TESTS 36 1625 409600 2700
3487118 uwi E April 7, 2013, 4:34 p.m. OK Java 6 TESTS 36 3953 2252800 2700
3489983 boleyn.su E April 7, 2013, 5:53 p.m. OK Java 7 TESTS 36 2714 819200 2700
16626009 DukeOfYork E March 10, 2016, 1:04 a.m. OK Java 7 TESTS 36 2962 0 2700
3489622 Hohol E April 7, 2013, 5:28 p.m. OK Java 7 TESTS 36 2984 614400 2700
3490558 mmaxio E April 7, 2013, 7:13 p.m. OK Java 7 TESTS 36 3031 512000 2700
3702958 I_love_Malika E May 11, 2013, 3:47 p.m. OK Java 7 TESTS 36 3182 614400 2700
3500651 dusty.and.rusty E April 10, 2013, 6:27 p.m. OK Java 7 TESTS 36 3213 409600 2700
3500591 dusty.and.rusty E April 10, 2013, 6:14 p.m. OK Java 7 TESTS 36 3250 409600 2700
3500616 dusty.and.rusty E April 10, 2013, 6:19 p.m. OK Java 7 TESTS 36 3437 409600 2700
6167250 PlayLikeNeverB4 E March 28, 2014, 1:39 p.m. OK Java 7 TESTS 36 3650 512000 2700
16625986 DukeOfYork E March 10, 2016, 12:59 a.m. OK Java 7 TESTS 36 3898 0 2700
33845813 Kharouba E Jan. 1, 2018, 11:21 a.m. OK Java 8 TESTS 36 3275 268390400 2700
15778310 alexrcoleman E Feb. 3, 2016, 10:19 p.m. OK Java 8 TESTS 36 3398 0 2700
27529042 Aemon E June 2, 2017, 5:32 p.m. OK Java 8 TESTS 36 3415 0 2700
8984462 KOHCTAHTIH E Dec. 4, 2014, 5:56 p.m. OK Java 8 TESTS 36 3586 1433600 2700
20178932 yskyskyer123 E Aug. 26, 2016, 3:57 p.m. OK MS C++ TESTS 36 1154 2457600 2700
20196839 yskyskyer123 E Aug. 27, 2016, 2:11 p.m. OK MS C++ TESTS 36 1200 2457600 2700
48719232 vjudge4 E Jan. 22, 2019, 12:47 p.m. OK MS C++ TESTS 36 1372 614400 2700
18351130 zhangJvv E June 10, 2016, 2:45 a.m. OK MS C++ TESTS 36 1512 8294400 2700
48865710 vjudge5 E Jan. 24, 2019, 2:57 a.m. OK MS C++ TESTS 36 1778 11366400 2700
48865651 vjudge2 E Jan. 24, 2019, 2:55 a.m. OK MS C++ TESTS 36 1824 11366400 2700
6679162 Elun E May 22, 2014, 6 a.m. OK MS C++ TESTS 36 2058 512000 2700
6679158 Elun E May 22, 2014, 5:59 a.m. OK MS C++ TESTS 36 2058 512000 2700
3489527 Ripatti E April 7, 2013, 5:27 p.m. OK MS C++ TESTS 36 2187 716800 2700
5827777 AleksanderBalobanov E Jan. 28, 2014, 7:24 p.m. OK MS C++ TESTS 36 2244 202137600 2700

remove filters

Back to search problems