Codeforces Round 542 [Alex Lopashev Thanks-Round] (Div. 1)

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
1129 Codeforces Round 542 [Alex Lopashev Thanks-Round] (Div. 1) FINISHED False 7200 186157463 Feb. 24, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3838 ) A1 Toy Train (Simplified) PROGRAMMING brute force greedy 1700

B'This is a simplified version of the task Toy Train. These two versions differ only in the constraints. Hacks for this version are disabled. Alice received a set of Toy Train xe2 x84 xa2 from Bob. It consists of one train and a connected railway network of n stations, enumerated from 1 through n . The train occupies one station at a time and travels around the network of stations in a circular manner. More precisely, the immediate station that the train will visit after station i is station i+1 if 1 <= q i < n or station 1 if i = n . It takes the train 1 second to travel to its next station as described. Bob gave Alice a fun task before he left: to deliver m candies that are initially at some stations to their independent destinations using the train. The candies are enumerated from 1 through m . Candy i ( 1 <= q i <= q m ), now at station a_i , should be delivered to station b_i ( a_i neq b_i ). The train has infinite capacity, and it is possible to load off any number of candies at a station. However, only at most one candy can be loaded from a station onto the train before it leaves the station. You can choose any candy at this station. The time it takes to move the candies is negligible. Now, Alice wonders how much time is needed for the train to deliver all candies. Your task is to find, for each station, the minimum time the train would need to deliver all the candies were it to start from there. The first line contains two space-separated integers n and m ( 2 <= q n <= q 100 ; 1 <= q m <= q 200 ) -- the number of stations and the number of candies, respectively. The i -th of the following m lines contains two space-separated integers a_i and b_i ( 1 <= q a_i, b_i <= q n ; a_i neq b_i ) -- the station that initially contains candy i and the destination station of the candy, respectively. In the first and o'...

Tutorials

65520

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50442867 hos.lyric A1 Feb. 24, 2019, 4:01 p.m. OK D TESTS 59 46 0 1700
50574673 ruban A1 Feb. 27, 2019, 5:23 p.m. OK Delphi TESTS 60 31 62873600 1700
50552489 CLF A1 Feb. 27, 2019, 5:42 a.m. OK GNU C11 TESTS 60 31 0 1700
50441846 rainboy A1 Feb. 24, 2019, 3:57 p.m. OK GNU C11 TESTS 59 31 0 1700
50467109 sansen A1 Feb. 24, 2019, 8:32 p.m. OK GNU C11 TESTS 59 31 0 1700
50438789 Juzek A1 Feb. 24, 2019, 3:48 p.m. OK GNU C++11 TESTS 59 30 0 1700
50561111 LJC00118 A1 Feb. 27, 2019, 11:07 a.m. OK GNU C++11 TESTS 60 30 102400 1700
50533882 AdiZer0 A1 Feb. 26, 2019, 2:47 p.m. OK GNU C++11 TESTS 60 30 102400 1700
57866939 lopare A1 July 27, 2019, 9:47 p.m. OK GNU C++11 TESTS 60 31 0 1700
57710766 py_ultron A1 July 24, 2019, 11:35 p.m. OK GNU C++11 TESTS 60 31 0 1700
56524390 duality A1 July 4, 2019, 4:28 p.m. OK GNU C++11 TESTS 60 31 0 1700
54550722 venkat2000 A1 May 24, 2019, 8:57 a.m. OK GNU C++11 TESTS 60 31 0 1700
66048223 xht37 A1 Nov. 30, 2019, 4 p.m. OK GNU C++11 TESTS 60 31 0 1700
58862887 jinanran A1 Aug. 15, 2019, 12:18 p.m. OK GNU C++11 TESTS 60 31 0 1700
57871923 haosen A1 July 28, 2019, 2:28 a.m. OK GNU C++11 TESTS 60 31 0 1700
50469905 gogh A1 Feb. 24, 2019, 11:07 p.m. OK GNU C++14 TESTS 59 30 0 1700
50472981 darkshadowss A1 Feb. 25, 2019, 3:12 a.m. OK GNU C++14 TESTS 59 30 0 1700
51680414 dickings ChenyangDu A1 March 22, 2019, 12:25 p.m. OK GNU C++14 TESTS 60 30 0 1700
50442219 supersayadilson A1 Feb. 24, 2019, 3:59 p.m. OK GNU C++14 TESTS 59 30 0 1700
50462398 racsosabe A1 Feb. 24, 2019, 6:35 p.m. OK GNU C++14 TESTS 59 30 102400 1700
59656657 HouZAJ A1 Aug. 29, 2019, 10:42 a.m. OK GNU C++14 TESTS 60 30 102400 1700
50894687 damon2598 A1 March 6, 2019, 2:33 p.m. OK GNU C++14 TESTS 60 30 102400 1700
53012585 ACRush A1 April 19, 2019, 12:46 p.m. OK GNU C++14 TESTS 60 30 204800 1700
52583216 namanbansal013 A1 April 10, 2019, 8:45 p.m. OK GNU C++14 TESTS 60 30 204800 1700
51424715 860579 A1 March 17, 2019, 6:32 p.m. OK GNU C++14 TESTS 60 30 204800 1700
50480218 OKAS A1 Feb. 25, 2019, 8:32 a.m. OK GNU C++17 TESTS 59 15 819200 1700
50533206 livyx A1 Feb. 26, 2019, 2:31 p.m. OK GNU C++17 TESTS 60 30 0 1700
50449174 toomas A1 Feb. 24, 2019, 4:28 p.m. OK GNU C++17 TESTS 59 30 0 1700
50656269 lys1280023 A1 March 1, 2019, 7:43 p.m. OK GNU C++17 TESTS 60 30 0 1700
52767737 giuseppe55 A1 April 15, 2019, 5:48 a.m. OK GNU C++17 TESTS 60 30 0 1700
53801130 dickynovanto1103 A1 May 5, 2019, 6:48 p.m. OK GNU C++17 TESTS 60 30 0 1700
50463664 altruist A1 Feb. 24, 2019, 6:53 p.m. OK GNU C++17 TESTS 59 30 102400 1700
50677707 Pulmn A1 March 2, 2019, 9:58 a.m. OK GNU C++17 TESTS 60 30 204800 1700
56143572 hotshot A1 June 27, 2019, 4:53 a.m. OK GNU C++17 TESTS 60 30 204800 1700
51854834 AK18 A1 March 26, 2019, 10:13 a.m. OK GNU C++17 TESTS 60 30 204800 1700
52544628 beroul A1 April 9, 2019, 8:18 p.m. OK Java 8 TESTS 60 109 0 1700
51041950 Omar_Morsi A1 March 8, 2019, 5:17 p.m. OK Java 8 TESTS 60 109 0 1700
50437054 about A1 Feb. 24, 2019, 3:44 p.m. OK Java 8 TESTS 59 109 0 1700
50489403 PrakharJain A1 Feb. 25, 2019, 12:49 p.m. OK Java 8 TESTS 59 109 0 1700
51897186 dtsarun A1 March 27, 2019, 12:06 p.m. OK Java 8 TESTS 60 124 0 1700
68488302 pulkit1411 A1 Jan. 10, 2020, 10:42 a.m. OK Java 8 TESTS 60 124 0 1700
53044253 maheshwari29 A1 April 20, 2019, 11:24 a.m. OK Java 8 TESTS 60 124 0 1700
50559367 MeryKitty A1 Feb. 27, 2019, 10:02 a.m. OK Java 8 TESTS 60 124 0 1700
50550849 gnad A1 Feb. 27, 2019, 4:06 a.m. OK Java 8 TESTS 60 124 0 1700
50519203 ramez A1 Feb. 26, 2019, 8:26 a.m. OK Java 8 TESTS 59 124 0 1700
50450917 riantkb A1 Feb. 24, 2019, 4:37 p.m. OK Mono C# TESTS 59 61 0 1700
53869602 vjudge3 A1 May 8, 2019, 7:56 a.m. OK MS C++ TESTS 60 31 0 1700
50703798 cuihongbin A1 March 3, 2019, 1:39 a.m. OK MS C++ TESTS 60 31 0 1700
50521216 XRDS-BJFU101 A1 Feb. 26, 2019, 9:29 a.m. OK MS C++ TESTS 59 31 0 1700
58231290 vjudge5 A1 Aug. 3, 2019, 4:58 p.m. OK MS C++ TESTS 60 31 0 1700
58083103 vjudge5 A1 July 31, 2019, 2:33 p.m. OK MS C++ TESTS 60 31 0 1700
58050996 vjudge1 A1 July 31, 2019, 2:37 a.m. OK MS C++ TESTS 60 31 102400 1700
50703758 cuihongbin A1 March 3, 2019, 1:35 a.m. OK MS C++ TESTS 60 31 102400 1700
64069649 1912607519 A1 Nov. 2, 2019, 6:59 a.m. OK MS C++ TESTS 60 31 102400 1700
50445463 BaturaDima A1 Feb. 24, 2019, 4:11 p.m. OK MS C++ TESTS 59 46 0 1700
60913332 vjudge5 A1 Sept. 20, 2019, 6:58 a.m. OK MS C++ 2017 TESTS 60 31 0 1700
56034361 0-jij-0 A1 June 25, 2019, 11:20 a.m. OK MS C++ 2017 TESTS 60 31 0 1700
55543861 BessieTheCow A1 June 13, 2019, 10:58 p.m. OK MS C++ 2017 TESTS 60 31 0 1700
50464835 xtalclr A1 Feb. 24, 2019, 7:19 p.m. OK MS C++ 2017 TESTS 59 31 0 1700
50441633 vpike A1 Feb. 24, 2019, 3:57 p.m. OK MS C++ 2017 TESTS 59 31 0 1700
50440980 aeremin A1 Feb. 24, 2019, 3:54 p.m. OK MS C++ 2017 TESTS 59 31 0 1700
51434650 hld67890 A1 March 18, 2019, 5:21 a.m. OK MS C++ 2017 TESTS 60 31 102400 1700
64343812 vjudge3 A1 Nov. 6, 2019, 4:53 a.m. OK MS C++ 2017 TESTS 60 46 307200 1700
50558460 Stanislav666 A1 Feb. 27, 2019, 9:26 a.m. OK PascalABC.NET TESTS 60 327 204800 1700
50505073 mayakin A1 Feb. 25, 2019, 7:12 p.m. OK PHP TESTS 59 46 409600 1700
50462765 pajenegod A1 Feb. 24, 2019, 6:39 p.m. OK PyPy 2 TESTS 59 139 0 1700
50741030 sdhd A1 March 3, 2019, 3:29 p.m. OK PyPy 3 TESTS 60 155 512000 1700
50437475 --d A1 Feb. 24, 2019, 3:45 p.m. OK PyPy 3 TESTS 59 171 716800 1700
50440123 algmyr A1 Feb. 24, 2019, 3:52 p.m. OK PyPy 3 TESTS 59 186 716800 1700
50465837 Nika86 A1 Feb. 24, 2019, 7:46 p.m. OK Python 2 TESTS 59 171 0 1700
51838344 Uranux A1 March 25, 2019, 7:38 p.m. OK Python 2 TESTS 60 186 0 1700
50671454 SoSooding A1 March 2, 2019, 7:12 a.m. OK Python 2 TESTS 60 186 0 1700
52522363 tushartyagi8750 A1 April 9, 2019, 9:30 a.m. OK Python 3 TESTS 60 109 0 1700
52522332 tushartyagi8750 A1 April 9, 2019, 9:29 a.m. OK Python 3 TESTS 60 109 0 1700
51442594 Annvv A1 March 18, 2019, 10:54 a.m. OK Python 3 TESTS 60 109 0 1700
50620580 sunthanos A1 March 1, 2019, 12:48 a.m. OK Python 3 TESTS 60 109 0 1700
52798947 wofka72 A1 April 16, 2019, 12:43 a.m. OK Python 3 TESTS 60 124 0 1700
51226242 romanysik A1 March 12, 2019, 2:15 p.m. OK Python 3 TESTS 60 124 0 1700
50792035 wxy1800011848 A1 March 4, 2019, 4:13 p.m. OK Python 3 TESTS 60 124 0 1700
50553083 CLF A1 Feb. 27, 2019, 6:12 a.m. OK Python 3 TESTS 60 124 0 1700
50524153 JoeGun A1 Feb. 26, 2019, 10:58 a.m. OK Python 3 TESTS 59 124 0 1700
50452373 whatshisbucket A1 Feb. 24, 2019, 4:46 p.m. OK Python 3 TESTS 59 124 0 1700

remove filters

Back to search problems