Good Bye 2018

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
1091 Good Bye 2018 FINISHED False 9600 185642699 Dec. 30, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 827 ) F New Year and the Mallard Expedition PROGRAMMING constructive algorithms greedy 2600

B'Bob is a duck. He wants to get to Alice 's nest, so that those two can duck! The journey can be represented as a straight line, consisting of n segments. Bob is located to the left of the first segment, while Alice 's nest is on the right of the last segment. Each segment has a length in meters, and also terrain type: grass, water or lava. Bob has three movement types: swimming, walking and flying. He can switch between them or change his direction at any point in time (even when he is located at a non-integer coordinate), and doing so doesn 't require any extra time. Bob can swim only on the water, walk only on the grass and fly over any terrain. Flying one meter takes 1 second, swimming one meter takes 3 seconds, and finally walking one meter takes 5 seconds. Bob has a finite amount of energy, called stamina. Swimming and walking is relaxing for him, so he gains 1 stamina for every meter he walks or swims. On the other hand, flying is quite tiring, and he spends 1 stamina for every meter flown. Staying in place does not influence his stamina at all. Of course, his stamina can never become negative. Initially, his stamina is zero. What is the shortest possible time in which he can reach Alice 's nest? The first line contains a single integer n ( 1 <= q n <= q 10^5 ) -- the number of segments of terrain. The second line contains n integers l_1, l_2, ... , l_n ( 1 <= q l_i <= q 10^{12} ). The l_i represents the length of the i -th terrain segment in meters. The third line contains a string s consisting of n characters "G", "W", "L", representing Grass, Water and Lava, respectively. It is guaranteed that the first segment is not Lava. Output a single integer t -- the minimum time Bob needs to reach Alice. In the first sample, Bob first walks 5 meters in 25 seconds. Then he flies the remaining 5 meters in 5 seconds. In the second sample, '...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47760395 Gassa F Dec. 30, 2018, 4:40 p.m. OK D TESTS 78 77 11571200 2600
48031259 Potassium_ F Jan. 6, 2019, 12:33 p.m. OK GNU C11 TESTS 78 46 921600 2600
47794527 rainboy F Dec. 31, 2018, 3:48 p.m. OK GNU C11 TESTS 78 46 921600 2600
48031298 Potassium_ F Jan. 6, 2019, 12:34 p.m. OK GNU C11 TESTS 78 46 921600 2600
48029143 SovietPower F Jan. 6, 2019, 11:13 a.m. OK GNU C++11 TESTS 78 31 716800 2600
47803966 207M F Jan. 1, 2019, 4:55 a.m. OK GNU C++11 TESTS 78 31 921600 2600
47803905 luogu_bot5 F Jan. 1, 2019, 4:47 a.m. OK GNU C++11 TESTS 78 31 921600 2600
47788521 Durant_Lee F Dec. 31, 2018, 12:04 p.m. OK GNU C++11 TESTS 78 31 921600 2600
48654518 ReaLNero1 F Jan. 21, 2019, 1:36 a.m. OK GNU C++11 TESTS 78 31 921600 2600
48590741 chc_1234567890 F Jan. 20, 2019, 1:54 a.m. OK GNU C++11 TESTS 78 31 921600 2600
48206996 luogu_bot4 F Jan. 11, 2019, 9:31 a.m. OK GNU C++11 TESTS 78 31 921600 2600
48091784 mengbierr F Jan. 8, 2019, 2:13 p.m. OK GNU C++11 TESTS 78 31 921600 2600
47810922 luogu_bot1 F Jan. 1, 2019, 11:16 a.m. OK GNU C++11 TESTS 78 31 921600 2600
64279236 subaruni F Nov. 5, 2019, 12:20 a.m. OK GNU C++11 TESTS 78 31 921600 2600
48570158 tokitsukaze F Jan. 19, 2019, 11:36 a.m. OK GNU C++14 TESTS 78 31 1024000 2600
57074665 tingyu F July 15, 2019, 4:29 a.m. OK GNU C++14 TESTS 78 46 921600 2600
47885269 antguz F Jan. 3, 2019, 9:48 p.m. OK GNU C++14 TESTS 78 61 921600 2600
47793784 _Ash__ F Dec. 31, 2018, 3:13 p.m. OK GNU C++14 TESTS 78 61 1740800 2600
57458916 MaxZubec F July 21, 2019, 12:46 p.m. OK GNU C++14 TESTS 78 62 819200 2600
47789124 Limeni F Dec. 31, 2018, 12:23 p.m. OK GNU C++14 TESTS 78 62 819200 2600
47772692 Egor.Lifar F Dec. 30, 2018, 11:31 p.m. OK GNU C++14 TESTS 78 62 819200 2600
52994633 davidberard F April 19, 2019, 2:40 a.m. OK GNU C++14 TESTS 78 62 921600 2600
51961381 yutaka1999 F March 29, 2019, 7:02 a.m. OK GNU C++14 TESTS 78 62 921600 2600
49312741 HouZAJ F Feb. 1, 2019, 8:49 a.m. OK GNU C++14 TESTS 78 62 921600 2600
47777291 perilla_bot F Dec. 31, 2018, 5:16 a.m. OK GNU C++17 TESTS 78 31 2355200 2600
47828881 CMXRYNP F Jan. 2, 2019, 4:24 a.m. OK GNU C++17 TESTS 78 31 11878400 2600
47755099 FizzyDavid F Dec. 30, 2018, 4:04 p.m. OK GNU C++17 TESTS 78 46 1024000 2600
48276153 proofbycontradiction F Jan. 12, 2019, 5:48 a.m. OK GNU C++17 TESTS 78 61 1433600 2600
47775539 luogu_bot5 F Dec. 31, 2018, 3:24 a.m. OK GNU C++17 TESTS 78 62 819200 2600
47766847 gamegame F Dec. 30, 2018, 6:36 p.m. OK GNU C++17 TESTS 78 62 819200 2600
51152919 YenSean F March 11, 2019, 8:59 a.m. OK GNU C++17 TESTS 78 62 921600 2600
67470393 YXDHJL F Dec. 23, 2019, 12:35 p.m. OK GNU C++17 TESTS 78 62 921600 2600
57098696 hongzhiyin F July 15, 2019, 1:02 p.m. OK GNU C++17 TESTS 78 62 921600 2600
53645094 evpipis F May 1, 2019, 6:27 p.m. OK GNU C++17 TESTS 78 62 921600 2600
61945703 derrick20 F Oct. 5, 2019, 10:52 p.m. OK Java 8 TESTS 78 124 0 2600
47756039 uwi F Dec. 30, 2018, 4:10 p.m. OK Java 8 TESTS 78 140 0 2600
47798103 PrakharJain F Dec. 31, 2018, 7 p.m. OK Java 8 TESTS 78 155 0 2600
48321265 wolfib F Jan. 13, 2019, 9:25 a.m. OK Java 8 TESTS 78 155 2048000 2600
47794526 Dukkha F Dec. 31, 2018, 3:48 p.m. OK Java 8 TESTS 78 156 0 2600
69164731 Ahmad F Jan. 20, 2020, 2:55 a.m. OK Java 8 TESTS 78 171 2048000 2600
47763260 eatmore F Dec. 30, 2018, 5 p.m. OK Java 8 TESTS 78 171 2048000 2600
50881233 Morgan_Y F March 6, 2019, 8:58 a.m. OK Java 8 TESTS 78 171 7168000 2600
47770265 Intrincantation F Dec. 30, 2018, 8:26 p.m. OK Java 8 TESTS 78 217 5939200 2600
47763145 SaveVMK F Dec. 30, 2018, 4:59 p.m. OK Java 8 TESTS 78 342 6348800 2600
47759789 chokudai F Dec. 30, 2018, 4:36 p.m. OK Mono C# TESTS 78 109 15974400 2600
48268181 Anastasiya_Andreevna F Jan. 11, 2019, 10:10 p.m. OK Mono C# TESTS 78 311 31744000 2600
47758053 wa1tz719 F Dec. 30, 2018, 4:24 p.m. OK MS C++ TESTS 78 62 3276800 2600
47811982 wifimonster F Jan. 1, 2019, 11:58 a.m. OK MS C++ TESTS 78 93 1740800 2600
47757933 LoneFox F Dec. 30, 2018, 4:23 p.m. OK MS C++ TESTS 78 93 1843200 2600
47755414 BaturaDima F Dec. 30, 2018, 4:06 p.m. OK MS C++ TESTS 78 124 1945600 2600
47760863 almogwald F Dec. 30, 2018, 4:44 p.m. OK MS C++ TESTS 78 139 1126400 2600
67272545 MTHGHCO F Dec. 20, 2019, 8:53 a.m. OK MS C++ 2017 TESTS 78 62 921600 2600
67272604 vjudge4 F Dec. 20, 2019, 8:55 a.m. OK MS C++ 2017 TESTS 78 62 921600 2600
48045355 tiantian5 F Jan. 7, 2019, 1:58 a.m. OK PyPy 3 TESTS 78 312 17612800 2600
47966035 Hellia F Jan. 5, 2019, 12:10 p.m. OK Python 2 TESTS 78 451 8601600 2600
47847712 figure0907 F Jan. 2, 2019, 3:43 p.m. OK Python 3 TESTS 78 218 9216000 2600
47847579 figure0907 F Jan. 2, 2019, 3:38 p.m. OK Python 3 TESTS 78 233 9216000 2600
47773882 whatshisbucket F Dec. 31, 2018, 1:31 a.m. OK Python 3 TESTS 78 280 9113600 2600
47774567 chirs241097 F Dec. 31, 2018, 2:25 a.m. OK Python 3 TESTS 78 421 9113600 2600
47885937 Bovniova F Jan. 3, 2019, 10:55 p.m. OK Python 3 TESTS 78 607 15564800 2600

remove filters

Back to search problems