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 |
---|---|---|---|---|---|---|
1108 | Codeforces Round 535 (Div. 3) | FINISHED | False | 7200 | 189271524 | Jan. 23, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4598 ) | E1 | Array and Segments (Easy version) | PROGRAMMING | brute force greedy implementation | 1800 |
B'The only difference between easy and hard versions is a number of elements in the array. You are given an array a consisting of n integers. The value of the i -th element of the array is a_i . You are also given a set of m segments. The j -th segment is [l_j; r_j] , where 1 <= l_j <= r_j <= n . You can choose some subset of the given set of segments and decrease values on each of the chosen segments by one (independently). For example, if the initial array a = [0, 0, 0, 0, 0] and the given segments are [1; 3] and [2; 4] then you can choose both of them and the array will become b = [-1, -2, -2, -1, 0] . You have to choose some subset of the given segments (each segment can be chosen at most once) in such a way that if you apply this subset of segments to the array a and obtain the array b then the value max limits_{i=1}^{n}b_i - min limits_{i=1}^{n}b_i will be maximum possible. Note that you can choose the empty set. If there are multiple answers, you can print any. If you are Python programmer, consider using PyPy instead of Python when you submit your code. The first line of the input contains two integers n and m ( 1 <= n <= 300, 0 <= m <= 300 ) -- the length of the array a and the number of segments, respectively. The second line of the input contains n integers a_1, a_2, ... , a_n ( -10^6 <= a_i <= 10^6 ), where a_i is the value of the i -th element of the array a . The next m lines are contain two integers each. The j -th of them contains two integers l_j and r_j ( 1 <= l_j <= r_j <= n ), where l_j and r_j are the ends of the j -th segment. In the first line of the output print one integer d -- the maximum possible value max limits_{i=1}^{n}b_i - min limits_{i=1}^{n}b_i if b is the array obtained by applying some subset of the given se'... |
64751 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
51796334 | rr_ | E1 | March 24, 2019, 3:23 p.m. | OK | D | TESTS | 82 | 77 | 11776000 | 1800 | |
54701368 | Denor | E1 | May 27, 2019, 12:03 a.m. | OK | Delphi | TESTS | 82 | 31 | 0 | 1800 | |
50685903 | ruban | E1 | March 2, 2019, 1:39 p.m. | OK | Delphi | TESTS | 82 | 561 | 86425600 | 1800 | |
50686691 | DarkAvengerr | E1 | March 2, 2019, 1:59 p.m. | OK | FPC | TESTS | 82 | 46 | 2457600 | 1800 | |
51853819 | chaorenhaha | E1 | March 26, 2019, 9:34 a.m. | OK | FPC | TESTS | 82 | 124 | 2252800 | 1800 | |
50821184 | Felix555 | E1 | March 5, 2019, 1:36 p.m. | OK | GNU C11 | TESTS | 82 | 31 | 0 | 1800 | |
48922458 | yueshaoqiang | E1 | Jan. 25, 2019, 8:33 a.m. | OK | GNU C11 | TESTS | 82 | 31 | 409600 | 1800 | |
54241631 | pk1210 | E1 | May 16, 2019, 1:12 p.m. | OK | GNU C11 | TESTS | 82 | 31 | 819200 | 1800 | |
54241270 | pk1210 | E1 | May 16, 2019, 1:03 p.m. | OK | GNU C11 | TESTS | 82 | 31 | 819200 | 1800 | |
49190481 | s0199988819 | E1 | Jan. 30, 2019, 8:01 a.m. | OK | GNU C11 | TESTS | 82 | 31 | 9420800 | 1800 | |
50823414 | kelvinhieu18 | E1 | March 5, 2019, 2:31 p.m. | OK | GNU C11 | TESTS | 82 | 78 | 0 | 1800 | |
60336911 | Hidden_18 | E1 | Sept. 10, 2019, 9 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
60065791 | JonasAAA | E1 | Sept. 5, 2019, 9:03 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
59981797 | nchu-18204226 | E1 | Sept. 4, 2019, 8:43 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
57507867 | nwpu2018302329 | E1 | July 22, 2019, 12:40 p.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
68144741 | lzq41 | E1 | Jan. 4, 2020, 3:20 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
68312604 | coolj70 | E1 | Jan. 6, 2020, 11:53 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
66205194 | Kaunta | E1 | Dec. 3, 2019, 2:02 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
65710244 | pkj | E1 | Nov. 25, 2019, 2:05 p.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
68340049 | aqing0219 | E1 | Jan. 7, 2020, 2:38 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
68477214 | 20181094 | E1 | Jan. 10, 2020, 6:10 a.m. | OK | GNU C++11 | TESTS | 82 | 31 | 0 | 1800 | |
49331203 | georgevidalakis | E1 | Feb. 1, 2019, 4:20 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 0 | 1800 | |
48993190 | praveenojha33 | E1 | Jan. 26, 2019, 3:21 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 0 | 1800 | |
49156471 | jagarwal | E1 | Jan. 29, 2019, 1:55 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 0 | 1800 | |
56393941 | cauchyg | E1 | July 1, 2019, 1:44 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 204800 | 1800 | |
49231272 | samarth1402 | E1 | Jan. 31, 2019, 5:42 a.m. | OK | GNU C++14 | TESTS | 82 | 30 | 204800 | 1800 | |
49153640 | 20172202958 | E1 | Jan. 29, 2019, 1:03 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 819200 | 1800 | |
49291329 | mahade31 | E1 | Jan. 31, 2019, 7:30 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 3686400 | 1800 | |
49215099 | nikolos00 | E1 | Jan. 30, 2019, 4:54 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 4198400 | 1800 | |
48989978 | krikti | E1 | Jan. 26, 2019, 1:58 p.m. | OK | GNU C++14 | TESTS | 82 | 30 | 5632000 | 1800 | |
49100510 | shamiaomiao | E1 | Jan. 28, 2019, 11:11 a.m. | OK | GNU C++14 | TESTS | 82 | 30 | 16281600 | 1800 | |
49285588 | Poimidorka | E1 | Jan. 31, 2019, 5:40 p.m. | OK | GNU C++17 | TESTS | 82 | 15 | 3788800 | 1800 | |
48920210 | max_kibble | E1 | Jan. 25, 2019, 7:26 a.m. | OK | GNU C++17 | TESTS | 82 | 15 | 7475200 | 1800 | |
50545092 | karpik | E1 | Feb. 26, 2019, 8:42 p.m. | OK | GNU C++17 | TESTS | 82 | 30 | 0 | 1800 | |
49505405 | bahumajanu | E1 | Feb. 5, 2019, 5:15 p.m. | OK | GNU C++17 | TESTS | 82 | 30 | 307200 | 1800 | |
49391990 | nohack7 | E1 | Feb. 3, 2019, 10:26 a.m. | OK | GNU C++17 | TESTS | 82 | 30 | 307200 | 1800 | |
48975119 | r1zzka1 | E1 | Jan. 26, 2019, 9:14 a.m. | OK | GNU C++17 | TESTS | 82 | 30 | 307200 | 1800 | |
48954932 | Curnurx | E1 | Jan. 26, 2019, 3:58 a.m. | OK | GNU C++17 | TESTS | 82 | 30 | 307200 | 1800 | |
49191008 | ntzyz | E1 | Jan. 30, 2019, 8:15 a.m. | OK | GNU C++17 | TESTS | 82 | 30 | 409600 | 1800 | |
49311957 | serreja | E1 | Feb. 1, 2019, 8:25 a.m. | OK | GNU C++17 | TESTS | 82 | 30 | 409600 | 1800 | |
49532315 | viniciustht | E1 | Feb. 6, 2019, 2:21 p.m. | OK | GNU C++17 | TESTS | 82 | 30 | 409600 | 1800 | |
48910660 | lordNoob | E1 | Jan. 25, 2019, 1:53 a.m. | OK | Java 8 | TESTS | 82 | 109 | 0 | 1800 | |
49097204 | kusomushi | E1 | Jan. 28, 2019, 10:13 a.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
69896350 | luchy0120 | E1 | Jan. 31, 2020, 11:50 a.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
66152209 | Blastman | E1 | Dec. 1, 2019, 7:36 p.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
55908143 | caoash | E1 | June 21, 2019, 10:38 p.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
50624377 | anirudhrahul | E1 | March 1, 2019, 4:49 a.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
49671111 | Jarik | E1 | Feb. 9, 2019, 5 p.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
49635838 | mu.shakhawat.hossain | E1 | Feb. 8, 2019, 6:39 p.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
49459715 | sumit3 | E1 | Feb. 4, 2019, 12:21 p.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
49241250 | shin2903 | E1 | Jan. 31, 2019, 10:25 a.m. | OK | Java 8 | TESTS | 82 | 124 | 0 | 1800 | |
49062694 | spookywooky | E1 | Jan. 27, 2019, 4:10 p.m. | OK | Kotlin | TESTS | 82 | 202 | 512000 | 1800 | |
50658254 | Mosyagin | E1 | March 1, 2019, 8:52 p.m. | OK | Mono C# | TESTS | 82 | 61 | 0 | 1800 | |
50236600 | NEvOl | E1 | Feb. 20, 2019, 11:01 a.m. | OK | Mono C# | TESTS | 82 | 62 | 3891200 | 1800 | |
49986473 | NEvOl | E1 | Feb. 16, 2019, 10:46 a.m. | OK | Mono C# | TESTS | 82 | 592 | 174284800 | 1800 | |
49187254 | zhy123 | E1 | Jan. 30, 2019, 6:39 a.m. | OK | MS C++ | TESTS | 82 | 31 | 0 | 1800 | |
48937938 | nonstopfor | E1 | Jan. 25, 2019, 3:07 p.m. | OK | MS C++ | TESTS | 82 | 31 | 0 | 1800 | |
54164523 | vjudge5 | E1 | May 15, 2019, 8:05 a.m. | OK | MS C++ | TESTS | 82 | 31 | 0 | 1800 | |
49400744 | universal42 | E1 | Feb. 3, 2019, 2:38 p.m. | OK | MS C++ | TESTS | 82 | 31 | 0 | 1800 | |
51246690 | Yanhui | E1 | March 13, 2019, 5:50 a.m. | OK | MS C++ | TESTS | 82 | 31 | 0 | 1800 | |
56835514 | ProjectBuild | E1 | July 11, 2019, 8:52 a.m. | OK | MS C++ | TESTS | 82 | 31 | 716800 | 1800 | |
50239299 | vjudge1 | E1 | Feb. 20, 2019, 12:16 p.m. | OK | MS C++ | TESTS | 82 | 31 | 819200 | 1800 | |
50081485 | ys1468362286 | E1 | Feb. 18, 2019, 4:28 a.m. | OK | MS C++ | TESTS | 82 | 31 | 1638400 | 1800 | |
50081491 | vjudge4 | E1 | Feb. 18, 2019, 4:28 a.m. | OK | MS C++ | TESTS | 82 | 31 | 1638400 | 1800 | |
49161064 | Numbervan | E1 | Jan. 29, 2019, 3:22 p.m. | OK | MS C++ | TESTS | 82 | 46 | 0 | 1800 | |
54545576 | hwangganzi | E1 | May 24, 2019, 5:58 a.m. | OK | MS C++ 2017 | TESTS | 82 | 31 | 0 | 1800 | |
58209762 | yorky | E1 | Aug. 3, 2019, 8:25 a.m. | OK | MS C++ 2017 | TESTS | 82 | 31 | 0 | 1800 | |
49687340 | sodala | E1 | Feb. 10, 2019, 8:18 a.m. | OK | MS C++ 2017 | TESTS | 82 | 31 | 409600 | 1800 | |
50523005 | tangbinjie | E1 | Feb. 26, 2019, 10:24 a.m. | OK | MS C++ 2017 | TESTS | 82 | 31 | 4812800 | 1800 | |
69713554 | pichulia | E1 | Jan. 29, 2020, 8:05 a.m. | OK | MS C++ 2017 | TESTS | 82 | 78 | 3993600 | 1800 | |
56159976 | zkq111 | E1 | June 27, 2019, 11:55 a.m. | OK | MS C++ 2017 | TESTS | 82 | 109 | 0 | 1800 | |
51225001 | beacon_cwk | E1 | March 12, 2019, 1:47 p.m. | OK | MS C++ 2017 | TESTS | 82 | 124 | 0 | 1800 | |
53481125 | petko_mitkov | E1 | April 28, 2019, 8:04 p.m. | OK | MS C++ 2017 | TESTS | 82 | 187 | 102400 | 1800 | |
48925721 | FatherofBenoni | E1 | Jan. 25, 2019, 10:19 a.m. | OK | PyPy 2 | TESTS | 82 | 155 | 1024000 | 1800 | |
49507169 | noob77777 | E1 | Feb. 5, 2019, 6:06 p.m. | OK | PyPy 2 | TESTS | 82 | 358 | 1331200 | 1800 | |
53738450 | Cifko | E1 | May 4, 2019, 12:21 p.m. | OK | PyPy 2 | TESTS | 82 | 467 | 8704000 | 1800 | |
49134834 | mihir_94 | E1 | Jan. 29, 2019, 7:05 a.m. | OK | PyPy 2 | TESTS | 82 | 670 | 5529600 | 1800 | |
52308926 | allonsy_kim | E1 | April 4, 2019, 1:41 p.m. | OK | PyPy 2 | TESTS | 82 | 1606 | 4915200 | 1800 | |
48906224 | MotaSanyal | E1 | Jan. 24, 2019, 8:37 p.m. | OK | PyPy 3 | TESTS | 82 | 170 | 1331200 | 1800 | |
50410372 | saku7 | E1 | Feb. 24, 2019, 1:54 a.m. | OK | PyPy 3 | TESTS | 82 | 171 | 1024000 | 1800 | |
48905805 | dizballanze | E1 | Jan. 24, 2019, 8:18 p.m. | OK | PyPy 3 | TESTS | 82 | 171 | 1638400 | 1800 | |
48929568 | adityaramesh | E1 | Jan. 25, 2019, 12:01 p.m. | OK | PyPy 3 | TESTS | 82 | 171 | 2048000 | 1800 | |
49490876 | c1729 leo7279 | E1 | Feb. 5, 2019, 9:44 a.m. | OK | PyPy 3 | TESTS | 82 | 186 | 819200 | 1800 | |
49063592 | Kyogre | E1 | Jan. 27, 2019, 4:37 p.m. | OK | PyPy 3 | TESTS | 82 | 186 | 2048000 | 1800 | |
49041001 | yellowflash | E1 | Jan. 27, 2019, 6:28 a.m. | OK | PyPy 3 | TESTS | 82 | 186 | 2048000 | 1800 | |
49057092 | yfo | E1 | Jan. 27, 2019, 1:47 p.m. | OK | PyPy 3 | TESTS | 82 | 187 | 1228800 | 1800 | |
49091756 | Knight.7 | E1 | Jan. 28, 2019, 8:48 a.m. | OK | PyPy 3 | TESTS | 82 | 187 | 2048000 | 1800 | |
49482424 | LChaves | E1 | Feb. 5, 2019, 12:37 a.m. | OK | PyPy 3 | TESTS | 82 | 187 | 2457600 | 1800 | |
48985085 | orailly | E1 | Jan. 26, 2019, 11:58 a.m. | OK | Python 3 | TESTS | 82 | 124 | 307200 | 1800 | |
48940919 | kabeer27 | E1 | Jan. 25, 2019, 4:28 p.m. | OK | Python 3 | TESTS | 82 | 202 | 409600 | 1800 | |
49603903 | EliasMera | E1 | Feb. 7, 2019, 6:27 p.m. | OK | Python 3 | TESTS | 82 | 202 | 7065600 | 1800 | |
49291165 | Leendertz | E1 | Jan. 31, 2019, 7:25 p.m. | OK | Python 3 | TESTS | 82 | 202 | 7065600 | 1800 | |
48966468 | bydooweedoo | E1 | Jan. 26, 2019, 7:27 a.m. | OK | Python 3 | TESTS | 82 | 810 | 307200 | 1800 | |
48990922 | ThePonyCoder | E1 | Jan. 26, 2019, 2:23 p.m. | OK | Python 3 | TESTS | 82 | 1107 | 409600 | 1800 | |
49689596 | bhavana4842 | E1 | Feb. 10, 2019, 10:21 a.m. | OK | Python 3 | TESTS | 82 | 1138 | 102400 | 1800 | |
49091703 | Knight.7 | E1 | Jan. 28, 2019, 8:47 a.m. | OK | Python 3 | TESTS | 82 | 1138 | 102400 | 1800 | |
49861149 | bestzx55 | E1 | Feb. 13, 2019, 9:33 a.m. | OK | Python 3 | TESTS | 82 | 1138 | 307200 | 1800 | |
49487684 | 16wh1a1221 | E1 | Feb. 5, 2019, 7:17 a.m. | OK | Python 3 | TESTS | 82 | 1216 | 102400 | 1800 | |
59972020 | sansen | E1 | Sept. 4, 2019, 2:23 a.m. | OK | Rust | TESTS | 82 | 31 | 0 | 1800 | |
49296950 | hot_yoghurt | E1 | Jan. 31, 2019, 11:56 p.m. | OK | Scala | TESTS | 82 | 654 | 716800 | 1800 |
Back to search problems