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 |
---|---|---|---|---|---|---|
1201 | Codeforces Round 577 (Div. 2) | FINISHED | False | 7200 | 166886699 | Aug. 4, 2019, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 24143 ) | C | Maximum Median | PROGRAMMING | binary search greedy math sortings | 1400 |
B"You are given an array a of n integers, where n is odd. You can make the following operation with it: You want to make the median of the array the largest possible using at most k operations. The median of the odd-sized array is the middle element after the array is sorted in non-decreasing order. For example, the median of the array [1, 5, 2, 3, 5] is 3 . The first line contains two integers n and k ( 1 <= n <= 2 cdot 10^5 , n is odd, 1 <= k <= 10^9 ) -- the number of elements in the array and the largest number of operations you can make. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ). Print a single integer -- the maximum possible median after the operations. In the first example, you can increase the second element twice. Than array will be [1, 5, 5] and it's median is 5 . In the second example, it is optimal to increase the second number and than increase third and fifth. This way the answer is 3 . In the third example, you can make four operations: increase first, fourth, sixth, seventh element. This way the array will be [5, 1, 2, 5, 3, 5, 5] and the median will be 5 . "... |
Codeforces Round #577 (Div 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
58284343 | ruban | C | Aug. 4, 2019, 5:12 p.m. | OK | Delphi | TESTS | 56 | 171 | 73318400 | 1400 | |
58294045 | naranja011223 | C | Aug. 4, 2019, 5:47 p.m. | OK | FPC | TESTS | 56 | 77 | 3993600 | 1400 | |
58295513 | Craspedacusta | C | Aug. 4, 2019, 5:54 p.m. | OK | FPC | TESTS | 56 | 93 | 819200 | 1400 | |
58284699 | LaSWeeG | C | Aug. 4, 2019, 5:13 p.m. | OK | FPC | TESTS | 56 | 93 | 1638400 | 1400 | |
58283742 | hs-black | C | Aug. 4, 2019, 5:10 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 819200 | 1400 | |
58283595 | Thomasguo666 | C | Aug. 4, 2019, 5:09 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 819200 | 1400 | |
58283074 | Huang_Yuhan | C | Aug. 4, 2019, 5:08 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 1638400 | 1400 | |
58281593 | eric161324 | C | Aug. 4, 2019, 5:04 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 1638400 | 1400 | |
58280641 | Zachary_260325_cpp | C | Aug. 4, 2019, 5:01 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 1638400 | 1400 | |
58280597 | orzzcy | C | Aug. 4, 2019, 5:01 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 1638400 | 1400 | |
58280279 | Orange_JuiCE | C | Aug. 4, 2019, 5 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 1638400 | 1400 | |
58276764 | bluexzy | C | Aug. 4, 2019, 4:52 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 1638400 | 1400 | |
58288413 | NicoDafaGood | C | Aug. 4, 2019, 5:25 p.m. | OK | GNU C++11 | TESTS | 56 | 46 | 3174400 | 1400 |
Back to search problems