Tinkoff Challenge - Elimination Round

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
793 Tinkoff Challenge - Elimination Round FINISHED False 7200 283439723 April 23, 2017, 4:45 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 304 ) E Problem of offices PROGRAMMING constructive algorithms dfs and similar dp trees 2800

Earlier, when there was no Internet, each bank had a lot of offices all around Bankopolis, and it caused a lot of problems. Namely, each day the bank had to collect cash from all the offices. Once Oleg the bank client heard a dialogue of two cash collectors. Each day they traveled through all the departments and offices of the bank following the same route every day. The collectors started from the central department and moved between some departments or between some department and some office using special roads. Finally, they returned to the central department. The total number of departments and offices was n , the total number of roads was n - 1 . In other words, the special roads system was a rooted tree in which the root was the central department, the leaves were offices, the internal vertices were departments. The collectors always followed the same route in which the number of roads was minimum possible, that is 2 n - 2 . One of the collectors said that the number of offices they visited between their visits to offices a and then b (in the given order) is equal to the number of offices they visited between their visits to offices b and then a (in this order). The other collector said that the number of offices they visited between their visits to offices c and then d (in this order) is equal to the number of offices they visited between their visits to offices d and then c (in this order). The interesting part in this talk was that the shortest path (using special roads only) between any pair of offices among a , b , c and d passed through the central department . Given the special roads map and the indexes of offices a , b , c and d , determine if the situation described by the collectors was possible, or not. The first line contains single integer n ( 5 ≤ n ≤ 5000 ) — the total number of offices and departments. The departments and offices are numbered from 1 to n , the central office has index 1 . The second line contains four integers a , b ,

Tutorials

51685

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
27226399 AkaneSasu E May 20, 2017, 1:50 a.m. OK GNU C++ TESTS 44 15 0 2800
26925344 vjudge1 E May 7, 2017, 2:26 p.m. OK GNU C++ TESTS 44 15 102400 2800
26976078 ziqian E May 9, 2017, 2:55 p.m. OK GNU C++ TESTS 44 15 204800 2800
26678758 jzymts E April 26, 2017, 9:22 a.m. OK GNU C++ TESTS 44 15 2048000 2800
26782275 xzyxzy E May 1, 2017, 9:08 a.m. OK GNU C++ TESTS 44 15 2252800 2800
26636681 chrt E April 24, 2017, 9:17 a.m. OK GNU C++ TESTS 44 15 2252800 2800
26629085 m.levin E April 23, 2017, 9:37 p.m. OK GNU C++ TESTS 44 15 2252800 2800
26624659 LoneFox E April 23, 2017, 6:42 p.m. OK GNU C++ TESTS 44 15 2252800 2800
26621237 Nicolas16 E April 23, 2017, 6:15 p.m. OK GNU C++ TESTS 44 15 2252800 2800
26656340 jasonvictoryan E April 25, 2017, 8:59 a.m. OK GNU C++ TESTS 44 15 2355200 2800
27312886 Manchery E May 24, 2017, 2:32 a.m. OK GNU C++11 TESTS 44 15 0 2800
26891912 LIN452 E May 6, 2017, 3:15 a.m. OK GNU C++11 TESTS 44 15 102400 2800
26887633 12iq E May 5, 2017, 7:15 p.m. OK GNU C++11 TESTS 44 15 204800 2800
26873322 Kmcode E May 5, 2017, 5:26 a.m. OK GNU C++11 TESTS 44 15 204800 2800
34651674 zhouyuyang E Jan. 29, 2018, 6:12 a.m. OK GNU C++11 TESTS 44 15 2150400 2800
26704305 reku E April 27, 2017, 2:06 p.m. OK GNU C++11 TESTS 44 15 2252800 2800
26703645 wyc91543 E April 27, 2017, 1:48 p.m. OK GNU C++11 TESTS 44 15 2252800 2800
26675613 otrecnoc E April 26, 2017, 4:17 a.m. OK GNU C++11 TESTS 44 15 2252800 2800
26660536 eddy1021 E April 25, 2017, 12:43 p.m. OK GNU C++11 TESTS 44 15 2252800 2800
26652519 ujzwt4it E April 25, 2017, 4 a.m. OK GNU C++11 TESTS 44 15 2252800 2800
26888902 spencer E May 5, 2017, 9:09 p.m. OK GNU C++14 TESTS 44 15 102400 2800
27789773 atatomir E June 15, 2017, 8:45 a.m. OK GNU C++14 TESTS 44 15 307200 2800
27669686 I_Love_Umirzhanova_Amina E June 8, 2017, 11:10 a.m. OK GNU C++14 TESTS 44 15 307200 2800
26901491 albert96 E May 6, 2017, 12:46 p.m. OK GNU C++14 TESTS 44 15 409600 2800
26706161 krijgertje E April 27, 2017, 3:59 p.m. OK GNU C++14 TESTS 44 15 2048000 2800
33453803 ImpcO E Dec. 20, 2017, 11:30 a.m. OK GNU C++14 TESTS 44 15 2252800 2800
33453732 ImpcO E Dec. 20, 2017, 11:27 a.m. OK GNU C++14 TESTS 44 15 2252800 2800
28567155 There_And_Back_Again E July 15, 2017, 7:37 a.m. OK GNU C++14 TESTS 44 15 2252800 2800
26766389 Egor.Lifar E April 30, 2017, 11:18 a.m. OK GNU C++14 TESTS 44 15 2252800 2800
26760702 apiadu E April 30, 2017, 5:16 a.m. OK GNU C++14 TESTS 44 15 2252800 2800
69224479 hjk1030 E Jan. 21, 2020, 6:31 a.m. OK GNU C++17 TESTS 44 31 307200 2800
52737716 Shayan.P E April 14, 2019, 7:19 a.m. OK GNU C++17 TESTS 44 31 307200 2800
49953549 Jester E Feb. 15, 2019, 3:01 p.m. OK GNU C++17 TESTS 44 31 409600 2800
46857324 YenSean E Dec. 10, 2018, 3:40 p.m. OK GNU C++17 TESTS 44 46 409600 2800
68099610 Geothermal E Jan. 3, 2020, 1:07 a.m. OK GNU C++17 TESTS 44 61 512000 2800
47343244 Holidin E Dec. 21, 2018, 6:20 p.m. OK GNU C++17 TESTS 44 156 50483200 2800
68099008 Geothermal E Jan. 3, 2020, 12:07 a.m. OK GNU C++17 TESTS 44 374 1126400 2800
26619737 Lewin E April 23, 2017, 6 p.m. OK Java 8 TESTS 44 124 20582400 2800
26671056 JShinjuro E April 25, 2017, 9:24 p.m. OK Java 8 TESTS 44 187 20480000 2800
26648226 mmaxio E April 24, 2017, 7:53 p.m. OK Java 8 TESTS 44 202 20480000 2800
26633623 uwi E April 24, 2017, 5:26 a.m. OK Java 8 TESTS 44 202 20992000 2800
26666889 koyaaniqatsi E April 25, 2017, 5:23 p.m. OK MS C# TESTS 44 93 12083200 2800
26997942 iynaur87 E May 10, 2017, 2:19 p.m. OK PyPy 3 TESTS 44 217 15052800 2800
27004224 iynaur87 E May 10, 2017, 11:36 p.m. OK PyPy 3 TESTS 44 374 15052800 2800
27004235 iynaur87 E May 10, 2017, 11:38 p.m. OK Python 3 TESTS 44 607 1024000 2800
26997419 iynaur87 E May 10, 2017, 1:49 p.m. OK Python 3 TESTS 44 1216 1024000 2800
26997561 iynaur87 E May 10, 2017, 1:57 p.m. OK Python 3 TESTS 44 1372 1024000 2800
26997270 iynaur87 E May 10, 2017, 1:39 p.m. OK Python 3 TESTS 44 1481 1024000 2800
26997514 iynaur87 E May 10, 2017, 1:55 p.m. OK Python 3 TESTS 44 1543 1024000 2800

remove filters

Back to search problems