Codeforces Round 285 (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
504 Codeforces Round 285 (Div. 1) FINISHED False 7200 316558804 Jan. 12, 2015, 9 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 954 ) E Misha and LCP on Tree PROGRAMMING binary search dfs and similar hashing string suffix structures trees 3000

B"Misha has a tree with characters written on the vertices. He can choose two vertices s and t of this tree and write down characters of vertices lying on a path from s to t. We'll say that such string corresponds to pair (s, xe2 x80 x89t). Misha has m queries of type: you are given 4 vertices a, b, c, d; you need to find the largest common prefix of the strings that correspond to pairs (a, xe2 x80 x89b) and (c, xe2 x80 x89d). Your task is to help him. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300 xe2 x80 x89000) -- the number of vertices in the tree. Next follows a line consisting of n small English letters. The i-th character of the string corresponds to the character written on the i-th vertex. Next n xe2 x80 x89- xe2 x80 x891 lines contain information about edges. An edge is defined by a pair of integers u, v (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89u, xe2 x80 x89v xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, u xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89v), separated by spaces. The next line contains integer m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891 xe2 x80 x89000 xe2 x80 x89000) -- the number of queries. Next m lines contain information about queries. A query is defined by four integers a, b, c, d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b, xe2 x80 x89c, xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), separated by spaces. For each query print the length of the largest common prefix on a separate line."...

Tutorials

15743

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
23242684 SirNickolas E Dec. 23, 2016, 7:51 a.m. OK D TESTS 18 7020 321945600 3000
23242416 SirNickolas E Dec. 23, 2016, 7:35 a.m. OK D TESTS 18 7502 315494400 3000
23242311 SirNickolas E Dec. 23, 2016, 7:29 a.m. OK D TESTS 18 7861 406528000 3000
9416756 Alex_2oo8 E Jan. 12, 2015, 1:07 p.m. OK FPC TESTS 18 7971 397209600 3000
15505629 EZ_zby E Jan. 23, 2016, 12:32 a.m. OK FPC TESTS 18 7986 396902400 3000
18490850 SandTea E June 15, 2016, 7:47 a.m. OK GNU C++ TESTS 18 1450 35840000 3000
18490882 vjtest E June 15, 2016, 7:48 a.m. OK GNU C++ TESTS 18 1465 35840000 3000
40987458 ReaLNero1 E July 30, 2018, 9:16 p.m. OK GNU C++ TESTS 18 1684 33792000 3000
18451549 vjtest E June 14, 2016, 12:58 p.m. OK GNU C++ TESTS 18 1699 67276800 3000
18451450 vjudge1 E June 14, 2016, 12:53 p.m. OK GNU C++ TESTS 18 1777 67276800 3000
18490782 SandTea E June 15, 2016, 7:44 a.m. OK GNU C++ TESTS 18 1778 35840000 3000
32329567 Scut82 E Nov. 15, 2017, 11:09 a.m. OK GNU C++ TESTS 18 1871 119603200 3000
42348103 Scut82 E Sept. 2, 2018, 1 a.m. OK GNU C++ TESTS 18 1933 168243200 3000
32519603 Scut82 E Nov. 21, 2017, 8:28 a.m. OK GNU C++ TESTS 18 2012 119705600 3000
18820293 vjtest E June 30, 2016, 9:03 a.m. OK GNU C++ TESTS 18 2089 27955200 3000
9420508 FatalEagle E Jan. 13, 2015, 12:24 a.m. OK GNU C++0x TESTS 18 1840 37683200 3000
10101806 savinov E March 1, 2015, 10:05 p.m. OK GNU C++0x TESTS 18 3010 327987200 3000
10101786 savinov E March 1, 2015, 10:01 p.m. OK GNU C++0x TESTS 18 3041 327987200 3000
10101797 savinov E March 1, 2015, 10:03 p.m. OK GNU C++0x TESTS 18 3151 327987200 3000
10101775 savinov E March 1, 2015, 10 p.m. OK GNU C++0x TESTS 18 3213 327987200 3000
10101793 savinov E March 1, 2015, 10:02 p.m. OK GNU C++0x TESTS 18 3462 327987200 3000
9413318 anta E Jan. 12, 2015, 10:23 a.m. OK GNU C++0x TESTS 18 3525 42496000 3000
9415160 Shik E Jan. 12, 2015, 11:22 a.m. OK GNU C++0x TESTS 18 3759 59904000 3000
9411256 atetubou E Jan. 12, 2015, 9:41 a.m. OK GNU C++0x TESTS 18 4258 140083200 3000
9443621 atetubou E Jan. 16, 2015, 1:18 p.m. OK GNU C++0x TESTS 18 4710 110080000 3000
68714404 Starlit E Jan. 13, 2020, 1:59 p.m. OK GNU C++11 TESTS 18 1404 445132800 3000
18778800 _noname E June 29, 2016, 7:20 a.m. OK GNU C++11 TESTS 18 1606 33792000 3000
55809583 yyyz04 E June 20, 2019, 2:38 a.m. OK GNU C++11 TESTS 18 1981 172748800 3000
64508113 cjy2003 E Nov. 8, 2019, 7:46 a.m. OK GNU C++11 TESTS 18 2042 93184000 3000
18779051 _noname E June 29, 2016, 7:39 a.m. OK GNU C++11 TESTS 18 2043 27955200 3000
18778839 _noname E June 29, 2016, 7:23 a.m. OK GNU C++11 TESTS 18 2090 27955200 3000
64507724 cjy2003 E Nov. 8, 2019, 7:35 a.m. OK GNU C++11 TESTS 18 2090 88371200 3000
63379298 Winniechen E Oct. 25, 2019, 11:59 a.m. OK GNU C++11 TESTS 18 2230 168652800 3000
63379224 Apollochen E Oct. 25, 2019, 11:58 a.m. OK GNU C++11 TESTS 18 2230 168652800 3000
48799958 Durant_Lee E Jan. 23, 2019, 2 p.m. OK GNU C++11 TESTS 18 2261 103936000 3000
36937754 g1n0st E April 4, 2018, 2:47 a.m. OK GNU C++14 TESTS 18 1933 219238400 3000
64349135 yhx-12243 E Nov. 6, 2019, 7:36 a.m. OK GNU C++14 TESTS 18 2261 73625600 3000
66219937 PinkRabbit E Dec. 3, 2019, 10:28 a.m. OK GNU C++14 TESTS 18 2262 41369600 3000
64529151 fstqaq E Nov. 8, 2019, 2:47 p.m. OK GNU C++14 TESTS 18 2417 224563200 3000
64529360 fstqaq E Nov. 8, 2019, 2:52 p.m. OK GNU C++14 TESTS 18 2480 217395200 3000
53091762 vjudge5 E April 21, 2019, 11:34 a.m. OK GNU C++14 TESTS 18 2542 54988800 3000
43858702 bendazsaropaeen E Oct. 5, 2018, 4:22 p.m. OK GNU C++14 TESTS 18 2652 47104000 3000
64859149 Created_equal E Nov. 14, 2019, 1:53 a.m. OK GNU C++14 TESTS 18 3072 94617600 3000
46674759 Narh E Dec. 6, 2018, 9:07 a.m. OK GNU C++14 TESTS 18 3135 106700800 3000
64529072 fstqaq E Nov. 8, 2019, 2:45 p.m. OK GNU C++14 TESTS 18 3275 224563200 3000
66899332 Fulisike E Dec. 15, 2019, 4:27 a.m. OK GNU C++17 TESTS 18 3883 34713600 3000
52886634 qiyue E April 17, 2019, 5:46 a.m. OK GNU C++17 TESTS 18 4430 71372800 3000
62403531 ruo E Oct. 12, 2019, 8:13 a.m. OK GNU C++17 TESTS 18 5538 223232000 3000
48484727 Shayan.P E Jan. 17, 2019, 7:51 a.m. OK GNU C++17 TESTS 18 5662 149708800 3000
65461694 jiangly E Nov. 21, 2019, 2:46 a.m. OK GNU C++17 TESTS 18 5725 102707200 3000
48484578 Shayan.P E Jan. 17, 2019, 7:47 a.m. OK GNU C++17 TESTS 18 5927 149606400 3000
62404181 ruo E Oct. 12, 2019, 8:25 a.m. OK GNU C++17 TESTS 18 6130 109772800 3000
59404330 ivan100sic E Aug. 24, 2019, 1:19 p.m. OK GNU C++17 TESTS 18 6536 97689600 3000
53009523 luogu_bot1 E April 19, 2019, 11:24 a.m. OK GNU C++17 TESTS 18 6551 65126400 3000
65890872 CMXRYNP E Nov. 28, 2019, 3:12 a.m. OK GNU C++17 TESTS 18 6676 141516800 3000
9416153 uwi E Jan. 12, 2015, 12:14 p.m. OK Java 7 TESTS 18 5662 211763200 3000
9497257 mmaxio E Jan. 22, 2015, 1:09 a.m. OK Java 8 TESTS 18 7285 128614400 3000
15142656 HappyNewYearMike E Dec. 31, 2015, 10:38 p.m. OK Java 8 TESTS 18 7410 128716800 3000
9497254 mmaxio E Jan. 22, 2015, 1:08 a.m. OK Java 8 TESTS 18 7800 129536000 3000
10209653 Los_Angelos_Laycurse E March 8, 2015, 3:56 p.m. OK MS C++ TESTS 18 5069 140492800 3000
9415016 ainta E Jan. 12, 2015, 10:59 a.m. OK MS C++ TESTS 18 6161 95436800 3000
9428633 contest123 E Jan. 14, 2015, 10:10 a.m. OK MS C++ TESTS 18 6442 95436800 3000
23189607 amethyst0 E Dec. 21, 2016, 1:56 a.m. OK MS C++ TESTS 18 7409 136908800 3000

remove filters

Back to search problems