Educational Codeforces Round 62 (Rated for 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
1140 Educational Codeforces Round 62 (Rated for Div. 2) FINISHED False 7200 178556099 March 22, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 501 ) G Double Tree PROGRAMMING data structures divide and conquer shortest paths trees 2900

B'You are given a special undirected graph. It consists of 2n vertices numbered from 1 to 2n . The following properties hold for the graph: So, the graph can be represented as two trees having the same structure, and n edges connecting each vertex of the first tree to the corresponding vertex of the second tree. Edges of the graph are weighted. The length of some simple path in the graph is the sum of weights of traversed edges. You are given q queries to this graph; in each query, you are asked to compute the length of the shortest path between some pair of vertices in this graph. Can you answer all of the queries? The first line of the input contains one integer n ( 2 <= n <= 3 cdot 10^5 ). The second line contains n integers w_{1, 2} , w_{3,4} , ..., w_{2n - 1, 2n} ( 1 <= w_{i, i + 1} <= 10^{12} ). These integers describe the weights of the edges connecting odd vertices with even ones. Then n-1 lines follow. i -th line contains four integers x_i , y_i , w_{i, 1} and w_{i, 2} ( 1 <= x_i, y_i <= n , x_i ne y_i , 1 <= w_{i, j} <= 10^{12} ); it describes two edges: one connecting 2x_i - 1 with 2y_i - 1 and having weight w_{i, 1} ; another connecting 2x_i with 2y_i and having weight w_{i, 2} . The next line contains one integer q ( 1 <= q <= 6 cdot 10^5 ) -- the number of queries. Then q lines follow, i -th line contains two integers u_i and v_i ( 1 <= u_i, v_i <= 2n , u_i ne v_i ), describing a query "compute the length of the shortest path between vertices u_i and v_i ". Print q integers, i -th integer should be equal to the answer to the i -th query. The graph in the first test looks like that: '...

Tutorials

Educational Codeforces Round 62 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53465759 luogu_bot5 G April 28, 2019, 9:58 a.m. OK GNU C++11 TESTS 68 842 98611200 2900
60426453 Rikuki G Sept. 12, 2019, 8:06 a.m. OK GNU C++11 TESTS 68 857 103424000 2900
60426186 luogu_bot2 G Sept. 12, 2019, 8:01 a.m. OK GNU C++11 TESTS 68 857 103424000 2900
53465690 luogu_bot3 G April 28, 2019, 9:56 a.m. OK GNU C++11 TESTS 68 889 98611200 2900
52749646 _Dispwnl G April 14, 2019, 1:24 p.m. OK GNU C++11 TESTS 68 1200 265830400 2900
52749409 _Dispwnl G April 14, 2019, 1:18 p.m. OK GNU C++11 TESTS 68 1278 264908800 2900
56370400 hehezhou G July 1, 2019, 3:12 a.m. OK GNU C++11 TESTS 68 1294 249753600 2900
52749338 _Dispwnl G April 14, 2019, 1:16 p.m. OK GNU C++11 TESTS 68 1309 264908800 2900
53458950 Scut82 G April 28, 2019, 5:51 a.m. OK GNU C++11 TESTS 68 1388 637952000 2900
53458952 Scut82 G April 28, 2019, 5:51 a.m. OK GNU C++11 TESTS 68 1481 637952000 2900
52289179 krijgertje G April 3, 2019, 10:53 p.m. OK GNU C++14 TESTS 68 1715 265523200 2900
51816863 Ahmad293 G March 25, 2019, 9:45 a.m. OK GNU C++14 TESTS 68 1809 253952000 2900
51824743 gogairemashvili G March 25, 2019, 1:33 p.m. OK GNU C++14 TESTS 68 1887 177049600 2900
53080075 zstu_MingSD G April 21, 2019, 5:52 a.m. OK GNU C++14 TESTS 68 1949 493260800 2900
51725702 Gromah G March 22, 2019, 6:50 p.m. OK GNU C++14 TESTS 68 2058 277606400 2900
51713161 nhho G March 22, 2019, 4:33 p.m. OK GNU C++14 TESTS 68 2214 267161600 2900
53205917 imaxblue G April 23, 2019, 9:56 p.m. OK GNU C++14 TESTS 68 2308 287539200 2900
51852811 Jian_Ron G March 26, 2019, 9:02 a.m. OK GNU C++14 TESTS 68 2339 97894400 2900
69385657 little_misfortune G Jan. 22, 2020, 10:10 p.m. OK GNU C++14 TESTS 68 2386 330240000 2900
66144398 KeyID G Dec. 1, 2019, 3:53 p.m. OK GNU C++14 TESTS 68 2417 292966400 2900
51777589 Charlene_Hao G March 24, 2019, 12:24 a.m. OK GNU C++17 TESTS 68 1575 96256000 2900
51736261 Elegia G March 23, 2019, 2:41 a.m. OK GNU C++17 TESTS 68 1871 181862400 2900
51729183 Motarack G March 22, 2019, 8:17 p.m. OK GNU C++17 TESTS 68 1871 253849600 2900
51812578 bigbigbigbigcat111 G March 25, 2019, 6:59 a.m. OK GNU C++17 TESTS 68 2121 298496000 2900
51857909 Gio7_7_199 G March 26, 2019, 11:57 a.m. OK GNU C++17 TESTS 68 2230 410419200 2900
51791412 lqs2015 G March 24, 2019, 12:59 p.m. OK GNU C++17 TESTS 68 2230 410419200 2900
53901839 albaniliu G May 9, 2019, 10:42 a.m. OK GNU C++17 TESTS 68 2245 319078400 2900
53901796 albaniliu G May 9, 2019, 10:41 a.m. OK GNU C++17 TESTS 68 2261 319078400 2900
52457454 mu_xia_xiu_ji G April 7, 2019, 12:18 p.m. OK GNU C++17 TESTS 68 2370 256102400 2900
51739664 cerberus97 G March 23, 2019, 5:09 a.m. OK GNU C++17 TESTS 68 2433 296038400 2900
67397684 sansen G Dec. 22, 2019, 1:04 a.m. OK Rust TESTS 68 4601 302694400 2900

remove filters

Back to search problems