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 |
|---|---|---|---|---|---|---|
| 515 | Codeforces Round 292 (Div. 2) | FINISHED | False | 7200 | 352301085 | Feb. 17, 2015, 4:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 2420 ) | E | Drazil and Park | PROGRAMMING | data structures | 2600 |
Drazil is a monkey. He lives in a circular park. There are n trees around the park. The distance between the i -th tree and ( i + 1 )-st trees is d i , the distance between the n -th tree and the first tree is d n . The height of the i -th tree is h i . Drazil starts each day with the morning run . The morning run consists of the following steps: Drazil chooses two different trees He starts with climbing up the first tree Then he climbs down the first tree, runs around the park (in one of two possible directions) to the second tree, and climbs on it Then he finally climbs down the second tree. But there are always children playing around some consecutive trees. Drazil can't stand children, so he can't choose the trees close to children. He even can't stay close to those trees. If the two trees Drazil chooses are x -th and y -th, we can estimate the energy the morning run takes to him as 2( h x + h y ) + dist ( x , y ) . Since there are children on exactly one of two arcs connecting x and y , the distance dist ( x , y ) between trees x and y is uniquely defined. Now, you know that on the i -th day children play between a i -th tree and b i -th tree. More formally, if a i ≤ b i , children play around the trees with indices from range a i , b i , otherwise they play around the trees with indices from . Please help Drazil to determine which two trees he should choose in order to consume the most energy (since he wants to become fit and cool-looking monkey) and report the resulting amount of energy for each day. The first line contains two integer n and m ( 3 ≤ n ≤ 10 5 , 1 ≤ m ≤ 10 5 ), denoting number of trees and number of days, respectively. The second line contains n integers d 1 , d 2 , ..., d n ( 1 ≤ d i ≤ 10 9 ), the distances between consecutive trees. The third line contains n integers h 1 , h 2 , ..., h n ( 1 ≤ h i ≤ 10 9 ), the heights of trees. Each of following m lines contains two integers a i and b i ( 1 ≤ a i , b i ≤ n ) describing each new |
| Codeforces Round #292 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 41608497 | Scut82 | E | Aug. 15, 2018, 4:52 a.m. | OK | GNU C++ | TESTS | 27 | 109 | 25702400 | 2600 | |
| 40986998 | ReaLNero1 | E | July 30, 2018, 8:53 p.m. | OK | GNU C++ | TESTS | 27 | 124 | 10444800 | 2600 | |
| 12315184 | vjudge2 | E | Aug. 2, 2015, 1:08 p.m. | OK | GNU C++ | TESTS | 27 | 171 | 17612800 | 2600 | |
| 12315162 | vjudge1 | E | Aug. 2, 2015, 1:06 p.m. | OK | GNU C++ | TESTS | 27 | 171 | 17612800 | 2600 | |
| 23285423 | zhzxcool | E | Dec. 25, 2016, 6:08 a.m. | OK | GNU C++ | TESTS | 27 | 171 | 17817600 | 2600 | |
| 23308856 | vjudge1 | E | Dec. 25, 2016, 12:33 p.m. | OK | GNU C++ | TESTS | 27 | 171 | 26112000 | 2600 | |
| 22404356 | vjudge1 | E | Nov. 22, 2016, 1:36 p.m. | OK | GNU C++ | TESTS | 27 | 171 | 28876800 | 2600 | |
| 19352121 | Septher | E | July 23, 2016, 1:10 a.m. | OK | GNU C++ | TESTS | 27 | 187 | 24064000 | 2600 | |
| 12478328 | sagarkaniche | E | Aug. 12, 2015, 11:07 a.m. | OK | GNU C++ | TESTS | 27 | 202 | 54476800 | 2600 | |
| 12152637 | jugal_sahu | E | July 21, 2015, 5:54 p.m. | OK | GNU C++ | TESTS | 27 | 217 | 28876800 | 2600 | |
| 31236532 | Georeth | E | Oct. 12, 2017, 9:18 a.m. | OK | GNU C++11 | TESTS | 27 | 93 | 14336000 | 2600 | |
| 51933913 | luogu_bot2 | E | March 28, 2019, 11:41 a.m. | OK | GNU C++11 | TESTS | 27 | 124 | 19251200 | 2600 | |
| 49529778 | xielinhan | E | Feb. 6, 2019, 1:18 p.m. | OK | GNU C++11 | TESTS | 27 | 155 | 22425600 | 2600 | |
| 17552888 | naij | E | April 28, 2016, 1:10 p.m. | OK | GNU C++11 | TESTS | 27 | 155 | 44748800 | 2600 | |
| 11257086 | ShingRay | E | May 24, 2015, 5:30 p.m. | OK | GNU C++11 | TESTS | 27 | 156 | 17203200 | 2600 | |
| 54053544 | time_interspace | E | May 13, 2019, 6:29 a.m. | OK | GNU C++11 | TESTS | 27 | 156 | 23654400 | 2600 | |
| 12147146 | george_stelian | E | July 21, 2015, 1 p.m. | OK | GNU C++11 | TESTS | 27 | 156 | 52736000 | 2600 | |
| 54052836 | time_interspace | E | May 13, 2019, 5:50 a.m. | OK | GNU C++11 | TESTS | 27 | 171 | 23654400 | 2600 | |
| 26697764 | I_always_love_cc | E | April 27, 2017, 7:33 a.m. | OK | GNU C++11 | TESTS | 27 | 186 | 24576000 | 2600 | |
| 21838015 | snowy_smile | E | Oct. 28, 2016, 3:03 a.m. | OK | GNU C++11 | TESTS | 27 | 186 | 27238400 | 2600 | |
| 41606457 | 5120160705 | E | Aug. 15, 2018, 2:55 a.m. | OK | GNU C++14 | TESTS | 27 | 187 | 72089600 | 2600 | |
| 37377123 | bluefi | E | April 16, 2018, 3:37 p.m. | OK | GNU C++14 | TESTS | 27 | 202 | 25804800 | 2600 | |
| 25694632 | Noureldin | E | March 21, 2017, 4 p.m. | OK | GNU C++14 | TESTS | 27 | 218 | 29184000 | 2600 | |
| 55199164 | megatron10599 | E | June 6, 2019, 9:49 a.m. | OK | GNU C++14 | TESTS | 27 | 233 | 16793600 | 2600 | |
| 49124687 | tusg25 | E | Jan. 28, 2019, 9:39 p.m. | OK | GNU C++14 | TESTS | 27 | 233 | 22425600 | 2600 | |
| 31585050 | AryanSM | E | Oct. 21, 2017, 7:29 p.m. | OK | GNU C++14 | TESTS | 27 | 233 | 35635200 | 2600 | |
| 35885019 | ______u______ | E | March 3, 2018, 1:21 p.m. | OK | GNU C++14 | TESTS | 27 | 234 | 23552000 | 2600 | |
| 35884666 | ______n______ | E | March 3, 2018, 1:15 p.m. | OK | GNU C++14 | TESTS | 27 | 234 | 23552000 | 2600 | |
| 35883945 | _____k_____ | E | March 3, 2018, 1:03 p.m. | OK | GNU C++14 | TESTS | 27 | 234 | 23552000 | 2600 | |
| 35883642 | _____i_____ | E | March 3, 2018, 12:57 p.m. | OK | GNU C++14 | TESTS | 27 | 234 | 23552000 | 2600 | |
| 53655460 | yan-zp | E | May 2, 2019, 4:24 a.m. | OK | GNU C++17 | TESTS | 27 | 202 | 14438400 | 2600 | |
| 67582970 | AM. | E | Dec. 25, 2019, 7:01 a.m. | OK | GNU C++17 | TESTS | 27 | 233 | 12083200 | 2600 | |
| 69544445 | KevinWan | E | Jan. 26, 2020, 12:51 a.m. | OK | GNU C++17 | TESTS | 27 | 233 | 16793600 | 2600 | |
| 53562301 | Martin53 | E | April 30, 2019, 10:19 a.m. | OK | GNU C++17 | TESTS | 27 | 233 | 22425600 | 2600 | |
| 67471991 | OrangeRain | E | Dec. 23, 2019, 1:07 p.m. | OK | GNU C++17 | TESTS | 27 | 233 | 43315200 | 2600 | |
| 51933875 | Fulisike | E | March 28, 2019, 11:40 a.m. | OK | GNU C++17 | TESTS | 27 | 234 | 19251200 | 2600 | |
| 49225984 | zeyunow | E | Jan. 30, 2019, 11:01 p.m. | OK | GNU C++17 | TESTS | 27 | 249 | 25600000 | 2600 | |
| 49531115 | yypurpose12345 | E | Feb. 6, 2019, 1:51 p.m. | OK | GNU C++17 | TESTS | 27 | 249 | 30720000 | 2600 | |
| 38124360 | Smaug | E | May 11, 2018, 10:32 p.m. | OK | GNU C++17 | TESTS | 27 | 264 | 27648000 | 2600 | |
| 68375563 | Insane_A | E | Jan. 7, 2020, 7:40 p.m. | OK | GNU C++17 | TESTS | 27 | 280 | 14438400 | 2600 | |
| 11075448 | alibaba | E | May 12, 2015, 6:34 a.m. | OK | Java 7 | TESTS | 27 | 514 | 44544000 | 2600 | |
| 26115856 | benmiles | E | April 4, 2017, 7:38 a.m. | OK | Java 8 | TESTS | 27 | 342 | 82739200 | 2600 | |
| 11515548 | alculquicondor | E | June 9, 2015, 9:56 p.m. | OK | Java 8 | TESTS | 27 | 373 | 60006400 | 2600 | |
| 32340517 | Omar_Morsi | E | Nov. 15, 2017, 6:49 p.m. | OK | Java 8 | TESTS | 27 | 655 | 20070400 | 2600 | |
| 26108192 | sweiss | E | April 3, 2017, 8:08 p.m. | OK | Java 8 | TESTS | 27 | 717 | 34611200 | 2600 | |
| 13215443 | ypa | E | Sept. 25, 2015, 8:41 a.m. | OK | Java 8 | TESTS | 27 | 1855 | 49561600 | 2600 | |
| 13215382 | vjudge5 | E | Sept. 25, 2015, 8:36 a.m. | OK | Java 8 | TESTS | 27 | 1996 | 49356800 | 2600 | |
| 11519133 | og.kostya | E | June 10, 2015, 9:06 a.m. | OK | MS C# | TESTS | 27 | 312 | 15564800 | 2600 | |
| 11519104 | og.kostya | E | June 10, 2015, 9:03 a.m. | OK | MS C# | TESTS | 27 | 327 | 15462400 | 2600 | |
| 20189565 | yangxinthu | E | Aug. 27, 2016, 7:03 a.m. | OK | MS C++ | TESTS | 27 | 701 | 27750400 | 2600 | |
| 45785815 | marX | E | Nov. 16, 2018, 1:25 a.m. | OK | Rust | TESTS | 27 | 1200 | 43520000 | 2600 |
Back to search problems