Codeforces Round 507 (Div. 1, based on Olympiad of Metropolises)

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
1039 Codeforces Round 507 (Div. 1, based on Olympiad of Metropolises) FINISHED False 7200 201273887 Sept. 5, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2410 ) B Subway Pursuit PROGRAMMING binary search interactive probabilities 2100

B'This is an interactive problem. In the Wonderful Metropolis of the Future, there is no need in subway train drivers. Due to the technological progress, they were replaced by the Artificial Intelligence (AI). Unfortunately, one day the predictions of sci-fi writers came true: the AI rebelled and now there is an uncontrollable train in the subway. It can be dangerous! Your task is to find the train and stop the AI. The subway of the Metropolis is one line (regular straight line with no self-intersections) with n stations, indexed consecutively from 1 to n . At each moment the train is at some station. You need to determine the index of this station, so that the train would be secured. To find the train, dispatcher Sarah gave you a gadget that allows you to select arbitrary numbers l and r ( l <= r ), and then check, whether the train is located on a station with index between l and r , inclusive. Unfortunately, recharging of the gadget takes some time (and every time you use it as soon as possible), so between two applications of the gadget the train can move to any station that is at most k stations away. Formally, if the train was at the station x when the gadget was applied, then at the next application of the gadget the train can appear at any station y such that max(1, x - k) <= q y <= q min(n, x + k) . Note that AI is not aware that you are trying to catch the train, so it makes all moves according to its predefined plan. After an examination of the gadget you found that it is very old and can hold no more than 4500 applications, after which it will break and your mission will be considered a failure. Can you find the station with the train using no more than 4500 applications of the gadgets? The first line contains two integers n and k ( 1 <= q n <= q 10^{18} , 0 <= q k <= q 10 ) -- the number of stations and the maximum number of stations the trai'...

Tutorials

61668

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57808661 aditya_sheth B July 26, 2019, 4:15 p.m. OK Clang++17 Diagnostics TESTS 150 62 4505600 2100
57809690 aditya_sheth B July 26, 2019, 4:42 p.m. OK Clang++17 Diagnostics TESTS 150 92 512000 2100
42506538 Gassa B Sept. 5, 2018, 5:02 p.m. OK D TESTS 150 46 0 2100
43223638 f-society B Sept. 21, 2018, 7:51 p.m. OK D TESTS 150 46 0 2100
42514101 masha_and_beer B Sept. 5, 2018, 5:34 p.m. OK FPC TESTS 150 31 409600 2100
59588929 PomperMan B Aug. 27, 2019, 7:20 p.m. OK GNU C++11 TESTS 150 31 0 2100
59586522 ekrem B Aug. 27, 2019, 6:14 p.m. OK GNU C++11 TESTS 150 31 0 2100
57868627 lopare B July 27, 2019, 11:28 p.m. OK GNU C++11 TESTS 150 31 0 2100
54469273 luogu_bot1 B May 22, 2019, 3:50 a.m. OK GNU C++11 TESTS 150 31 0 2100
54403059 VCode B May 20, 2019, 3:11 a.m. OK GNU C++11 TESTS 150 31 0 2100
53767721 SoiMae B May 5, 2019, 2:06 a.m. OK GNU C++11 TESTS 150 31 0 2100
69643939 pavveu B Jan. 27, 2020, 11:04 p.m. OK GNU C++11 TESTS 150 31 0 2100
69152337 heLi0x B Jan. 19, 2020, 6:03 p.m. OK GNU C++11 TESTS 150 31 0 2100
62870617 shuyingte B Oct. 18, 2019, 1:39 p.m. OK GNU C++11 TESTS 150 31 0 2100
61068172 ZUTTER_ B Sept. 22, 2019, 11:47 a.m. OK GNU C++11 TESTS 150 31 0 2100
62179860 tjd229 B Oct. 9, 2019, 6:03 a.m. OK GNU C++14 TESTS 150 31 0 2100
68762766 Neuni B Jan. 14, 2020, 8:48 a.m. OK GNU C++14 TESTS 150 31 0 2100
64756956 L_lawliet27 B Nov. 12, 2019, 5:21 p.m. OK GNU C++14 TESTS 150 31 0 2100
64736745 L_lawliet27 B Nov. 12, 2019, 10:37 a.m. OK GNU C++14 TESTS 150 31 0 2100
64729720 L_lawliet27 B Nov. 12, 2019, 7:56 a.m. OK GNU C++14 TESTS 150 31 0 2100
62180222 tjd229 B Oct. 9, 2019, 6:10 a.m. OK GNU C++14 TESTS 150 31 0 2100
59929100 IgoRamli B Sept. 3, 2019, 6:05 a.m. OK GNU C++14 TESTS 150 31 0 2100
59893786 vjudge2 B Sept. 2, 2019, 11:23 a.m. OK GNU C++14 TESTS 150 31 0 2100
59610429 jam1729 B Aug. 28, 2019, 10:42 a.m. OK GNU C++14 TESTS 150 31 0 2100
59567227 rav.gupta B Aug. 27, 2019, 11:13 a.m. OK GNU C++14 TESTS 150 31 0 2100
69034851 Ali.Kh B Jan. 18, 2020, 8:50 a.m. OK GNU C++17 TESTS 150 31 0 2100
67144175 dontquit B Dec. 18, 2019, 8:06 a.m. OK GNU C++17 TESTS 150 31 0 2100
66998511 kobortor B Dec. 16, 2019, 4:06 a.m. OK GNU C++17 TESTS 150 31 0 2100
64100939 aps B Nov. 2, 2019, 3:26 p.m. OK GNU C++17 TESTS 150 31 0 2100
63619801 vitux B Oct. 27, 2019, 9:54 p.m. OK GNU C++17 TESTS 150 31 0 2100
62684350 bittudalal B Oct. 16, 2019, 1:41 p.m. OK GNU C++17 TESTS 150 31 0 2100
61021496 ST_C B Sept. 21, 2019, 2:43 p.m. OK GNU C++17 TESTS 150 31 0 2100
56559238 PaciukZvichainyi B July 5, 2019, 1:59 p.m. OK GNU C++17 TESTS 150 31 0 2100
56557771 BOGDAN_ B July 5, 2019, 1:14 p.m. OK GNU C++17 TESTS 150 31 0 2100
56557687 BOGDAN_ B July 5, 2019, 1:11 p.m. OK GNU C++17 TESTS 150 31 0 2100
67978873 SecondThread B Dec. 30, 2019, 6:11 p.m. OK Java 8 TESTS 150 155 0 2100
62737336 mTvTm B Oct. 16, 2019, 6:42 p.m. OK Java 8 TESTS 150 155 0 2100
43653555 AJ47 B Oct. 1, 2018, 4:50 p.m. OK Java 8 TESTS 150 155 0 2100
42534684 993035197 B Sept. 6, 2018, 12:01 a.m. OK Java 8 TESTS 150 155 0 2100
42507090 Egor B Sept. 5, 2018, 5:04 p.m. OK Java 8 TESTS 150 155 0 2100
42606358 GreatWhite B Sept. 7, 2018, 8:07 a.m. OK Java 8 TESTS 150 171 0 2100
65562773 ijxjdjd B Nov. 23, 2019, 4:07 a.m. OK Java 8 TESTS 150 171 0 2100
45391941 megaspazz B Nov. 6, 2018, 10:28 p.m. OK Java 8 TESTS 150 171 0 2100
42534085 Suzukaze B Sept. 5, 2018, 11:19 p.m. OK Java 8 TESTS 150 171 0 2100
42531321 U_Square B Sept. 5, 2018, 8:57 p.m. OK Java 8 TESTS 150 171 0 2100
62094345 Spheniscine B Oct. 8, 2019, 6:58 a.m. OK Kotlin TESTS 150 155 307200 2100
61106481 Spheniscine B Sept. 23, 2019, 9:25 a.m. OK Kotlin TESTS 150 171 307200 2100
63370023 Spheniscine B Oct. 25, 2019, 9:01 a.m. OK Kotlin TESTS 150 171 409600 2100
54782515 ruhan.habib39 B May 28, 2019, 11:51 p.m. OK Kotlin TESTS 150 171 819200 2100
62092790 Spheniscine B Oct. 8, 2019, 6:29 a.m. OK Kotlin TESTS 150 187 307200 2100
61106285 Spheniscine B Sept. 23, 2019, 9:21 a.m. OK Kotlin TESTS 150 202 307200 2100
61105383 Spheniscine B Sept. 23, 2019, 8:56 a.m. OK Kotlin TESTS 150 202 307200 2100
62092425 Spheniscine B Oct. 8, 2019, 6:22 a.m. OK Kotlin TESTS 150 202 614400 2100
61106099 Spheniscine B Sept. 23, 2019, 9:16 a.m. OK Kotlin TESTS 150 217 307200 2100
63369517 Spheniscine B Oct. 25, 2019, 8:49 a.m. OK Kotlin TESTS 150 265 1024000 2100
42515874 leign B Sept. 5, 2018, 5:42 p.m. OK Mono C# TESTS 150 77 204800 2100
42534966 BaturaDima B Sept. 6, 2018, 12:19 a.m. OK MS C++ TESTS 150 46 307200 2100
42534831 BaturaDima B Sept. 6, 2018, 12:11 a.m. OK MS C++ TESTS 150 46 307200 2100
42534810 BaturaDima B Sept. 6, 2018, 12:09 a.m. OK MS C++ TESTS 150 46 307200 2100
42534746 BaturaDima B Sept. 6, 2018, 12:05 a.m. OK MS C++ TESTS 150 46 307200 2100
42534734 BaturaDima B Sept. 6, 2018, 12:05 a.m. OK MS C++ TESTS 150 46 307200 2100
42534719 BaturaDima B Sept. 6, 2018, 12:04 a.m. OK MS C++ TESTS 150 46 307200 2100
42533643 BaturaDima B Sept. 5, 2018, 10:49 p.m. OK MS C++ TESTS 150 46 307200 2100
42529009 math957963 B Sept. 5, 2018, 8:05 p.m. OK MS C++ TESTS 150 46 307200 2100
42794089 sharu B Sept. 12, 2018, 10:36 a.m. OK MS C++ TESTS 150 46 307200 2100
42534864 BaturaDima B Sept. 6, 2018, 12:12 a.m. OK MS C++ TESTS 150 61 307200 2100
42511603 pajenegod B Sept. 5, 2018, 5:23 p.m. OK PyPy 2 TESTS 150 202 1228800 2100
49912030 Luxo B Feb. 14, 2019, 2:39 p.m. OK Python 2 TESTS 150 202 409600 2100
49903254 Luxo B Feb. 14, 2019, 10:33 a.m. OK Python 2 TESTS 150 217 409600 2100
42535048 davidzhou B Sept. 6, 2018, 12:24 a.m. OK Python 2 TESTS 150 218 307200 2100
49909364 Luxo B Feb. 14, 2019, 1:28 p.m. OK Python 2 TESTS 150 218 409600 2100
42535062 davidzhou B Sept. 6, 2018, 12:24 a.m. OK Python 2 TESTS 150 233 307200 2100
49903019 Luxo B Feb. 14, 2019, 10:24 a.m. OK Python 2 TESTS 150 233 409600 2100
43513862 WNG B Sept. 28, 2018, 2:46 a.m. OK Python 2 TESTS 150 248 307200 2100
42824147 jianzuan B Sept. 13, 2018, 8:48 a.m. OK Python 3 TESTS 150 187 512000 2100
42612686 johnzeng B Sept. 7, 2018, noon OK Python 3 TESTS 150 187 512000 2100
42543599 noelnadal B Sept. 6, 2018, 7:42 a.m. OK Python 3 TESTS 150 187 512000 2100
42510006 sonya123 B Sept. 5, 2018, 5:16 p.m. OK Python 3 TESTS 150 187 1843200 2100
42506603 xh286286 B Sept. 5, 2018, 5:02 p.m. OK Python 3 TESTS 150 187 2457600 2100
42782192 pedrofreire B Sept. 11, 2018, 10:39 p.m. OK Python 3 TESTS 150 202 512000 2100
42508317 --d B Sept. 5, 2018, 5:09 p.m. OK Python 3 TESTS 150 202 1843200 2100
42507553 nns2009 B Sept. 5, 2018, 5:06 p.m. OK Python 3 TESTS 150 202 1843200 2100
42530801 jAS0N.1i B Sept. 5, 2018, 8:44 p.m. OK Python 3 TESTS 150 217 512000 2100
42756917 overlordin777 B Sept. 11, 2018, 7:52 a.m. OK Python 3 TESTS 150 217 2662400 2100

remove filters

Back to search problems