Mail.Ru Cup 2018 Round 3

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
1056 Mail.Ru Cup 2018 Round 3 FINISHED False 9000 194275487 Nov. 25, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 265 ) G Take Metro PROGRAMMING brute force data structures graphs 2800

B"Having problems with tram routes in the morning, Arkady decided to return home by metro. Fortunately for Arkady, there is only one metro line in the city. Unfortunately for Arkady, the line is circular. It means that the stations are enumerated from 1 to n and there is a tunnel between any pair of consecutive stations as well as between the station 1 and the station n . Trains that go in clockwise direction visit the stations in order 1 to 2 to 3 to ldots to n to 1 while the trains that go in the counter-clockwise direction visit the stations in the reverse order. The stations that have numbers from 1 to m have interior mostly in red colors while the stations that have numbers from m + 1 to n have blue interior. Arkady entered the metro at station s and decided to use the following algorithm to choose his way home. You have already realized that this algorithm most probably won't bring Arkady home. Find the station he will exit the metro at so that you can continue helping him. The first line contains two integers n and m ( 3 <= n <= 10^5 , 1 <= m < n ) -- the total number of stations and the number of stations that have red interior. The second line contains two integers s and t ( 1 <= s <= n , 1 <= t <= 10^{12} ) -- the starting station and the initial value of t . Output the only integer -- the station where Arkady will exit the metro. Consider the first example. There are 10 stations and the first 4 of them are red. Arkady starts at station 3 with value t = 1 , so just rides 1 station in clockwise direction and ends up on the station 4 . In the second example the metro is same as in the first example, but Arkady starts at station 3 with value t = 5 . "...

Tutorials

Mail.Ru Cup 2018 Round 3 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46235888 tqyaaaaaaaang G Nov. 26, 2018, 2:43 a.m. OK GNU C++11 TESTS 43 31 512000 2800
46229730 krijgertje G Nov. 25, 2018, 8:10 p.m. OK GNU C++11 TESTS 43 31 1228800 2800
46253095 P0LyFish G Nov. 26, 2018, 3:09 p.m. OK GNU C++11 TESTS 43 77 102400 2800
46264561 aurinegro G Nov. 27, 2018, 12:30 a.m. OK GNU C++11 TESTS 43 78 409600 2800
47896026 luogu_bot2 G Jan. 4, 2019, 10:31 a.m. OK GNU C++11 TESTS 43 93 3276800 2800
49330835 code_struck G Feb. 1, 2019, 4:10 p.m. OK GNU C++11 TESTS 43 109 512000 2800
46780569 zhouyuyang G Dec. 9, 2018, 2:03 a.m. OK GNU C++11 TESTS 43 109 819200 2800
46628223 Feeey G Dec. 4, 2018, 11:27 p.m. OK GNU C++11 TESTS 43 109 921600 2800
46237604 Prabowo G Nov. 26, 2018, 4:55 a.m. OK GNU C++11 TESTS 43 109 1228800 2800
46410264 droidlyx86 G Nov. 30, 2018, 4:44 p.m. OK GNU C++11 TESTS 43 109 1638400 2800
54540261 gtrhetr G May 24, 2019, 12:39 a.m. OK GNU C++14 TESTS 43 31 819200 2800
54467815 mayaohua2003 G May 22, 2019, 2:13 a.m. OK GNU C++14 TESTS 43 31 819200 2800
46228845 neal G Nov. 25, 2018, 7:55 p.m. OK GNU C++14 TESTS 43 31 819200 2800
46234408 antguz G Nov. 26, 2018, 12:28 a.m. OK GNU C++14 TESTS 43 46 0 2800
46234385 antguz G Nov. 26, 2018, 12:26 a.m. OK GNU C++14 TESTS 43 46 0 2800
46229194 snuke G Nov. 25, 2018, 7:59 p.m. OK GNU C++14 TESTS 43 62 102400 2800
46236304 apiadu G Nov. 26, 2018, 3:18 a.m. OK GNU C++14 TESTS 43 93 819200 2800
46264372 kmjp G Nov. 27, 2018, 12:13 a.m. OK GNU C++14 TESTS 43 93 1228800 2800
46226452 natsugiri G Nov. 25, 2018, 6:54 p.m. OK GNU C++14 TESTS 43 93 48947200 2800
50053744 ctlchild G Feb. 17, 2019, 9:15 a.m. OK GNU C++14 TESTS 43 108 819200 2800
48657293 ReaLNero1 G Jan. 21, 2019, 3:38 a.m. OK GNU C++17 TESTS 43 31 819200 2800
46528409 yosupo G Dec. 3, 2018, 1:51 a.m. OK GNU C++17 TESTS 43 31 819200 2800
46229293 zemen G Nov. 25, 2018, 8:01 p.m. OK GNU C++17 TESTS 43 31 819200 2800
46226486 JustasK G Nov. 25, 2018, 6:55 p.m. OK GNU C++17 TESTS 43 46 921600 2800
46225008 Marcin_smu G Nov. 25, 2018, 6:40 p.m. OK GNU C++17 TESTS 43 61 1638400 2800
46227716 falanga G Nov. 25, 2018, 7:04 p.m. OK GNU C++17 TESTS 43 62 819200 2800
69295399 hjk1030 G Jan. 22, 2020, 12:01 p.m. OK GNU C++17 TESTS 43 77 409600 2800
46236926 WNG G Nov. 26, 2018, 4:05 a.m. OK GNU C++17 TESTS 43 77 409600 2800
64598365 flashmt G Nov. 9, 2019, 5:40 p.m. OK GNU C++17 TESTS 43 78 102400 2800
48690108 cerberus97 G Jan. 21, 2019, 5:18 p.m. OK GNU C++17 TESTS 43 78 1126400 2800
46225495 mmaxio G Nov. 25, 2018, 6:45 p.m. OK Java 8 TESTS 43 139 0 2800
46232523 lucasr G Nov. 25, 2018, 9:55 p.m. OK Java 8 TESTS 43 140 0 2800
46222728 Lewin G Nov. 25, 2018, 6:18 p.m. OK Java 8 TESTS 43 202 0 2800
46264783 kessido G Nov. 27, 2018, 12:52 a.m. OK Java 8 TESTS 43 295 0 2800
46237770 SpargelTarzan G Nov. 26, 2018, 5:06 a.m. OK Java 8 TESTS 43 311 0 2800
46224896 eatmore G Nov. 25, 2018, 6:39 p.m. OK Java 8 TESTS 43 1715 26521600 2800
46249530 limed G Nov. 26, 2018, 1:28 p.m. OK Scala TESTS 43 1075 1126400 2800

remove filters

Back to search problems