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 |
|---|---|---|---|---|---|---|
| 917 | Codeforces Round 459 (Div. 1) | FINISHED | False | 7200 | 259169123 | Jan. 29, 2018, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 185 ) | E | Upside Down | PROGRAMMING | data structures string suffix structures strings trees | 3000 |
As we all know, Eleven has special abilities. Thus, Hopper convinced her to close the gate to the Upside Down World with her mind. Upside down monsters like to move between the worlds, so they are going to attack Hopper and Eleven in order to make them stop. The monsters live in the vines. The vines form a tree with n vertices, numbered from 1 through n . There's a lowercase English letter written in each tunnel (edge). Upside down is a magical world. There are m types of monsters in upside down, numbered from 1 through m . Each type of monster has a special word that gives them powers. The special word of type i is s i . There are q monsters in upside down. Each one is at a junction (vertex) and is going to some other junction. If monster of type k goes from junction i to junction j , the power it gains is the number of times it sees its special world ( s k ) consecutively in the tunnels. More formally: If f ( i , j ) is the string we get when we concatenate the letters written in the tunnels on the shortest path from i to j , then the power the monster gains is the number of occurrences of s k in f ( i , j ) . Hopper and Eleven want to get prepared, so for each monster, they want to know the power the monster gains after moving. The first line of input contains three integers, n , m and q ( 2 ≤ n ≤ 10 5 , 1 ≤ m , q ≤ 10 5 ). The next n - 1 lines contain the tunnels (edges). Each line contains two integers v and u ( 1 ≤ v , u ≤ n , v ≠ u ) and a lowercase English letter c , meaning there's a tunnel connecting junctions v and u written c in it. It is guaranteed that the given graph is a tree. The next m lines contain the special words. i -th line of them contains a single string s i ( 1 ≤ | s i | ≤ 10 5 ), consisting of lowercase English letters. It is guaranteed that | s 1 | + | s 2 | + ... + | s m | ≤ 10 5 ). The next q lines contain the monsters. Each line contains three integers i , j and k ( 1 ≤ i , j ≤ n , i ≠ j , 1 ≤ k ≤ m ), meaning a monster of ty |
| Codeforces Round #459 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 36424567 | Blue233333 | E | March 20, 2018, 4:35 a.m. | OK | GNU C++ | TESTS | 118 | 592 | 246784000 | 3000 | |
| 36423948 | Blue233333 | E | March 20, 2018, 3:27 a.m. | OK | GNU C++ | TESTS | 118 | 623 | 246784000 | 3000 | |
| 40978493 | ReaLNero1 | E | July 30, 2018, 4:39 p.m. | OK | GNU C++ | TESTS | 118 | 639 | 243302400 | 3000 | |
| 38113167 | xuqijie | E | May 11, 2018, 11:55 a.m. | OK | GNU C++ | TESTS | 118 | 810 | 303616000 | 3000 | |
| 36340500 | zxyhh | E | March 17, 2018, 3:03 a.m. | OK | GNU C++ | TESTS | 118 | 951 | 303206400 | 3000 | |
| 35758735 | wanglichao1121 | E | Feb. 27, 2018, 10:51 a.m. | OK | GNU C++ | TESTS | 118 | 966 | 301772800 | 3000 | |
| 35549686 | Passenger | E | Feb. 21, 2018, 2:04 p.m. | OK | GNU C++ | TESTS | 118 | 1060 | 139468800 | 3000 | |
| 37025789 | scutvj_1 | E | April 6, 2018, 4:06 p.m. | OK | GNU C++11 | TESTS | 118 | 826 | 303206400 | 3000 | |
| 38447211 | 99hgz | E | May 20, 2018, 4:40 a.m. | OK | GNU C++11 | TESTS | 118 | 888 | 471244800 | 3000 | |
| 38446515 | 99hgz | E | May 20, 2018, 3:47 a.m. | OK | GNU C++11 | TESTS | 118 | 935 | 471244800 | 3000 | |
| 43876860 | _Happy_New_Year_ | E | Oct. 6, 2018, 2:28 a.m. | OK | GNU C++11 | TESTS | 118 | 982 | 194355200 | 3000 | |
| 50717526 | cuizhuyefei | E | March 3, 2019, 7:59 a.m. | OK | GNU C++11 | TESTS | 118 | 1029 | 264704000 | 3000 | |
| 34918736 | lukaminer | E | Feb. 4, 2018, 9:15 a.m. | OK | GNU C++11 | TESTS | 118 | 1060 | 138035200 | 3000 | |
| 34838013 | Georgia_001 | E | Feb. 2, 2018, 12:36 p.m. | OK | GNU C++11 | TESTS | 118 | 1060 | 138035200 | 3000 | |
| 34944899 | pecen3 | E | Feb. 5, 2018, 1:12 p.m. | OK | GNU C++11 | TESTS | 118 | 1138 | 138035200 | 3000 | |
| 38941825 | FizzyDavicl | E | June 4, 2018, 10:42 a.m. | OK | GNU C++11 | TESTS | 118 | 1247 | 158515200 | 3000 | |
| 34940535 | MikeMyrzanov | E | Feb. 5, 2018, 10:13 a.m. | OK | GNU C++11 | TESTS | 118 | 1263 | 347955200 | 3000 | |
| 35924829 | Mohammad.Sj | E | March 4, 2018, 1:56 p.m. | OK | GNU C++14 | TESTS | 118 | 842 | 300953600 | 3000 | |
| 59829841 | vjudge5 | E | Aug. 31, 2019, 9:54 p.m. | OK | GNU C++14 | TESTS | 118 | 888 | 365670400 | 3000 | |
| 59830050 | vjudge2 | E | Aug. 31, 2019, 10:04 p.m. | OK | GNU C++14 | TESTS | 118 | 951 | 365670400 | 3000 | |
| 36631969 | jslijin | E | March 26, 2018, 4:56 a.m. | OK | GNU C++14 | TESTS | 118 | 982 | 302387200 | 3000 | |
| 37321561 | TadijaSebez | E | April 14, 2018, 9:55 a.m. | OK | GNU C++14 | TESTS | 118 | 1029 | 129228800 | 3000 | |
| 37387459 | strongshahruz | E | April 17, 2018, 5:42 a.m. | OK | GNU C++14 | TESTS | 118 | 1044 | 139468800 | 3000 | |
| 59829755 | vjudge5 | E | Aug. 31, 2019, 9:50 p.m. | OK | GNU C++14 | TESTS | 118 | 1044 | 366080000 | 3000 | |
| 59830029 | vjudge5 | E | Aug. 31, 2019, 10:03 p.m. | OK | GNU C++14 | TESTS | 118 | 1045 | 365670400 | 3000 | |
| 35196233 | sazzadrume | E | Feb. 13, 2018, 10:21 a.m. | OK | GNU C++14 | TESTS | 118 | 1060 | 138035200 | 3000 | |
| 59829685 | vjudge5 | E | Aug. 31, 2019, 9:47 p.m. | OK | GNU C++14 | TESTS | 118 | 1060 | 366182400 | 3000 | |
| 42326403 | lixinyue | E | Sept. 1, 2018, 5:59 a.m. | OK | GNU C++17 | TESTS | 118 | 2354 | 377241600 | 3000 | |
| 34965560 | mmaxio | E | Feb. 6, 2018, 9 a.m. | OK | Java 8 | TESTS | 118 | 1606 | 239206400 | 3000 | |
| 35469151 | Los_Angelos_Laycurse | E | Feb. 19, 2018, 11:43 a.m. | OK | MS C++ | TESTS | 118 | 2152 | 122470400 | 3000 |
Back to search problems