Codeforces Round 319 (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
576 Codeforces Round 319 (Div. 1) FINISHED False 7800 289920599 Sept. 10, 2015, 4:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1417 ) D Flights for Regular Customers PROGRAMMING dp matrices 2600

B'In the country there are exactly n cities numbered with positive integers from 1 to n. In each city there is an airport is located. Also, there is the only one airline, which makes m flights. Unfortunately, to use them, you need to be a regular customer of this company, namely, you have the opportunity to enjoy flight i from city ai to city bi only if you have already made at least di flights before that. Please note that flight i flies exactly from city ai to city bi. It can not be used to fly from city bi to city ai. An interesting fact is that there may possibly be recreational flights with a beautiful view of the sky, which begin and end in the same city. You need to get from city 1 to city n. Unfortunately, you 've never traveled by plane before. What minimum number of flights you have to perform in order to get to city n? Note that the same flight can be used multiple times. The first line contains two integers, n and m (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150) -- the number of cities in the country and the number of flights the company provides. Next m lines contain numbers ai, bi, di (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89di xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109), representing flight number i from city ai to city bi, accessible to only the clients who have made at least di flights. Print "Impossible" (without the quotes), if it is impossible to get from city 1 to city n using the airways. But if there is at least one way, print a single integer -- the minimum number of flights you need to make to get to the destination point.'...

Tutorials

Editorial Codeforces Round #319

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
24346017 tqyaaaaaaaang D Feb. 1, 2017, 2:12 p.m. OK GNU C++ TESTS 55 30 2560000 2600
24346117 tqyaaaaaaaang D Feb. 1, 2017, 2:16 p.m. OK GNU C++ TESTS 55 31 2560000 2600
13014728 I_so_sad D Sept. 15, 2015, 11:38 p.m. OK GNU C++ TESTS 55 78 0 2600
13256967 DengWx D Sept. 28, 2015, 3:27 a.m. OK GNU C++ TESTS 55 124 0 2600
13256757 vjudge2 D Sept. 28, 2015, 2:49 a.m. OK GNU C++ TESTS 55 124 0 2600
13256755 vjudge1 D Sept. 28, 2015, 2:49 a.m. OK GNU C++ TESTS 55 124 0 2600
13087811 KuribohG D Sept. 18, 2015, 2:17 p.m. OK GNU C++ TESTS 55 124 0 2600
22013141 vjudge1 D Nov. 3, 2016, 1:16 p.m. OK GNU C++ TESTS 55 124 102400 2600
13925306 vjtest D Oct. 29, 2015, 1:26 a.m. OK GNU C++ TESTS 55 124 102400 2600
28476330 jiyutian D July 12, 2017, 2:07 p.m. OK GNU C++ TESTS 55 124 2048000 2600
40986146 ReaLNero1 D July 30, 2018, 8:23 p.m. OK GNU C++11 TESTS 55 31 4915200 2600
12942962 Al.Cash D Sept. 10, 2015, 6:09 p.m. OK GNU C++11 TESTS 55 31 4915200 2600
68838217 luogu_bot2 D Jan. 15, 2020, 4:30 a.m. OK GNU C++11 TESTS 55 78 0 2600
69843080 Sneakoscope D Jan. 30, 2020, 1:40 p.m. OK GNU C++11 TESTS 55 93 0 2600
69720896 vjudge2 D Jan. 29, 2020, 10:37 a.m. OK GNU C++11 TESTS 55 93 0 2600
69719088 hjsjhn D Jan. 29, 2020, 10 a.m. OK GNU C++11 TESTS 55 93 0 2600
69702624 luogu_bot4 D Jan. 29, 2020, 2:04 a.m. OK GNU C++11 TESTS 55 93 0 2600
68151812 KyuushuKyuuhai D Jan. 4, 2020, 7:13 a.m. OK GNU C++11 TESTS 55 93 0 2600
63936569 PinkRabbit D Oct. 31, 2019, 4:03 p.m. OK GNU C++11 TESTS 55 93 0 2600
66273514 xht37 D Dec. 4, 2019, 1:14 p.m. OK GNU C++11 TESTS 55 93 4198400 2600
66376525 yhx-12243 D Dec. 6, 2019, 3:08 a.m. OK GNU C++14 TESTS 55 31 307200 2600
69762862 luogu_bot3 D Jan. 29, 2020, 3:38 p.m. OK GNU C++14 TESTS 55 93 0 2600
52511325 aid D April 8, 2019, 11:30 p.m. OK GNU C++14 TESTS 55 93 409600 2600
64664843 nqiiii D Nov. 11, 2019, 12:57 a.m. OK GNU C++14 TESTS 55 124 0 2600
63904692 Cyanic D Oct. 31, 2019, 6:12 a.m. OK GNU C++14 TESTS 55 124 102400 2600
56002499 LODB---D D June 24, 2019, 1:43 p.m. OK GNU C++14 TESTS 55 124 102400 2600
65348739 mlby D Nov. 19, 2019, 1:30 p.m. OK GNU C++14 TESTS 55 124 204800 2600
34574231 AwD D Jan. 26, 2018, 11:47 a.m. OK GNU C++14 TESTS 55 124 1945600 2600
28466014 suda1627405125 D July 12, 2017, 7:35 a.m. OK GNU C++14 TESTS 55 124 2048000 2600
56476557 vjudge4 D July 3, 2019, 1:24 p.m. OK GNU C++14 TESTS 55 139 102400 2600
68005720 Elegia D Dec. 31, 2019, 1:06 p.m. OK GNU C++17 TESTS 55 78 0 2600
63558495 jiangly D Oct. 27, 2019, 1:33 p.m. OK GNU C++17 TESTS 55 124 0 2600
66377819 ruo D Dec. 6, 2019, 4:04 a.m. OK GNU C++17 TESTS 55 124 102400 2600
63758211 CMXRYNP D Oct. 30, 2019, 1:30 a.m. OK GNU C++17 TESTS 55 124 102400 2600
65286964 hjk1030 D Nov. 18, 2019, 8:26 a.m. OK GNU C++17 TESTS 55 139 102400 2600
63689283 jiangly D Oct. 29, 2019, 1:13 a.m. OK GNU C++17 TESTS 55 140 0 2600
68219223 xiaowuc1 D Jan. 5, 2020, 3:17 a.m. OK GNU C++17 TESTS 55 140 102400 2600
44839993 vjudge1 D Oct. 25, 2018, 12:26 p.m. OK GNU C++17 TESTS 55 140 102400 2600
44055459 luogu_bot3 D Oct. 9, 2018, 11:24 p.m. OK GNU C++17 TESTS 55 171 2150400 2600
44055476 luogu_bot1 D Oct. 9, 2018, 11:26 p.m. OK GNU C++17 TESTS 55 202 2150400 2600
12935398 pashka D Sept. 10, 2015, 5:15 p.m. OK Java 7 TESTS 55 1793 0 2600
12969829 Slamur D Sept. 12, 2015, 7:54 a.m. OK Java 7 TESTS 55 3977 0 2600
13671054 _just4fun_ D Oct. 16, 2015, 7:40 p.m. OK Java 8 TESTS 55 639 0 2600
12958232 mmaxio D Sept. 11, 2015, 12:07 p.m. OK Java 8 TESTS 55 639 0 2600
13670864 _just4fun_ D Oct. 16, 2015, 7:24 p.m. OK Java 8 TESTS 55 655 0 2600
12988568 yarrr D Sept. 13, 2015, 6:06 p.m. OK Java 8 TESTS 55 655 0 2600
13247009 Anatoliy95 D Sept. 27, 2015, 9:28 a.m. OK Java 8 TESTS 55 779 0 2600
44566721 vjudge4 D Oct. 20, 2018, 1:06 a.m. OK Java 8 TESTS 55 1201 0 2600
12952280 uwi D Sept. 11, 2015, 4:22 a.m. OK Java 8 TESTS 55 1232 0 2600
12970052 Slamur D Sept. 12, 2015, 8:13 a.m. OK Java 8 TESTS 55 1575 0 2600
12969991 Slamur D Sept. 12, 2015, 8:08 a.m. OK Java 8 TESTS 55 1575 0 2600
12969950 Slamur D Sept. 12, 2015, 8:05 a.m. OK Java 8 TESTS 55 1606 0 2600
13081133 lacclaude D Sept. 18, 2015, 6:17 a.m. OK MS C++ TESTS 55 390 102400 2600
13018165 tangshitao D Sept. 16, 2015, 8:44 a.m. OK MS C++ TESTS 55 405 0 2600
13789795 vanvector D Oct. 22, 2015, 11:54 a.m. OK MS C++ TESTS 55 436 409600 2600
12957058 Milanin D Sept. 11, 2015, 10:46 a.m. OK MS C++ TESTS 55 733 614400 2600
12954705 izban D Sept. 11, 2015, 7:49 a.m. OK MS C++ TESTS 55 1450 35532800 2600
13321776 ch_egor D Sept. 30, 2015, 7:35 p.m. OK MS C++ TESTS 55 1965 0 2600
13790569 vanvector D Oct. 22, 2015, 12:39 p.m. OK MS C++ TESTS 55 3338 409600 2600

remove filters

Back to search problems