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 |
1488
|
Kotlin Heroes: Episode 6 |
FINISHED |
False |
9000 |
121965863 |
March 9, 2021, 2:35 p.m. |
Problems
B"Recently, cryptocurrencies have become increasingly popular. Ann decided that it was about time she started mining the Dogecoin cryptocurrency. Ann's computer is not very powerful, so Ann mines exactly 1 Dogecoin per day. On the Internet, there are forecasts of the cost of 1 dogecoin for the next n days. Every day, Ann can sell any amount of dogecoin that she currently has. Note that if Ann mined Dogecoin on the i -th day, then she can sell it on the same day. Ann has not yet decided when to start mining. She has prepared q possible plans and for each of them wants to know the maximum profit that she can get. Each of the plans is described by two numbers l and r -- the first and last days of mining. Note that Ann should not have any Dogecoin left after the r -th day. The first line contains one integer n ( 1 <= n <= 2 cdot 10^5 ). The second line contains n integers c_1, c_2, ... , c_n ( 1 <= c_i <= 10^6 ), where c_i is the cost of Dogecoin on the i -th day. The third line contains one integer q ( 1 <= q <= 2 cdot 10^5 ) -- the number of Ann's plans. The following q lines contains two integers l and r ( 1 <= l <= r <= n ) -- the first and last days of mining. For each Ann's plan print one integer -- the maximum profit that she can get using this plan. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
109500788 |
Spheniscine |
F |
March 9, 2021, 3:57 p.m. |
OK |
Kotlin |
TESTS |
15 |
358 |
17100800 |
|
|
109497953 |
Egor |
F |
March 9, 2021, 3:26 p.m. |
OK |
Kotlin |
TESTS |
15 |
374 |
4710400 |
|
|
109509676 |
lightseba |
F |
March 9, 2021, 5:53 p.m. |
OK |
Kotlin |
TESTS |
15 |
436 |
7168000 |
|
|
109510393 |
emthrm |
F |
March 9, 2021, 6:04 p.m. |
OK |
Kotlin |
TESTS |
15 |
545 |
19456000 |
|
|
109498209 |
pashka |
F |
March 9, 2021, 3:29 p.m. |
OK |
Kotlin |
TESTS |
15 |
545 |
77926400 |
|
|
109503557 |
rapira |
F |
March 9, 2021, 4:30 p.m. |
OK |
Kotlin |
TESTS |
15 |
592 |
19968000 |
|
|
109500034 |
Ji_Kuai |
F |
March 9, 2021, 3:49 p.m. |
OK |
Kotlin |
TESTS |
15 |
608 |
19968000 |
|
|
109500337 |
Fortin |
F |
March 9, 2021, 3:52 p.m. |
OK |
Kotlin |
TESTS |
15 |
623 |
28979200 |
|
|
109506092 |
Svyat |
F |
March 9, 2021, 5:02 p.m. |
OK |
Kotlin |
TESTS |
15 |
639 |
33484800 |
|
|
109503838 |
Lily |
F |
March 9, 2021, 4:33 p.m. |
OK |
Kotlin |
TESTS |
15 |
639 |
34201600 |
|
|
remove filters
Back to search problems