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 |
---|---|---|---|---|---|---|
1862 | Codeforces Round 894 (Div. 3) | FINISHED | False | 8100 | 44292263 | Aug. 24, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2972 ) | G | The Great Equalizer | PROGRAMMING | data structures math sortings |
B'Tema bought an old device with a small screen and a worn-out inscription "The Great Equalizer" on the side. The seller said that the device needs to be given an array a of integers as input, after which "The Great Equalizer" will work as follows: To test the operation of the device, Tema came up with a certain array of integers a , and then wanted to perform q operations on the array a of the following type: Help Tema find out the output values of the device after each operation. The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then follows the description of each test case. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the size of the array a that Tema initially came up with. The second line of each test case contains n integers a_1, a_2, a_3, ldots, a_n ( 1 <= a_i <= 10^9 ) -- the elements of the array a . The third line of a set contains a single integer q ( 1 <= q <= 2 cdot 10^5 ) -- the number of operations. Each of the next q lines of a test case contains two integers i ( 1 <= i <= n ) and x ( 1 <= x <= 10^9 ) - the descriptions of the operations. It is guaranteed that the sum of the values of n and the sum of the values of q for all test cases do not exceed 2 cdot 10^5 . For each test case, output q integers -- the output values of the device after each operation. Let 's consider the first example of the input. Initially, the array of numbers given as input to the device will be [6, 4, 8] . It will change as follows: [6, 4, 8] rightarrow [4, 6, 8] rightarrow [7, 8, 9] rightarrow [10, 10, 10] rightarrow [10] Then, the array of numbers given as input to the device will be [6, 10, 8] . It will change as follows: [6, 10, 8] rightarrow [6, 8, 10] rightarrow [9, 10, 11] '... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
220453158 | mban259 | G | Aug. 26, 2023, 2:47 a.m. | OK | C# 10 | TESTS | 36 | 3369 | 79769600 | ||
220405464 | starx2002 | G | Aug. 25, 2023, 4:07 p.m. | OK | GNU C++14 | TESTS | 36 | 873 | 39321600 | ||
220453489 | _ChiFAN_ | G | Aug. 26, 2023, 2:53 a.m. | OK | GNU C++14 | TESTS | 36 | 904 | 6451200 | ||
220377472 | RobertoFirmino | G | Aug. 25, 2023, 12:52 p.m. | OK | GNU C++14 | TESTS | 36 | 1076 | 35328000 | ||
220465888 | cxlian | G | Aug. 26, 2023, 5:58 a.m. | OK | GNU C++14 | TESTS | 36 | 1544 | 13824000 | ||
220458584 | yzj123 | G | Aug. 26, 2023, 4:22 a.m. | OK | GNU C++14 | TESTS | 36 | 1606 | 13824000 | ||
220457533 | ccsu_zx | G | Aug. 26, 2023, 4:03 a.m. | OK | GNU C++14 | TESTS | 36 | 1606 | 13824000 | ||
220448330 | wzx_ssl | G | Aug. 26, 2023, 1:09 a.m. | OK | GNU C++14 | TESTS | 36 | 1637 | 14643200 | ||
220458339 | huehuehue | G | Aug. 26, 2023, 4:18 a.m. | OK | GNU C++14 | TESTS | 36 | 1700 | 13824000 | ||
220457442 | sdjzu2333 | G | Aug. 26, 2023, 4:02 a.m. | OK | GNU C++14 | TESTS | 36 | 1715 | 13824000 | ||
220462179 | r_q | G | Aug. 26, 2023, 5:16 a.m. | OK | GNU C++14 | TESTS | 36 | 1715 | 14643200 | ||
220415782 | KamiyamaShiki | G | Aug. 25, 2023, 5:23 p.m. | OK | GNU C++17 | TESTS | 36 | 826 | 8908800 | ||
220405956 | imtangx | G | Aug. 25, 2023, 4:10 p.m. | OK | GNU C++17 | TESTS | 36 | 966 | 9011200 | ||
220370205 | AlexFisher | G | Aug. 25, 2023, 11:55 a.m. | OK | GNU C++17 | TESTS | 36 | 1138 | 30412800 | ||
220369111 | Charming | G | Aug. 25, 2023, 11:46 a.m. | OK | GNU C++17 | TESTS | 36 | 1262 | 15462400 | ||
220438969 | Satyanweshi45 | G | Aug. 25, 2023, 9:29 p.m. | OK | GNU C++17 | TESTS | 36 | 1278 | 9932800 | ||
220460971 | hvmegy | G | Aug. 26, 2023, 4:59 a.m. | OK | GNU C++17 | TESTS | 36 | 1372 | 10752000 | ||
220372875 | lucri | G | Aug. 25, 2023, 12:16 p.m. | OK | GNU C++17 | TESTS | 36 | 1403 | 8908800 | ||
220372873 | AIshuo | G | Aug. 25, 2023, 12:16 p.m. | OK | GNU C++17 | TESTS | 36 | 1466 | 18432000 | ||
220401347 | tea_party | G | Aug. 25, 2023, 3:38 p.m. | OK | GNU C++17 | TESTS | 36 | 1528 | 13926400 | ||
220439379 | algothink | G | Aug. 25, 2023, 9:37 p.m. | OK | GNU C++17 | TESTS | 36 | 1544 | 13824000 | ||
220464394 | Once_I_Liked_AGirl | G | Aug. 26, 2023, 5:41 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 904 | 12390400 | ||
220409418 | deneribeiro10 | G | Aug. 25, 2023, 4:34 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 998 | 11571200 | ||
220401844 | a2513472504 | G | Aug. 25, 2023, 3:41 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 1045 | 13414400 | ||
220457390 | fangqing | G | Aug. 26, 2023, 4:01 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 1263 | 27648000 | ||
220438213 | shuoxuanli | G | Aug. 25, 2023, 9:17 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 1716 | 20172800 | ||
220434980 | kematian | G | Aug. 25, 2023, 8:30 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 1746 | 22630400 | ||
220428016 | Cosysl | G | Aug. 25, 2023, 7:05 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 1794 | 22630400 | ||
220407869 | CECY | G | Aug. 25, 2023, 4:24 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 1825 | 20172800 | ||
220458502 | CHN_OMoon | G | Aug. 26, 2023, 4:21 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 1856 | 20172800 | ||
220361133 | anupamojha__21 | G | Aug. 25, 2023, 10:31 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 1918 | 20992000 | ||
220458896 | Nero | G | Aug. 26, 2023, 4:27 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 670 | 22118400 | ||
220431383 | kyukarumaicode55 | G | Aug. 25, 2023, 7:45 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 764 | 65536000 | ||
220366011 | ventusliberum | G | Aug. 25, 2023, 11:20 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 779 | 21196800 | ||
220463801 | vjudge4 | G | Aug. 26, 2023, 5:35 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 811 | 6451200 | ||
220430241 | CarlosS48 | G | Aug. 25, 2023, 7:30 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 967 | 12390400 | ||
220349084 | _windy | G | Aug. 25, 2023, 7:10 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 1044 | 11571200 | ||
220405498 | Thesircastor | G | Aug. 25, 2023, 4:07 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 1076 | 11980800 | ||
220360300 | itsHarshJ | G | Aug. 25, 2023, 10:15 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 1107 | 15974400 | ||
220360185 | whoami096 | G | Aug. 25, 2023, 10:13 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 1138 | 16486400 | ||
220364399 | whoami096 | G | Aug. 25, 2023, 11:06 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 1153 | 16486400 | ||
220463208 | profchi | G | Aug. 26, 2023, 5:29 a.m. | OK | Java 11 | TESTS | 36 | 2058 | 26726400 | ||
220404076 | WORTH | G | Aug. 25, 2023, 3:56 p.m. | OK | Java 11 | TESTS | 36 | 3119 | 17817600 | ||
220359849 | chuquwan9964 | G | Aug. 25, 2023, 10:06 a.m. | OK | Java 17 | TESTS | 36 | 2464 | 32972800 | ||
220448689 | wizardleen | G | Aug. 26, 2023, 1:17 a.m. | OK | Java 17 | TESTS | 36 | 2901 | 78540800 | ||
220411125 | q2045891621. | G | Aug. 25, 2023, 4:48 p.m. | OK | Java 17 | TESTS | 36 | 3431 | 21196800 | ||
220412933 | q2045891621. | G | Aug. 25, 2023, 5:02 p.m. | OK | Java 17 | TESTS | 36 | 3743 | 30822400 | ||
220454678 | Java_Programmer | G | Aug. 26, 2023, 3:14 a.m. | OK | Java 8 | TESTS | 36 | 3197 | 73113600 | ||
220369154 | Niraj0433 | G | Aug. 25, 2023, 11:46 a.m. | OK | PyPy 3-64 | TESTS | 36 | 2401 | 142131200 | ||
220451417 | gardengnome | G | Aug. 26, 2023, 2:12 a.m. | OK | PyPy 3-64 | TESTS | 36 | 2776 | 32972800 | ||
220451537 | gardengnome | G | Aug. 26, 2023, 2:15 a.m. | OK | PyPy 3-64 | TESTS | 36 | 3026 | 33792000 | ||
220404149 | aberent | G | Aug. 25, 2023, 3:57 p.m. | OK | PyPy 3-64 | TESTS | 36 | 3088 | 37580800 | ||
220448712 | ckngai | G | Aug. 26, 2023, 1:17 a.m. | OK | PyPy 3-64 | TESTS | 36 | 3290 | 32768000 | ||
220437998 | AyuAnchor | G | Aug. 25, 2023, 9:14 p.m. | OK | PyPy 3-64 | TESTS | 36 | 3291 | 32153600 | ||
220437957 | 2025 | G | Aug. 25, 2023, 9:13 p.m. | OK | PyPy 3-64 | TESTS | 36 | 3291 | 32153600 |
Back to search problems