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 |
---|---|---|---|---|---|---|
1482 | Технокубок 2021 - Финал | FINISHED | False | 10800 | 120857963 | March 21, 2021, 10:20 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3323 ) | E | Skyline Photo | PROGRAMMING | data structures dp |
B'Alice is visiting New York City. To make the trip fun, Alice will take photos of the city skyline and give the set of photos as a present to Bob. However, she wants to find the set of photos with maximum beauty and she needs your help. There are n buildings in the city, the i -th of them has positive height h_i . All n building heights in the city are different. In addition, each building has a beauty value b_i . Note that beauty can be positive or negative, as there are ugly buildings in the city too. A set of photos consists of one or more photos of the buildings in the skyline. Each photo includes one or more buildings in the skyline that form a contiguous segment of indices. Each building needs to be in exactly one photo. This means that if a building does not appear in any photo, or if a building appears in more than one photo, the set of pictures is not valid. The beauty of a photo is equivalent to the beauty b_i of the shortest building in it. The total beauty of a set of photos is the sum of the beauty of all photos in it. Help Alice to find the maximum beauty a valid set of photos can have. The first line contains an integer n ( 1 <= n <= 3 cdot 10^5 ), the number of buildings on the skyline. The second line contains n distinct integers h_1, h_2, ldots, h_n ( 1 <= h_i <= n ). The i -th number represents the height of building i . The third line contains n integers b_1, b_2, ldots, b_n ( -10^9 <= b_i <= 10^9 ). The i -th number represents the beauty of building i . Print one number representing the maximum beauty Alice can achieve for a valid set of photos of the skyline. In the first example, Alice can achieve maximum beauty by taking five photos, each one containing one building. In the second example, Alice can achieve a maximum beauty of 10 by taking four pictures: three just containing one building, on buildings 1 , 2 '... |
Technocup 2021: Final Round and Codeforces Round #709 — tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
110620192 | stanislau | E | March 21, 2021, 12:31 p.m. | OK | GNU C++11 | TESTS | 40 | 467 | 22118400 | ||
110613599 | Nutella3000 | E | March 21, 2021, 11:27 a.m. | OK | GNU C++14 | TESTS | 40 | 187 | 7168000 | ||
110621720 | baby_tape | E | March 21, 2021, 12:46 p.m. | OK | GNU C++14 | TESTS | 40 | 202 | 7372800 | ||
110620182 | The_Aragorn | E | March 21, 2021, 12:31 p.m. | OK | GNU C++14 | TESTS | 40 | 264 | 56115200 | ||
110625210 | YanikusGG | E | March 21, 2021, 1:17 p.m. | OK | GNU C++14 | TESTS | 40 | 280 | 81817600 | ||
110619670 | juggernaut | E | March 21, 2021, 12:26 p.m. | OK | GNU C++14 | TESTS | 40 | 296 | 12083200 | ||
110619803 | Rwarazor | E | March 21, 2021, 12:27 p.m. | OK | GNU C++14 | TESTS | 40 | 358 | 20070400 | ||
110613272 | usachevd0 | E | March 21, 2021, 11:24 a.m. | OK | GNU C++14 | TESTS | 40 | 421 | 30720000 | ||
110623909 | All1gator | E | March 21, 2021, 1:07 p.m. | OK | GNU C++14 | TESTS | 40 | 421 | 44748800 | ||
110616098 | uhiaoku | E | March 21, 2021, 11:51 a.m. | OK | GNU C++14 | TESTS | 40 | 436 | 26419200 | ||
110620455 | acm | E | March 21, 2021, 12:34 p.m. | OK | GNU C++14 | TESTS | 40 | 560 | 52121600 | ||
110716746 | fatemetmhr | E | March 22, 2021, 9:14 a.m. | OK | GNU C++17 | TESTS | 43 | 186 | 24678400 | ||
110616579 | DIvanCode | E | March 21, 2021, 11:55 a.m. | OK | GNU C++17 | TESTS | 40 | 202 | 4915200 | ||
110618487 | Dart-Xeyter | E | March 21, 2021, 12:14 p.m. | OK | GNU C++17 | TESTS | 40 | 202 | 7168000 | ||
110614404 | alexxela12345 | E | March 21, 2021, 11:35 a.m. | OK | GNU C++17 | TESTS | 40 | 202 | 7168000 | ||
110706347 | akulenok | E | March 22, 2021, 6:56 a.m. | OK | GNU C++17 | TESTS | 43 | 202 | 14745600 | ||
110617025 | ilaburkov | E | March 21, 2021, 11:59 a.m. | OK | GNU C++17 | TESTS | 40 | 217 | 7372800 | ||
110613890 | Mlxa | E | March 21, 2021, 11:30 a.m. | OK | GNU C++17 | TESTS | 40 | 217 | 7372800 | ||
110616109 | katyaporay | E | March 21, 2021, 11:51 a.m. | OK | GNU C++17 | TESTS | 40 | 217 | 26419200 | ||
110620913 | cat998__ | E | March 21, 2021, 12:38 p.m. | OK | GNU C++17 | TESTS | 40 | 217 | 38502400 | ||
110617457 | dshindov | E | March 21, 2021, 12:03 p.m. | OK | GNU C++17 | TESTS | 40 | 218 | 2560000 | ||
110615514 | Qwerty1232 | E | March 21, 2021, 11:45 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 109 | 4812800 | ||
110610225 | Pechalka | E | March 21, 2021, 10:56 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 109 | 6041600 | ||
110624581 | Kotehok3 | E | March 21, 2021, 1:12 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 109 | 7270400 | ||
110676256 | bulat_gayazov | E | March 21, 2021, 5:39 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 109 | 25497600 | ||
110611857 | Nybik | E | March 21, 2021, 11:11 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 124 | 4812800 | ||
110612060 | antony191 | E | March 21, 2021, 11:13 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 124 | 18227200 | ||
110621812 | egneeS | E | March 21, 2021, 12:47 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 140 | 4812800 | ||
110615773 | cute_hater | E | March 21, 2021, 11:47 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 140 | 7270400 | ||
110724965 | KKT_89 | E | March 22, 2021, 10:55 a.m. | OK | GNU C++17 (64) | TESTS | 43 | 140 | 16281600 | ||
110612930 | Mangooste | E | March 21, 2021, 11:20 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 155 | 12083200 | ||
110623220 | ulyabelyaeva | E | March 21, 2021, 1 p.m. | OK | PyPy 3 | TESTS | 40 | 686 | 36659200 |
Back to search problems