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 |
|---|---|---|---|---|---|---|
| 331 | ABBYY Cup 3.0 - Finals (online version) | FINISHED | False | 8100 | 402330623 | July 17, 2013, 3:30 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 235 ) | E2 | Deja Vu | PROGRAMMING | constructive algorithms dp | 3000 |
Everybody knows that we have been living in the Matrix for a long time. And in the new seventh Matrix the world is ruled by beavers. So let's take beaver Neo. Neo has so-called "deja vu" outbursts when he gets visions of events in some places he's been at or is going to be at. Let's examine the phenomenon in more detail. We can say that Neo's city is represented by a directed graph, consisting of n shops and m streets that connect the shops. No two streets connect the same pair of shops (besides, there can't be one street from A to B and one street from B to A). No street connects a shop with itself. As Neo passes some streets, he gets visions. No matter how many times he passes street k , every time he will get the same visions in the same order. A vision is a sequence of shops. We know that Neo is going to get really shocked if he passes the way from some shop a to some shop b , possible coinciding with a , such that the list of visited shops in the real life and in the visions coincide. Suggest beaver Neo such path of non-zero length. Or maybe you can even count the number of such paths modulo 1000000007 (10 9 + 7) ?.. The first line contains integers n and m — the number of shops and the number of streets, correspondingly, 1 ≤ n ≤ 50 , . Next m lines contain the descriptions of the streets in the following format: x i y i k i v 1 v 2 ... v k , where x i and y i (1 ≤ x i , y i ≤ n , x i ≠ y i ) are numbers of shops connected by a street, k i (0 ≤ k i ≤ n ) is the number of visions on the way from x i to y i ; v 1 , v 2 , ..., v k (1 ≤ v i ≤ n ) describe the visions: the numbers of the shops Neo saw. Note that the order of the visions matters. It is guaranteed that the total number of visions on all streets doesn't exceed 10 5 . to get 50 points, you need to find any (not necessarily simple) path of length at most 2· n , that meets the attributes described above (subproblem E1); to get 50 more points, you need to count for each length from 1 to 2· n the |
| ABBYY Cup 3.0 — Finals. Solutions |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 15141614 | HappyNewYearMike | E2 | Dec. 31, 2015, 9:42 p.m. | OK | GNU C++ | TESTS | 67 | 30 | 1024000 | 3000 | |
| 14050779 | 130705009 | E2 | Nov. 4, 2015, 3:14 a.m. | OK | GNU C++ | TESTS | 67 | 30 | 1024000 | 3000 | |
| 16944689 | lnhc1 | E2 | March 26, 2016, 6:21 a.m. | OK | GNU C++ | TESTS | 67 | 30 | 2355200 | 3000 | |
| 4124384 | krijgertje | E2 | July 20, 2013, 9:27 p.m. | OK | GNU C++ | TESTS | 67 | 46 | 6860800 | 3000 | |
| 8493937 | delayyy | E2 | Oct. 31, 2014, 6:01 a.m. | OK | GNU C++ | TESTS | 67 | 60 | 3686400 | 3000 | |
| 8493917 | delayyy | E2 | Oct. 31, 2014, 5:57 a.m. | OK | GNU C++ | TESTS | 67 | 60 | 3686400 | 3000 | |
| 7915885 | superfish | E2 | Sept. 23, 2014, 3:05 a.m. | OK | GNU C++ | TESTS | 67 | 60 | 6041600 | 3000 | |
| 18946679 | Universe_hcy | E2 | July 7, 2016, 8:22 a.m. | OK | GNU C++ | TESTS | 67 | 60 | 24371200 | 3000 | |
| 40989672 | ReaLNero1 | E2 | July 30, 2018, 11:09 p.m. | OK | GNU C++ | TESTS | 67 | 62 | 1024000 | 3000 | |
| 8694236 | yyt16384 | E2 | Nov. 14, 2014, 2:35 p.m. | OK | GNU C++ | TESTS | 67 | 62 | 1126400 | 3000 | |
| 10218443 | -XraY- | E2 | March 9, 2015, 2:26 p.m. | OK | GNU C++0x | TESTS | 67 | 60 | 102400 | 3000 | |
| 8987997 | zhj | E2 | Dec. 5, 2014, 6:21 a.m. | OK | GNU C++0x | TESTS | 67 | 154 | 8294400 | 3000 | |
| 9007141 | zhj | E2 | Dec. 7, 2014, 7:42 a.m. | OK | GNU C++0x | TESTS | 67 | 186 | 56320000 | 3000 | |
| 4245866 | error202 | E2 | Aug. 9, 2013, 5:57 a.m. | OK | GNU C++0x | TESTS | 67 | 468 | 16588800 | 3000 | |
| 17131534 | freebsdx | E2 | April 2, 2016, 2:10 p.m. | OK | GNU C++11 | TESTS | 67 | 30 | 3276800 | 3000 | |
| 11763419 | ftiasch | E2 | June 25, 2015, 4:42 p.m. | OK | GNU C++11 | TESTS | 67 | 62 | 204800 | 3000 | |
| 17129311 | eolv | E2 | April 2, 2016, 11:45 a.m. | OK | GNU C++11 | TESTS | 67 | 92 | 21913600 | 3000 | |
| 18960507 | KFDong | E2 | July 8, 2016, 3:03 a.m. | OK | GNU C++11 | TESTS | 67 | 436 | 2764800 | 3000 | |
| 57820793 | py_ultron | E2 | July 26, 2019, 11:01 p.m. | OK | GNU C++11 | TESTS | 67 | 654 | 6963200 | 3000 | |
| 57895006 | lopare | E2 | July 28, 2019, 1:12 p.m. | OK | GNU C++11 | TESTS | 67 | 686 | 6963200 | 3000 | |
| 39518877 | zhouyuyang | E2 | June 22, 2018, 2:16 p.m. | OK | GNU C++11 | TESTS | 67 | 840 | 6963200 | 3000 | |
| 35860322 | ______u______ | E2 | March 2, 2018, 9:39 p.m. | OK | GNU C++11 | TESTS | 67 | 872 | 34508800 | 3000 | |
| 35860129 | ______n______ | E2 | March 2, 2018, 9:34 p.m. | OK | GNU C++11 | TESTS | 67 | 872 | 34508800 | 3000 | |
| 35859719 | _____i_____ | E2 | March 2, 2018, 9:26 p.m. | OK | GNU C++11 | TESTS | 67 | 872 | 34508800 | 3000 | |
| 23661317 | Ali.Pi | E2 | Jan. 9, 2017, 7:02 a.m. | OK | GNU C++14 | TESTS | 67 | 936 | 34508800 | 3000 |
Back to search problems