Divide by Zero 2018 and Codeforces Round 474 (Div. 1 + Div. 2, combined)

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
960 Divide by Zero 2018 and Codeforces Round 474 (Div. 1 + Div. 2, combined) FINISHED False 9000 208706099 April 7, 2018, 4:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2983 ) F Pathwalks PROGRAMMING data structures dp graphs 2000

B"You are given a directed graph with n nodes and m edges, with all edges having a certain weight. There might be multiple edges and self loops, and the graph can also be disconnected. You need to choose a path (possibly passing through same vertices multiple times) in the graph such that the weights of the edges are in strictly increasing order, and these edges come in the order of input. Among all such paths, you need to find the the path that has the maximum possible number of edges, and report this value. Please note that the edges picked don't have to be consecutive in the input. The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100000,1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100000) -- the number of vertices and edges in the graph, respectively. m lines follows. The i-th of these lines contains three space separated integers ai, bi and wi (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 x89wi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100000), denoting an edge from vertex ai to vertex bi having weight wi Print one integer in a single line -- the maximum number of edges in the path. The answer for the first sample input is 2: . Note that you cannot traverse because edge appears earlier in the input than the other two edges and hence cannot be picked/traversed after either of the other two edges. In the second sample, it's optimal to pick 1-st, 3-rd and 5-th edges to get the optimal answer: . "...

Tutorials

Divide by Zero 2018 and Codeforces Round #474 (Div. 1 + Div. 2, combined) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
38084044 admire.japan F May 10, 2018, 3:28 a.m. OK D TESTS 63 217 27033600 2000
69886467 hos.lyric F Jan. 31, 2020, 8:24 a.m. OK D TESTS 63 233 22835200 2000
39856022 OIer_gg F July 2, 2018, 3:33 a.m. OK FPC TESTS 63 171 136294400 2000
39786548 1668 F June 30, 2018, 3:04 a.m. OK FPC TESTS 63 343 4096000 2000
37532282 Scut82 F April 22, 2018, 11:47 a.m. OK GNU C++ TESTS 63 46 10342400 2000
37836455 Scut82 F May 2, 2018, 10:26 a.m. OK GNU C++ TESTS 63 61 10752000 2000
39855430 Administratom F July 2, 2018, 2:56 a.m. OK GNU C++ TESTS 63 61 48537600 2000
39785430 ilnil F June 30, 2018, 1:48 a.m. OK GNU C++ TESTS 63 61 62361600 2000
37462615 lcr F April 19, 2018, 1:12 p.m. OK GNU C++ TESTS 63 62 42393600 2000
37132857 liuruijia F April 9, 2018, 11:19 p.m. OK GNU C++ TESTS 63 62 42803200 2000
37124658 liuruijia123 F April 9, 2018, 2:39 p.m. OK GNU C++ TESTS 63 62 42803200 2000
41994840 redbag F Aug. 23, 2018, 11:28 a.m. OK GNU C++ TESTS 63 62 60620800 2000
39820600 Administratom F July 1, 2018, 12:04 p.m. OK GNU C++ TESTS 63 77 48537600 2000
40534277 luogu_bot3 F July 19, 2018, 5:16 a.m. OK GNU C++ TESTS 63 78 5632000 2000
51278688 gubeiqg F March 14, 2019, 1:07 a.m. OK GNU C++11 TESTS 63 46 5632000 2000
42848343 lumingqi F Sept. 14, 2018, 2:53 a.m. OK GNU C++11 TESTS 63 46 5632000 2000
37085233 yasugongshang F April 8, 2018, 1:41 a.m. OK GNU C++11 TESTS 63 46 9318400 2000
51670705 wangyc F March 22, 2019, 8:07 a.m. OK GNU C++11 TESTS 63 46 22118400 2000
63293424 LuciferX07 F Oct. 24, 2019, 12:21 p.m. OK GNU C++11 TESTS 63 46 36249600 2000
44176494 psk011102 F Oct. 12, 2018, 9:08 a.m. OK GNU C++11 TESTS 63 46 96153600 2000
42847034 Shedneryan F Sept. 14, 2018, 1:18 a.m. OK GNU C++11 TESTS 63 46 120217600 2000
63270804 zzy2005 F Oct. 24, 2019, 3:56 a.m. OK GNU C++11 TESTS 63 46 120627200 2000
37072102 Axcosin F April 7, 2018, 5:34 p.m. OK GNU C++11 TESTS 63 61 9932800 2000
44318676 luogu_bot4 F Oct. 14, 2018, 1:33 p.m. OK GNU C++11 TESTS 63 61 24473600 2000
46040113 wleung_bvg F Nov. 21, 2018, 7:01 p.m. OK GNU C++14 TESTS 63 46 7372800 2000
37068275 _LowestJN F April 7, 2018, 5:06 p.m. OK GNU C++14 TESTS 63 62 18841600 2000
45078755 vnsckdh F Oct. 30, 2018, 4:13 a.m. OK GNU C++14 TESTS 63 78 3584000 2000
49673254 proin6months F Feb. 9, 2019, 6:10 p.m. OK GNU C++14 TESTS 63 78 5529600 2000
54001746 zerotohero F May 11, 2019, 4:49 p.m. OK GNU C++14 TESTS 63 78 5836800 2000
51945185 s_h_shahin F March 28, 2019, 4:31 p.m. OK GNU C++14 TESTS 63 78 5836800 2000
45699610 pr3pony F Nov. 14, 2018, 7:10 a.m. OK GNU C++14 TESTS 63 78 5836800 2000
37261312 molamola. F April 12, 2018, 10:20 p.m. OK GNU C++14 TESTS 63 78 9113600 2000
37114911 txingml F April 9, 2018, 6:48 a.m. OK GNU C++14 TESTS 63 78 9113600 2000
37079268 tataky F April 7, 2018, 6:34 p.m. OK GNU C++14 TESTS 63 78 9113600 2000
37064606 LiChenKoh F April 7, 2018, 4:44 p.m. OK GNU C++17 TESTS 63 61 9113600 2000
56445137 aditya_sheth F July 2, 2019, 6:27 p.m. OK GNU C++17 TESTS 63 78 5836800 2000
51377789 sweetcookie F March 16, 2019, 2:51 p.m. OK GNU C++17 TESTS 63 78 5836800 2000
50619714 pit4h F Feb. 28, 2019, 11:14 p.m. OK GNU C++17 TESTS 63 78 5836800 2000
48053782 _KIDRAH F Jan. 7, 2019, 11 a.m. OK GNU C++17 TESTS 63 78 5836800 2000
58850595 aniKet_gAjare F Aug. 15, 2019, 7:21 a.m. OK GNU C++17 TESTS 63 78 6656000 2000
50593824 DeepWorm F Feb. 28, 2019, 9:02 a.m. OK GNU C++17 TESTS 63 78 10342400 2000
58377722 tranquanghuy F Aug. 6, 2019, 8:48 a.m. OK GNU C++17 TESTS 63 93 3584000 2000
69463856 besieger F Jan. 24, 2020, noon OK GNU C++17 TESTS 63 93 5836800 2000
68161559 StarCuriosity F Jan. 4, 2020, 11:05 a.m. OK GNU C++17 TESTS 63 93 5836800 2000
69799230 RetiredProgrammer F Jan. 29, 2020, 9:33 p.m. OK Java 11 TESTS 63 358 19148800 2000
37068387 uwi F April 7, 2018, 5:07 p.m. OK Java 8 TESTS 63 233 39014400 2000
37093809 xodiac F April 8, 2018, 10:14 a.m. OK Java 8 TESTS 63 233 40140800 2000
46840640 megaspazz F Dec. 10, 2018, 7:19 a.m. OK Java 8 TESTS 63 264 14745600 2000
37110247 bovinophile F April 8, 2018, 10:09 p.m. OK Java 8 TESTS 63 264 28774400 2000
37991795 PrakharJain F May 7, 2018, 10:47 a.m. OK Java 8 TESTS 63 264 37580800 2000
37082683 baobab F April 7, 2018, 9:19 p.m. OK Java 8 TESTS 63 264 39731200 2000
49124770 wadissimo F Jan. 28, 2019, 9:43 p.m. OK Java 8 TESTS 63 265 15462400 2000
37067083 vovacomua F April 7, 2018, 4:59 p.m. OK Java 8 TESTS 63 265 27136000 2000
64897888 yaoct F Nov. 14, 2019, 5:28 p.m. OK Java 8 TESTS 63 280 16179200 2000
45919068 AQT F Nov. 18, 2018, 3:28 p.m. OK Java 8 TESTS 63 280 17203200 2000
59895190 vjudge4 F Sept. 2, 2019, 11:53 a.m. OK MS C++ TESTS 63 78 24473600 2000
37081524 RCG F April 7, 2018, 8:22 p.m. OK MS C++ TESTS 63 93 12390400 2000
37081831 Taube F April 7, 2018, 8:34 p.m. OK MS C++ TESTS 63 93 16588800 2000
59894201 vjudge3 F Sept. 2, 2019, 11:32 a.m. OK MS C++ TESTS 63 93 24473600 2000
38939203 ys1468362286 F June 4, 2018, 8:52 a.m. OK MS C++ TESTS 63 93 35532800 2000
37251118 _noname absi2011 luoyuchu F April 12, 2018, 1:21 p.m. OK MS C++ TESTS 63 109 15974400 2000
38939239 vjudge3 F June 4, 2018, 8:53 a.m. OK MS C++ TESTS 63 109 35532800 2000
47804883 LoneFox F Jan. 1, 2019, 6:05 a.m. OK MS C++ TESTS 63 124 11264000 2000
37075529 rkm0959 F April 7, 2018, 6:03 p.m. OK MS C++ TESTS 63 124 15257600 2000
37533104 arunasbabunas F April 22, 2018, 12:29 p.m. OK MS C++ TESTS 63 264 11878400 2000

remove filters

Back to search problems