Codeforces Round 257 (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
449 Codeforces Round 257 (Div. 1) FINISHED False 7200 331837204 July 19, 2014, 1 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8870 ) B Jzzhu and Cities PROGRAMMING graphs greedy shortest paths 2000

B"Jzzhu is the president of country A. There are n cities numbered from 1 to n in his country. City 1 is the capital of A. Also there are m roads connecting the cities. One can go from city ui to vi (and vise versa) using the i-th road, the length of this road is xi. Finally, there are k train routes in the country. One can use the i-th train route to go from capital of the country to city si (and vise versa), the length of this route is yi. Jzzhu doesn't want to waste the money of the country, so he is going to close some of the train routes. Please tell Jzzhu the maximum number of the train routes which can be closed under the following condition: the length of the shortest path from every city to the capital mustn't change. The first line contains three integers n, xe2 x80 x89m, xe2 x80 x89k (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xc2 xb7105; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). Each of the next m lines contains three integers ui, xe2 x80 x89vi, xe2 x80 x89xi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ui, xe2 x80 x89vi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; ui xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89vi; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Each of the next k lines contains two integers si and yi (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89si xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). It is guaranteed that there is at least one way from every city to the capital. Note, that there can be multiple roads between two cities. Also, there can be multiple routes going to the same city from the capital. Output a single integer representing the maximum number of the train routes which can be closed."...

Tutorials

Codeforces Round #257 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57791773 bqx B July 26, 2019, 9:44 a.m. OK Clang++17 Diagnostics TESTS 45 857 42086400 2000
7354434 hos.lyric B Aug. 5, 2014, 4:43 p.m. OK D TESTS 45 935 50176000 2000
7167275 Misha100896 B July 19, 2014, 2:05 p.m. OK Delphi TESTS 45 1200 145305600 2000
8555304 trungvt130584 B Nov. 5, 2014, 7:54 a.m. OK FPC TESTS 45 202 22425600 2000
8611569 nanthat42 B Nov. 8, 2014, 4:44 a.m. OK FPC TESTS 45 217 22425600 2000
11607657 huynhnhat B June 16, 2015, 1:35 p.m. OK FPC TESTS 45 233 14950400 2000
11619709 Le_Anh_Duc B June 17, 2015, 12:52 p.m. OK FPC TESTS 45 233 21606400 2000
7163051 xrz199721 B July 19, 2014, 1:33 p.m. OK FPC TESTS 45 233 64409600 2000
11600534 voanhtucqt B June 16, 2015, 12:45 a.m. OK FPC TESTS 45 234 14438400 2000
11600526 voanhtu_cqt B June 16, 2015, 12:44 a.m. OK FPC TESTS 45 234 14438400 2000
11589209 voanhtucqt B June 15, 2015, 12:32 a.m. OK FPC TESTS 45 249 14438400 2000
11589192 voanhtu_cqt B June 15, 2015, 12:26 a.m. OK FPC TESTS 45 249 14438400 2000
11634117 zorono1 B June 18, 2015, 2:33 p.m. OK FPC TESTS 45 249 14950400 2000
7176602 423555290 B July 19, 2014, 4:29 p.m. OK GNU C++ TESTS 45 93 11776000 2000
7186239 Philippica_bf_of_zxr B July 20, 2014, 12:30 p.m. OK GNU C++ TESTS 45 93 18636800 2000
7178122 hzwer B July 19, 2014, 5:49 p.m. OK GNU C++ TESTS 45 108 18636800 2000
40988240 ReaLNero1 B July 30, 2018, 9:50 p.m. OK GNU C++ TESTS 45 109 18636800 2000
26607989 DFPMTS B April 23, 2017, 2:58 p.m. OK GNU C++ TESTS 45 109 23552000 2000
14004409 hehe0625 B Nov. 1, 2015, 9:34 a.m. OK GNU C++ TESTS 45 109 31232000 2000
26342139 vjudge5 B April 13, 2017, 2:54 p.m. OK GNU C++ TESTS 45 124 18124800 2000
33048612 vjudge5 B Dec. 9, 2017, 12:32 p.m. OK GNU C++ TESTS 45 124 26214400 2000
33046716 vjudge4 B Dec. 9, 2017, 11:14 a.m. OK GNU C++ TESTS 45 124 182784000 2000
33046710 DQS B Dec. 9, 2017, 11:14 a.m. OK GNU C++ TESTS 45 124 182784000 2000
7189631 MinakoKojima B July 21, 2014, 12:35 a.m. OK GNU C++0x TESTS 45 124 11776000 2000
8276798 zhj B Oct. 17, 2014, 5:45 a.m. OK GNU C++0x TESTS 45 217 38809600 2000
9663883 heyihong B Feb. 1, 2015, 9:53 a.m. OK GNU C++0x TESTS 45 218 20275200 2000
7180637 JayYe B July 20, 2014, 12:21 a.m. OK GNU C++0x TESTS 45 234 34713600 2000
7169960 mymymy B July 19, 2014, 2:28 p.m. OK GNU C++0x TESTS 45 234 118067200 2000
7175063 FancyCoder B July 19, 2014, 3:50 p.m. OK GNU C++0x TESTS 45 248 24985600 2000
7167037 bidzilya B July 19, 2014, 2:03 p.m. OK GNU C++0x TESTS 45 249 13209600 2000
7162533 gchebanov B July 19, 2014, 1:30 p.m. OK GNU C++0x TESTS 45 249 15667200 2000
7166649 James B July 19, 2014, 2 p.m. OK GNU C++0x TESTS 45 264 20275200 2000
7176725 wwwsealss B July 19, 2014, 4:34 p.m. OK GNU C++0x TESTS 45 264 22528000 2000
57912371 rainboy B July 28, 2019, 9:19 p.m. OK GNU C11 TESTS 45 233 9625600 2000
52991240 about B April 18, 2019, 10:24 p.m. OK GNU C11 TESTS 45 389 22528000 2000
62424841 dansen B Oct. 12, 2019, 1:59 p.m. OK GNU C++11 TESTS 45 93 11571200 2000
62424606 dansen B Oct. 12, 2019, 1:55 p.m. OK GNU C++11 TESTS 45 93 11571200 2000
62113901 vjudge2 B Oct. 8, 2019, 12:54 p.m. OK GNU C++11 TESTS 45 93 18636800 2000
44654997 luogu_bot4 B Oct. 21, 2018, 12:42 p.m. OK GNU C++11 TESTS 45 93 18636800 2000
64083980 luogu_bot3 B Nov. 2, 2019, 10:57 a.m. OK GNU C++11 TESTS 45 108 18432000 2000
62061674 RainAir B Oct. 7, 2019, 1:51 p.m. OK GNU C++11 TESTS 45 109 15564800 2000
57643072 vjudge5 B July 24, 2019, 1:16 p.m. OK GNU C++11 TESTS 45 109 16998400 2000
45319949 mtwoz B Nov. 5, 2018, 10:03 a.m. OK GNU C++11 TESTS 45 109 18534400 2000
56999890 DennyQi B July 14, 2019, 2:44 a.m. OK GNU C++11 TESTS 45 124 15462400 2000
62087451 luogu_bot4 B Oct. 8, 2019, 3:19 a.m. OK GNU C++11 TESTS 45 124 15974400 2000
57440301 anthony1314 B July 21, 2019, 6:31 a.m. OK GNU C++14 TESTS 45 249 14438400 2000
62748848 CMCC. B Oct. 16, 2019, 11:37 p.m. OK GNU C++14 TESTS 45 264 20582400 2000
57440412 anthony1314 B July 21, 2019, 6:33 a.m. OK GNU C++14 TESTS 45 265 14438400 2000
52134973 yifeng321 B April 1, 2019, 1:25 a.m. OK GNU C++14 TESTS 45 265 14438400 2000
49241976 nong B Jan. 31, 2019, 10:47 a.m. OK GNU C++14 TESTS 45 265 20684800 2000
57440445 vjudge3 B July 21, 2019, 6:34 a.m. OK GNU C++14 TESTS 45 280 14438400 2000
51134390 El_MaraVilla B March 10, 2019, 3:19 p.m. OK GNU C++14 TESTS 45 280 18841600 2000
57805226 vjudge3 B July 26, 2019, 2:53 p.m. OK GNU C++14 TESTS 45 280 28467200 2000
59645912 TistPetr-is-ok B Aug. 29, 2019, 5:44 a.m. OK GNU C++14 TESTS 45 280 37273600 2000
62968172 vjudge2 B Oct. 20, 2019, 5:47 a.m. OK GNU C++14 TESTS 45 280 38092800 2000
54097535 Tieway59 B May 14, 2019, 1:53 p.m. OK GNU C++17 TESTS 45 233 25292800 2000
54082822 cxsy B May 14, 2019, 5:04 a.m. OK GNU C++17 TESTS 45 234 11571200 2000
57477134 YANGRUZHAO B July 21, 2019, 10:54 p.m. OK GNU C++17 TESTS 45 234 23859200 2000
58071062 vjudge2 B July 31, 2019, 10:42 a.m. OK GNU C++17 TESTS 45 234 30208000 2000
68976014 vjudge3 B Jan. 17, 2020, 8:51 a.m. OK GNU C++17 TESTS 45 234 41676800 2000
54082954 cxsy B May 14, 2019, 5:12 a.m. OK GNU C++17 TESTS 45 249 11878400 2000
55326967 chengsh B June 9, 2019, 8:40 a.m. OK GNU C++17 TESTS 45 264 14438400 2000
57826758 vjudge5 B July 27, 2019, 3:37 a.m. OK GNU C++17 TESTS 45 265 14438400 2000
69890247 vjudge3 B Jan. 31, 2020, 9:44 a.m. OK GNU C++17 TESTS 45 265 14848000 2000
57582871 vjudge5 B July 23, 2019, 9:29 a.m. OK GNU C++17 TESTS 45 265 16896000 2000
7207508 d891320478 B July 23, 2014, 9:06 a.m. OK Java 6 TESTS 45 841 91750400 2000
7175414 uwi B July 19, 2014, 3:56 p.m. OK Java 7 TESTS 45 373 51404800 2000
7580361 hama-du B Aug. 26, 2014, 1:49 p.m. OK Java 7 TESTS 45 389 15769600 2000
7178457 tanzaku B July 19, 2014, 6:17 p.m. OK Java 7 TESTS 45 420 13414400 2000
7197330 chinh7 B July 21, 2014, 6:22 p.m. OK Java 7 TESTS 45 421 3379200 2000
7196700 Junior94 B July 21, 2014, 4:16 p.m. OK Java 7 TESTS 45 451 14643200 2000
11814786 ankitstone B June 28, 2015, 5:57 a.m. OK Java 7 TESTS 45 467 36044800 2000
7166297 Rubanenko B July 19, 2014, 1:57 p.m. OK Java 7 TESTS 45 545 18739200 2000
11173307 Sumeet.Varma B May 20, 2015, 6:02 a.m. OK Java 7 TESTS 45 576 49561600 2000
7184748 asheshvidyut B July 20, 2014, 7:33 a.m. OK Java 7 TESTS 45 717 53248000 2000
7188618 mukku B July 20, 2014, 6:53 p.m. OK Java 7 TESTS 45 764 36659200 2000
45273682 Srinivasa_Ramanujan B Nov. 4, 2018, 9:48 a.m. OK Java 8 TESTS 45 498 37888000 2000
59516771 KulikAlex B Aug. 26, 2019, 10:26 a.m. OK Java 8 TESTS 45 592 20480000 2000
65666447 NMouad21 B Nov. 24, 2019, 2:07 p.m. OK Java 8 TESTS 45 607 50790400 2000
41916789 aminul B Aug. 20, 2018, 10:48 p.m. OK Java 8 TESTS 45 623 37888000 2000
7215577 KOHCTAHTIH B July 24, 2014, 10:28 a.m. OK Java 8 TESTS 45 655 2355200 2000
11527020 old_arysson B June 11, 2015, 1:10 a.m. OK Java 8 TESTS 45 686 45875200 2000
11527013 Pimpom B June 11, 2015, 1:08 a.m. OK Java 8 TESTS 45 686 45875200 2000
58782411 FlashGamezzz B Aug. 13, 2019, 8:06 p.m. OK Java 8 TESTS 45 701 39219200 2000
46822628 amolpratap007 B Dec. 9, 2018, 4:16 p.m. OK Java 8 TESTS 45 748 72192000 2000
55053287 dmitrievanthony B June 3, 2019, 6:01 p.m. OK Java 8 TESTS 45 780 54374400 2000
7177636 og.kostya B July 19, 2014, 5:15 p.m. OK MS C# TESTS 45 343 22732800 2000
7177591 og.kostya B July 19, 2014, 5:13 p.m. OK MS C# TESTS 45 374 29388800 2000
7197470 Silithus B July 21, 2014, 6:56 p.m. OK MS C# TESTS 45 607 27033600 2000
7185121 Silithus B July 20, 2014, 10:17 a.m. OK MS C# TESTS 45 967 32153600 2000
9730885 azukun B Feb. 5, 2015, 7:14 p.m. OK MS C# TESTS 45 1216 38297600 2000
7203763 25122008 B July 22, 2014, 5:06 p.m. OK MS C++ TESTS 45 187 14540800 2000
57969454 vjudge2 B July 30, 2019, 5:06 a.m. OK MS C++ TESTS 45 202 13209600 2000
57566279 vjudge5 B July 23, 2019, 3:05 a.m. OK MS C++ TESTS 45 202 16896000 2000
69286472 vjudge4 B Jan. 22, 2020, 8:24 a.m. OK MS C++ TESTS 45 202 17510400 2000
29343695 vjudge1 B Aug. 11, 2017, 5:26 a.m. OK MS C++ TESTS 45 202 21299200 2000
7192059 helecopter B July 21, 2014, 7:52 a.m. OK MS C++ TESTS 45 202 31744000 2000
57968875 vjudge4 B July 30, 2019, 4:38 a.m. OK MS C++ TESTS 45 218 13824000 2000
19032807 vjudge1 B July 11, 2016, 3:05 p.m. OK MS C++ TESTS 45 218 16281600 2000
57577094 vjudge2 B July 23, 2019, 7:27 a.m. OK MS C++ TESTS 45 218 16896000 2000
7175605 Merlininice B July 19, 2014, 3:59 p.m. OK MS C++ TESTS 45 218 29081600 2000
62312541 vjudge1 B Oct. 10, 2019, 2:20 p.m. OK MS C++ 2017 TESTS 45 358 13414400 2000
69893699 vjudge5 B Jan. 31, 2020, 11 a.m. OK MS C++ 2017 TESTS 45 358 25702400 2000
57445304 vjudge1 B July 21, 2019, 8:02 a.m. OK MS C++ 2017 TESTS 45 358 32153600 2000
57497409 shijieshu B July 22, 2019, 8:59 a.m. OK MS C++ 2017 TESTS 45 358 33382400 2000
69224616 vjudge2 B Jan. 21, 2020, 6:34 a.m. OK MS C++ 2017 TESTS 45 389 37171200 2000
68975313 vjudge4 B Jan. 17, 2020, 8:35 a.m. OK MS C++ 2017 TESTS 45 421 33177600 2000
68979592 116c B Jan. 17, 2020, 10:11 a.m. OK MS C++ 2017 TESTS 45 452 33177600 2000
69645831 vjudge1 B Jan. 28, 2020, 1:07 a.m. OK MS C++ 2017 TESTS 45 514 228966400 2000
59543759 yorky B Aug. 26, 2019, 8:17 p.m. OK MS C++ 2017 TESTS 45 1013 36249600 2000
57497723 shijieshu B July 22, 2019, 9:05 a.m. OK MS C++ 2017 TESTS 45 1029 47411200 2000
7170024 Darooha B July 19, 2014, 2:29 p.m. OK Ocaml TESTS 45 1153 42700800 2000
48409634 syzymon B Jan. 15, 2019, 6:53 a.m. OK Ocaml TESTS 45 1590 57753600 2000
7197680 limed B July 21, 2014, 7:40 p.m. OK Scala TESTS 45 1372 86732800 2000
7197674 limed B July 21, 2014, 7:38 p.m. OK Scala TESTS 45 1450 78336000 2000
7197664 limed B July 21, 2014, 7:36 p.m. OK Scala TESTS 45 1450 84889600 2000
7188762 limed B July 20, 2014, 7:39 p.m. OK Scala TESTS 45 1497 83660800 2000
7197648 limed B July 21, 2014, 7:32 p.m. OK Scala TESTS 45 1528 83968000 2000
7188793 limed B July 20, 2014, 7:46 p.m. OK Scala TESTS 45 1590 78336000 2000
7197643 limed B July 21, 2014, 7:31 p.m. OK Scala TESTS 45 1590 83968000 2000
7179894 limed B July 19, 2014, 9:14 p.m. OK Scala TESTS 45 1606 83251200 2000
7197657 limed B July 21, 2014, 7:34 p.m. OK Scala TESTS 45 1606 83968000 2000
7179851 limed B July 19, 2014, 9:07 p.m. OK Scala TESTS 45 1637 84275200 2000

remove filters

Back to search problems