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 |
---|---|---|---|---|---|---|
1043 | Codeforces Round 519 by Botan Investments | FINISHED | False | 7200 | 196784723 | Oct. 28, 2018, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4510 ) | D | Mysterious Crime | PROGRAMMING | brute force combinatorics math meet-in-the-middle two pointers | 1700 |
B'Acingel is a small town. There was only one doctor here -- Miss Ada. She was very friendly and nobody has ever said something bad about her, so who could 've expected that Ada will be found dead in her house? Mr Gawry, world-famous detective, is appointed to find the criminal. He asked m neighbours of Ada about clients who have visited her in that unlucky day. Let 's number the clients from 1 to n . Each neighbour 's testimony is a permutation of these numbers, which describes the order in which clients have been seen by the asked neighbour. However, some facts are very suspicious xe2 x80 x93 how it is that, according to some of given permutations, some client has been seen in the morning, while in others he has been seen in the evening? "In the morning some of neighbours must have been sleeping!" -- thinks Gawry -- "and in the evening there 's been too dark to see somebody 's face...". Now he wants to delete some prefix and some suffix (both prefix and suffix can be empty) in each permutation, so that they 'll be non-empty and equal to each other after that -- some of the potential criminals may disappear, but the testimony won 't stand in contradiction to each other. In how many ways he can do it? Two ways are called different if the remaining common part is different. The first line contains two integers n and m ( 1 <= n <= 100 ,000 , 1 <= m <= 10 ) -- the number of suspects and the number of asked neighbors. Each of the next m lines contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ). It is guaranteed that these integers form a correct permutation (that is, each number from 1 to n appears exactly once). Output a single integer denoting the number of ways to delete some prefix and some suffix of each permutation (possibly empty), such that the remaining parts will be equal and non-empty. In the first example, all possible common parts are [1] , [2] , [3] an'... |
Codeforces Round #519 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
45013147 | Gassa | D | Oct. 28, 2018, 4:52 p.m. | OK | D | TESTS | 59 | 311 | 22118400 | 1700 | |
49362978 | PhuongPeu | D | Feb. 2, 2019, 1:44 p.m. | OK | FPC | TESTS | 59 | 187 | 8089600 | 1700 | |
45018230 | bsgnl952 | D | Oct. 28, 2018, 5:27 p.m. | OK | FPC | TESTS | 59 | 218 | 819200 | 1700 | |
45016765 | AHTOH._. | D | Oct. 28, 2018, 5:17 p.m. | OK | FPC | TESTS | 59 | 265 | 16486400 | 1700 | |
45178008 | A.Freeman | D | Nov. 1, 2018, 3:43 p.m. | OK | GNU C11 | TESTS | 59 | 46 | 1228800 | 1700 | |
45177476 | A.Freeman | D | Nov. 1, 2018, 3:28 p.m. | OK | GNU C11 | TESTS | 59 | 46 | 1228800 | 1700 | |
45012411 | freyes | D | Oct. 28, 2018, 4:47 p.m. | OK | GNU C11 | TESTS | 59 | 171 | 4812800 | 1700 | |
45135827 | byh | D | Oct. 31, 2018, 12:18 p.m. | OK | GNU C++11 | TESTS | 59 | 46 | 921600 | 1700 | |
45088151 | gentlelin | D | Oct. 30, 2018, 8:25 a.m. | OK | GNU C++11 | TESTS | 59 | 46 | 4403200 | 1700 | |
48514889 | Rayment | D | Jan. 18, 2019, 2:52 a.m. | OK | GNU C++11 | TESTS | 59 | 46 | 4608000 | 1700 | |
45164254 | LaiAng8086 | D | Nov. 1, 2018, 10:32 a.m. | OK | GNU C++11 | TESTS | 59 | 46 | 5222400 | 1700 | |
45009435 | zhenGG | D | Oct. 28, 2018, 4:29 p.m. | OK | GNU C++11 | TESTS | 59 | 46 | 6451200 | 1700 | |
45040107 | xiezichen | D | Oct. 29, 2018, 9:50 a.m. | OK | GNU C++11 | TESTS | 59 | 46 | 6656000 | 1700 | |
45010365 | LittleFall | D | Oct. 28, 2018, 4:34 p.m. | OK | GNU C++11 | TESTS | 59 | 46 | 6860800 | 1700 | |
45054479 | luogu_bot2 | D | Oct. 29, 2018, 12:08 p.m. | OK | GNU C++11 | TESTS | 59 | 46 | 8601600 | 1700 | |
45076794 | 1247 | D | Oct. 30, 2018, 1:40 a.m. | OK | GNU C++11 | TESTS | 59 | 46 | 8806400 | 1700 | |
45084895 | lujiaju | D | Oct. 30, 2018, 6:39 a.m. | OK | GNU C++11 | TESTS | 59 | 46 | 8806400 | 1700 | |
45067893 | Linkus | D | Oct. 29, 2018, 6:04 p.m. | OK | GNU C++14 | TESTS | 59 | 46 | 4403200 | 1700 | |
45019591 | wleung_bvg | D | Oct. 28, 2018, 5:34 p.m. | OK | GNU C++14 | TESTS | 59 | 61 | 1331200 | 1700 | |
45067890 | mangojunior | D | Oct. 29, 2018, 6:04 p.m. | OK | GNU C++14 | TESTS | 59 | 62 | 30208000 | 1700 | |
45441597 | abhishek_a | D | Nov. 8, 2018, 11:25 a.m. | OK | GNU C++14 | TESTS | 59 | 171 | 5017600 | 1700 | |
45005585 | tataky | D | Oct. 28, 2018, 4:08 p.m. | OK | GNU C++14 | TESTS | 59 | 171 | 5222400 | 1700 | |
53435497 | imbr92 | D | April 27, 2019, 6:54 p.m. | OK | GNU C++14 | TESTS | 59 | 171 | 6963200 | 1700 | |
45210377 | Kooli | D | Nov. 2, 2018, 2:52 p.m. | OK | GNU C++14 | TESTS | 59 | 171 | 7475200 | 1700 | |
45011108 | thelonesailor | D | Oct. 28, 2018, 4:39 p.m. | OK | GNU C++14 | TESTS | 59 | 171 | 7782400 | 1700 | |
45176626 | receed | D | Nov. 1, 2018, 3:03 p.m. | OK | GNU C++14 | TESTS | 59 | 171 | 8601600 | 1700 | |
45070385 | vishalkr07 | D | Oct. 29, 2018, 7:21 p.m. | OK | GNU C++14 | TESTS | 59 | 171 | 8601600 | 1700 | |
45022556 | LiChenKoh | D | Oct. 28, 2018, 7:43 p.m. | OK | GNU C++17 | TESTS | 59 | 46 | 13516800 | 1700 | |
45084606 | 1247 | D | Oct. 30, 2018, 6:26 a.m. | OK | GNU C++17 | TESTS | 59 | 46 | 19558400 | 1700 | |
45037705 | IWantToBePurple | D | Oct. 29, 2018, 8:39 a.m. | OK | GNU C++17 | TESTS | 59 | 46 | 21196800 | 1700 | |
45001200 | FizzyDavid | D | Oct. 28, 2018, 3:50 p.m. | OK | GNU C++17 | TESTS | 59 | 61 | 9625600 | 1700 | |
45053915 | CodingKnight | D | Oct. 29, 2018, 11:55 a.m. | OK | GNU C++17 | TESTS | 59 | 109 | 223641600 | 1700 | |
45053460 | CodingKnight | D | Oct. 29, 2018, 11:44 a.m. | OK | GNU C++17 | TESTS | 59 | 124 | 223641600 | 1700 | |
45071768 | CodingKnight | D | Oct. 29, 2018, 8:12 p.m. | OK | GNU C++17 | TESTS | 59 | 124 | 223641600 | 1700 | |
45072010 | CodingKnight | D | Oct. 29, 2018, 8:21 p.m. | OK | GNU C++17 | TESTS | 59 | 124 | 223641600 | 1700 | |
45060054 | CodingKnight | D | Oct. 29, 2018, 2:25 p.m. | OK | GNU C++17 | TESTS | 59 | 140 | 223641600 | 1700 | |
45071933 | CodingKnight | D | Oct. 29, 2018, 8:18 p.m. | OK | GNU C++17 | TESTS | 59 | 140 | 223641600 | 1700 | |
45008761 | Martynas | D | Oct. 28, 2018, 4:24 p.m. | OK | Go | TESTS | 59 | 109 | 14233600 | 1700 | |
45029088 | vector9x | D | Oct. 29, 2018, 1:46 a.m. | OK | Go | TESTS | 59 | 592 | 14336000 | 1700 | |
45170411 | xwchen | D | Nov. 1, 2018, 12:40 p.m. | OK | Java 8 | TESTS | 59 | 124 | 0 | 1700 | |
45202040 | kumarmonu0522 | D | Nov. 2, 2018, 10:37 a.m. | OK | Java 8 | TESTS | 59 | 139 | 0 | 1700 | |
45022071 | megaspazz | D | Oct. 28, 2018, 7:34 p.m. | OK | Java 8 | TESTS | 59 | 139 | 3686400 | 1700 | |
68343165 | mTvTm | D | Jan. 7, 2020, 5:30 a.m. | OK | Java 8 | TESTS | 59 | 139 | 3891200 | 1700 | |
45201988 | kumarmonu0522 | D | Nov. 2, 2018, 10:35 a.m. | OK | Java 8 | TESTS | 59 | 140 | 0 | 1700 | |
45175142 | xwchen | D | Nov. 1, 2018, 2:23 p.m. | OK | Java 8 | TESTS | 59 | 140 | 0 | 1700 | |
45175057 | xwchen | D | Nov. 1, 2018, 2:21 p.m. | OK | Java 8 | TESTS | 59 | 140 | 0 | 1700 | |
45175001 | xwchen | D | Nov. 1, 2018, 2:19 p.m. | OK | Java 8 | TESTS | 59 | 140 | 0 | 1700 | |
45068444 | wery0 | D | Oct. 29, 2018, 6:21 p.m. | OK | Java 8 | TESTS | 59 | 140 | 0 | 1700 | |
45050976 | Srinivasa_Ramanujan | D | Oct. 29, 2018, 10:41 a.m. | OK | Java 8 | TESTS | 59 | 140 | 0 | 1700 | |
45221933 | Livace | D | Nov. 2, 2018, 10:05 p.m. | OK | JavaScript | TESTS | 59 | 576 | 54784000 | 1700 | |
45030784 | Zvigintsev | D | Oct. 29, 2018, 3:42 a.m. | OK | Mono C# | TESTS | 59 | 217 | 55193600 | 1700 | |
45017898 | Zvigintsev | D | Oct. 28, 2018, 5:25 p.m. | OK | Mono C# | TESTS | 59 | 264 | 51302400 | 1700 | |
45239674 | nastya1199 | D | Nov. 3, 2018, 11:02 a.m. | OK | Mono C# | TESTS | 59 | 312 | 46284800 | 1700 | |
45006419 | azukun | D | Oct. 28, 2018, 4:12 p.m. | OK | Mono C# | TESTS | 59 | 326 | 42188800 | 1700 | |
45027179 | Coder_D | D | Oct. 28, 2018, 11:09 p.m. | OK | Mono C# | TESTS | 59 | 358 | 47411200 | 1700 | |
45013550 | eki | D | Oct. 28, 2018, 4:54 p.m. | OK | Mono C# | TESTS | 59 | 405 | 45568000 | 1700 | |
69224322 | mban259 | D | Jan. 21, 2020, 6:26 a.m. | OK | Mono C# | TESTS | 59 | 420 | 32153600 | 1700 | |
45011980 | awesomeday | D | Oct. 28, 2018, 4:44 p.m. | OK | Mono C# | TESTS | 59 | 436 | 39321600 | 1700 | |
45037463 | tattosha_aptan | D | Oct. 29, 2018, 8:32 a.m. | OK | Mono C# | TESTS | 59 | 436 | 48230400 | 1700 | |
45015270 | vivek17geek | D | Oct. 28, 2018, 5:06 p.m. | OK | Mono C# | TESTS | 59 | 592 | 82636800 | 1700 | |
45207451 | vjudge1 | D | Nov. 2, 2018, 1:28 p.m. | OK | MS C++ | TESTS | 59 | 139 | 13107200 | 1700 | |
45234124 | vjudge3 | D | Nov. 3, 2018, 8:28 a.m. | OK | MS C++ | TESTS | 59 | 140 | 5222400 | 1700 | |
46907383 | vjudge3 | D | Dec. 11, 2018, 2:58 p.m. | OK | MS C++ | TESTS | 59 | 140 | 7270400 | 1700 | |
45242391 | vjudge1 | D | Nov. 3, 2018, 12:13 p.m. | OK | MS C++ | TESTS | 59 | 140 | 7680000 | 1700 | |
45239469 | vjudge5 | D | Nov. 3, 2018, 10:57 a.m. | OK | MS C++ | TESTS | 59 | 155 | 7884800 | 1700 | |
46922229 | vjudge5 | D | Dec. 12, 2018, 5:54 a.m. | OK | MS C++ | TESTS | 59 | 156 | 819200 | 1700 | |
45671441 | vjudge4 | D | Nov. 13, 2018, 10:54 a.m. | OK | MS C++ | TESTS | 59 | 156 | 5529600 | 1700 | |
46907187 | vjudge3 | D | Dec. 11, 2018, 2:52 p.m. | OK | MS C++ | TESTS | 59 | 156 | 7680000 | 1700 | |
45131310 | vjudge4 | D | Oct. 31, 2018, 10:29 a.m. | OK | MS C++ | TESTS | 59 | 156 | 8294400 | 1700 | |
49300921 | xiaotianyao | D | Feb. 1, 2019, 2:56 a.m. | OK | MS C++ | TESTS | 59 | 156 | 92160000 | 1700 | |
54476780 | sikly | D | May 22, 2019, 8:56 a.m. | OK | MS C++ 2017 | TESTS | 59 | 280 | 10444800 | 1700 | |
45073148 | Arcadii | D | Oct. 29, 2018, 9:09 p.m. | OK | PascalABC.NET | TESTS | 59 | 499 | 6758400 | 1700 | |
45024887 | mayakin | D | Oct. 28, 2018, 8:58 p.m. | OK | PHP | TESTS | 59 | 685 | 27340800 | 1700 | |
45105483 | pajenegod | D | Oct. 30, 2018, 3:55 p.m. | OK | PyPy 2 | TESTS | 59 | 234 | 24268800 | 1700 | |
45033187 | p4thet1c | D | Oct. 29, 2018, 5:55 a.m. | OK | PyPy 2 | TESTS | 59 | 280 | 22323200 | 1700 | |
45024310 | _kawaii_neko_ | D | Oct. 28, 2018, 8:34 p.m. | OK | PyPy 2 | TESTS | 59 | 295 | 27955200 | 1700 | |
45007768 | astrom.lars | D | Oct. 28, 2018, 4:19 p.m. | OK | PyPy 2 | TESTS | 59 | 311 | 18739200 | 1700 | |
45023528 | aeternalis1 | D | Oct. 28, 2018, 8:09 p.m. | OK | PyPy 2 | TESTS | 59 | 311 | 25292800 | 1700 | |
45140822 | akshay125 | D | Oct. 31, 2018, 2:25 p.m. | OK | PyPy 2 | TESTS | 59 | 311 | 42188800 | 1700 | |
45104899 | pajenegod | D | Oct. 30, 2018, 3:37 p.m. | OK | PyPy 2 | TESTS | 59 | 342 | 24166400 | 1700 | |
45031299 | sarthakmanna | D | Oct. 29, 2018, 4:14 a.m. | OK | PyPy 2 | TESTS | 59 | 342 | 28057600 | 1700 | |
45005743 | dukati8 | D | Oct. 28, 2018, 4:09 p.m. | OK | PyPy 2 | TESTS | 59 | 358 | 22323200 | 1700 | |
45038851 | pajenegod | D | Oct. 29, 2018, 9:12 a.m. | OK | PyPy 2 | TESTS | 59 | 389 | 27238400 | 1700 | |
53042029 | syzymon | D | April 20, 2019, 10:23 a.m. | OK | PyPy 3 | TESTS | 59 | 295 | 33689600 | 1700 | |
45033220 | Pratik_2106 | D | Oct. 29, 2018, 5:56 a.m. | OK | PyPy 3 | TESTS | 59 | 639 | 23654400 | 1700 | |
45113247 | Bamal | D | Oct. 30, 2018, 7:43 p.m. | OK | PyPy 3 | TESTS | 59 | 654 | 28876800 | 1700 | |
45068247 | Kirundel | D | Oct. 29, 2018, 6:16 p.m. | OK | PyPy 3 | TESTS | 59 | 670 | 15052800 | 1700 | |
45017690 | araragitsukihi | D | Oct. 28, 2018, 5:24 p.m. | OK | PyPy 3 | TESTS | 59 | 670 | 16896000 | 1700 | |
45016621 | Praxis | D | Oct. 28, 2018, 5:16 p.m. | OK | PyPy 3 | TESTS | 59 | 670 | 24268800 | 1700 | |
45024426 | jlee | D | Oct. 28, 2018, 8:40 p.m. | OK | PyPy 3 | TESTS | 59 | 670 | 31846400 | 1700 | |
45035690 | bergus | D | Oct. 29, 2018, 7:33 a.m. | OK | PyPy 3 | TESTS | 59 | 685 | 23859200 | 1700 | |
45035069 | bergus | D | Oct. 29, 2018, 7:10 a.m. | OK | PyPy 3 | TESTS | 59 | 686 | 23040000 | 1700 | |
45024373 | AkshajK | D | Oct. 28, 2018, 8:37 p.m. | OK | PyPy 3 | TESTS | 59 | 686 | 31846400 | 1700 | |
45005728 | nwi | D | Oct. 28, 2018, 4:09 p.m. | OK | Python 2 | TESTS | 59 | 810 | 53760000 | 1700 | |
45018863 | Venia | D | Oct. 28, 2018, 5:31 p.m. | OK | Python 3 | TESTS | 59 | 670 | 26316800 | 1700 | |
45019639 | gosipov | D | Oct. 28, 2018, 5:34 p.m. | OK | Python 3 | TESTS | 59 | 872 | 26726400 | 1700 | |
45305964 | mart.slaaf | D | Nov. 4, 2018, 9:51 p.m. | OK | Python 3 | TESTS | 59 | 982 | 11878400 | 1700 | |
45223068 | ccs3326 | D | Nov. 2, 2018, 11:42 p.m. | OK | Python 3 | TESTS | 59 | 997 | 13824000 | 1700 | |
45068506 | Kirundel | D | Oct. 29, 2018, 6:22 p.m. | OK | Python 3 | TESTS | 59 | 997 | 13824000 | 1700 | |
45478560 | llbra8z | D | Nov. 9, 2018, 1:36 p.m. | OK | Python 3 | TESTS | 59 | 998 | 13824000 | 1700 | |
45068381 | Kirundel | D | Oct. 29, 2018, 6:19 p.m. | OK | Python 3 | TESTS | 59 | 998 | 13824000 | 1700 | |
45014965 | yakamoto | D | Oct. 28, 2018, 5:04 p.m. | OK | Scala | TESTS | 59 | 623 | 0 | 1700 | |
45009830 | amirrr | D | Oct. 28, 2018, 4:31 p.m. | OK | Scala | TESTS | 59 | 717 | 0 | 1700 | |
46198565 | gazaan | D | Nov. 25, 2018, 9:51 a.m. | OK | Scala | TESTS | 59 | 764 | 10547200 | 1700 |
Back to search problems