Codeforces Round 635 (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
1336 Codeforces Round 635 (Div. 1) FINISHED False 9000 150391511 April 15, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 232 ) F Journey PROGRAMMING data structures divide and conquer graphs trees 3600

B'In the wilds far beyond lies the Land of Sacredness, which can be viewed as a tree -- connected undirected graph consisting of n nodes and n-1 edges. The nodes are numbered from 1 to n . There are m travelers attracted by its prosperity and beauty. Thereupon, they set off their journey on this land. The i -th traveler will travel along the shortest path from s_i to t_i . In doing so, they will go through all edges in the shortest path from s_i to t_i , which is unique in the tree. During their journey, the travelers will acquaint themselves with the others. Some may even become friends. To be specific, the i -th traveler and the j -th traveler will become friends if and only if there are at least k edges that both the i -th traveler and the j -th traveler will go through. Your task is to find out the number of pairs of travelers (i, j) satisfying the following conditions: The first line contains three integers n , m and k ( 2 <= n, m <= 1.5 cdot 10^5 , 1 <= k <= n ). Each of the next n-1 lines contains two integers u and v ( 1 <= u,v <= n ), denoting there is an edge between u and v . The i -th line of the next m lines contains two integers s_i and t_i ( 1 <= s_i,t_i <= n , s_i neq t_i ), denoting the starting point and the destination of i -th traveler. It is guaranteed that the given edges form a tree. The only line contains a single integer -- the number of pairs of travelers satisfying the given conditions. In the first example there are 4 pairs satisfying the given requirements: (1,2) , (1,3) , (1,4) , (3,4) . '...

Tutorials

Codeforces Round #635 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77063327 Backseat-Stargazer F April 17, 2020, 10:51 a.m. OK GNU C++11 TESTS 74 467 112128000 3600
77045507 zxyoi F April 17, 2020, 7:22 a.m. OK GNU C++11 TESTS 74 576 103424000 3600
77063198 Backseat-Stargazer F April 17, 2020, 10:50 a.m. OK GNU C++11 TESTS 74 592 112128000 3600
77033577 Frame233 F April 17, 2020, 4:20 a.m. OK GNU C++11 TESTS 74 623 121241600 3600
76918990 EternalAlexander F April 16, 2020, 1:55 a.m. OK GNU C++11 TESTS 74 732 200294400 3600
77168715 dqa2020 F April 18, 2020, 10:15 a.m. OK GNU C++11 TESTS 74 904 43212800 3600
77253400 Lagoon_ F April 19, 2020, 8:07 a.m. OK GNU C++11 TESTS 74 904 60416000 3600
77044314 huanggs F April 17, 2020, 7:07 a.m. OK GNU C++11 TESTS 74 1060 966348800 3600
77044242 A_Fan_of_Sooke F April 17, 2020, 7:06 a.m. OK GNU C++11 TESTS 74 1060 966348800 3600
77768038 yasugongshang F April 23, 2020, 2:33 p.m. OK GNU C++11 TESTS 74 1154 527052800 3600
77311120 nw_cpp F April 19, 2020, 8:31 p.m. OK GNU C++14 TESTS 74 670 200499200 3600
76980422 idxcalcal F April 16, 2020, 2:14 p.m. OK GNU C++14 TESTS 74 717 159948800 3600
77284973 hwytxzc2 F April 19, 2020, 2:34 p.m. OK GNU C++14 TESTS 74 748 200499200 3600
77670778 nealchen F April 22, 2020, 4:04 p.m. OK GNU C++14 TESTS 74 780 143052800 3600
77990516 RobeZH F April 25, 2020, 7:50 a.m. OK GNU C++14 TESTS 74 795 62464000 3600
77990716 RobeZH F April 25, 2020, 7:52 a.m. OK GNU C++14 TESTS 74 810 61849600 3600
77229829 krijgertje F April 19, 2020, 12:07 a.m. OK GNU C++14 TESTS 74 811 76390400 3600
77229072 CN_zwang2002 F April 18, 2020, 11:33 p.m. OK GNU C++14 TESTS 74 841 174387200 3600
77271231 yhx-12243 F April 19, 2020, 11:54 a.m. OK GNU C++14 TESTS 74 841 293273600 3600
76997010 abeker F April 16, 2020, 4:42 p.m. OK GNU C++14 TESTS 74 858 92467200 3600
77376643 hjk1030 F April 20, 2020, 3:08 p.m. OK GNU C++17 TESTS 74 592 167424000 3600
77063737 amethyst0 F April 17, 2020, 10:55 a.m. OK GNU C++17 TESTS 74 826 302796800 3600
77409035 yhchang3 F April 20, 2020, 8:28 p.m. OK GNU C++17 TESTS 74 998 83046400 3600
77127766 marwa_gamal5 F April 17, 2020, 9:51 p.m. OK GNU C++17 TESTS 74 1029 49868800 3600
76966006 Jayce132 F April 16, 2020, 11:52 a.m. OK GNU C++17 TESTS 74 1107 159948800 3600
77658081 user202729_ F April 22, 2020, 2:10 p.m. OK GNU C++17 TESTS 74 1201 38400000 3600
77137660 emma F April 18, 2020, 3:09 a.m. OK GNU C++17 TESTS 74 1575 196300800 3600
77011511 _Ash__ F April 16, 2020, 7:25 p.m. OK GNU C++17 TESTS 74 1669 96256000 3600
76902541 Radewoosh F April 15, 2020, 7:11 p.m. OK GNU C++17 TESTS 74 1902 194048000 3600
76902682 Radewoosh F April 15, 2020, 7:13 p.m. OK GNU C++17 TESTS 74 2106 369356800 3600
77033653 Frame233 F April 17, 2020, 4:21 a.m. OK GNU C++17 (64) TESTS 74 795 134860800 3600
77028666 ecnerwala F April 17, 2020, 2:19 a.m. OK GNU C++17 (64) TESTS 74 826 94310400 3600
76990129 vjudge3 F April 16, 2020, 3:35 p.m. OK GNU C++17 (64) TESTS 74 857 217088000 3600
77029817 ecnerwala F April 17, 2020, 2:51 a.m. OK GNU C++17 (64) TESTS 74 858 81817600 3600
77034243 iefnah06 F April 17, 2020, 4:34 a.m. OK GNU C++17 (64) TESTS 74 872 76595200 3600
77028475 ecnerwala F April 17, 2020, 2:13 a.m. OK GNU C++17 (64) TESTS 74 966 95436800 3600
77034335 iefnah06 F April 17, 2020, 4:36 a.m. OK GNU C++17 (64) TESTS 74 1013 76595200 3600
77203191 aid F April 18, 2020, 4:11 p.m. OK GNU C++17 (64) TESTS 74 1481 132096000 3600
77137910 emma F April 18, 2020, 3:15 a.m. OK GNU C++17 (64) TESTS 74 1684 278016000 3600
76904132 Benq F April 15, 2020, 8:09 p.m. OK GNU C++17 (64) TESTS 74 2652 311808000 3600

remove filters

Back to search problems