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 |
---|---|---|---|---|---|---|
1252 | 2019-2020 ICPC, Asia Jakarta Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 165292187 | Oct. 27, 2019, 3:30 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1264 ) | E | Songwriter | PROGRAMMING | greedy two pointers | 2300 |
B'Andi is a mathematician, a computer scientist, and a songwriter. After spending so much time writing songs, he finally writes a catchy melody that he thought as his best creation. However, the singer who will sing the song/melody has a unique vocal range, thus, an adjustment may be needed. A melody is defined as a sequence of N notes which are represented by integers. Let A be the original melody written by Andi. Andi needs to adjust A into a new melody B such that for every i where 1 <= i < N : Help Andi to determine whether such B exists, and find the lexicographically smallest B if it exists. A melody X is lexicographically smaller than melody Y if and only if there exists j ( 1 <= j <= N ) such that X_i = Y_i for all i < j and X_{j} < Y_{j} . For example, consider a melody A = {1,3,5,6,7,8,9,10,3,7,8,9,10,11,12,12 } as shown in the following figure. The diagonal arrow up in the figure implies that A_i < A_{i+1} , the straight right arrow implies that A_i = A_{i+1} , and the diagonal arrow down implies that A_i > A_{i+1} . Supposed we want to make a new melody with L = 1 , R = 8 , and K = 6 . The new melody B = {1,2,3,4,5,6,7,8,2,3,4,5,6,7,8,8 } as shown in the figure satisfies all the requirements, and it is the lexicographically smallest possible. Input begins with a line containing four integers: N L R K ( 1 <= N <= 100 ,000 ; 1 <= L <= R <= 10^9 ; 1 <= K <= 10^9 ) representing the number of notes in the melody, the vocal range ( L and R ), and the maximum difference between two successive notes in the new melody, respectively. The next line contains N integers: A_i ( 1 <= A_i <= 10^9 ) representing the original melody. Output in a line N integers (each separated by a single space) representing the lexicographically smallest melody satisfyin'... |
T |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
64123344 | vjudge2 | E | Nov. 3, 2019, 3:03 a.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1228800 | 2300 | |
64907920 | M_sea | E | Nov. 15, 2019, 12:12 a.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1638400 | 2300 | |
64890696 | M_sea | E | Nov. 14, 2019, 2:37 p.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1638400 | 2300 | |
64890668 | M_sea | E | Nov. 14, 2019, 2:37 p.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1638400 | 2300 | |
64890634 | M_sea | E | Nov. 14, 2019, 2:36 p.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1638400 | 2300 | |
64890456 | M_sea | E | Nov. 14, 2019, 2:32 p.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1638400 | 2300 | |
64890350 | M_sea | E | Nov. 14, 2019, 2:30 p.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1638400 | 2300 | |
64123075 | vjudge5 | E | Nov. 3, 2019, 2:53 a.m. | OK | GNU C++11 | TESTS | 85 | 46 | 1638400 | 2300 | |
63897097 | FairyHiweibolu zht111 Tommyr7 | E | Oct. 31, 2019, 2:47 a.m. | OK | GNU C++11 | TESTS | 85 | 46 | 2048000 | 2300 | |
64076963 | Kausal | E | Nov. 2, 2019, 9:02 a.m. | OK | GNU C++11 | TESTS | 85 | 46 | 3174400 | 2300 | |
65278598 | congthanh123 | E | Nov. 18, 2019, 3:48 a.m. | OK | GNU C++14 | TESTS | 85 | 46 | 1228800 | 2300 | |
64168707 | Gabriel98 yefrigg | E | Nov. 3, 2019, 5:26 p.m. | OK | GNU C++14 | TESTS | 85 | 46 | 1638400 | 2300 | |
63957850 | chenjb oipotato Subconscious | E | Nov. 1, 2019, 3:12 a.m. | OK | GNU C++14 | TESTS | 85 | 46 | 1638400 | 2300 | |
63534049 | liouzhou_101 lavender730 | E | Oct. 27, 2019, 7:33 a.m. | OK | GNU C++14 | TESTS | 85 | 46 | 11776000 | 2300 | |
67629645 | vjudge5 | E | Dec. 26, 2019, 2:32 a.m. | OK | GNU C++14 | TESTS | 85 | 61 | 819200 | 2300 | |
63797452 | Four-leafClover | E | Oct. 30, 2019, 1:09 p.m. | OK | GNU C++14 | TESTS | 85 | 61 | 1228800 | 2300 | |
63774507 | sy_chen | E | Oct. 30, 2019, 9:03 a.m. | OK | GNU C++14 | TESTS | 85 | 61 | 1228800 | 2300 | |
63563043 | Maripium | E | Oct. 27, 2019, 2:54 p.m. | OK | GNU C++14 | TESTS | 85 | 61 | 1228800 | 2300 | |
63534679 | ZYF1024 | E | Oct. 27, 2019, 7:43 a.m. | OK | GNU C++14 | TESTS | 85 | 61 | 1228800 | 2300 | |
64845014 | noticeMeSempai | E | Nov. 13, 2019, 5:19 p.m. | OK | GNU C++14 | TESTS | 85 | 61 | 1638400 | 2300 | |
64067353 | hat | E | Nov. 2, 2019, 6:15 a.m. | OK | GNU C++17 | TESTS | 85 | 46 | 1228800 | 2300 | |
63557650 | codgician | E | Oct. 27, 2019, 1:20 p.m. | OK | GNU C++17 | TESTS | 85 | 46 | 1638400 | 2300 | |
65510804 | interestingLSY | E | Nov. 22, 2019, 3:34 a.m. | OK | GNU C++17 | TESTS | 85 | 46 | 2662400 | 2300 | |
66774549 | krishanu21saini somyamehta_24 manavspg2 | E | Dec. 13, 2019, 9:24 a.m. | OK | GNU C++17 | TESTS | 85 | 61 | 1228800 | 2300 | |
65055891 | Dup4 | E | Nov. 15, 2019, 3:06 p.m. | OK | GNU C++17 | TESTS | 85 | 61 | 1228800 | 2300 | |
63533789 | pootis | E | Oct. 27, 2019, 7:29 a.m. | OK | GNU C++17 | TESTS | 85 | 61 | 1228800 | 2300 | |
63525724 | SheepRanger | E | Oct. 27, 2019, 5:11 a.m. | OK | GNU C++17 | TESTS | 85 | 61 | 1228800 | 2300 | |
63527112 | kut_kjb1994 hbi1998 | E | Oct. 27, 2019, 5:35 a.m. | OK | GNU C++17 | TESTS | 85 | 61 | 1331200 | 2300 | |
69064425 | sai | E | Jan. 18, 2020, 5:59 p.m. | OK | GNU C++17 | TESTS | 85 | 61 | 1638400 | 2300 | |
68244142 | couplefire | E | Jan. 5, 2020, 1:55 p.m. | OK | GNU C++17 | TESTS | 85 | 61 | 1638400 | 2300 | |
63750070 | Musin | E | Oct. 29, 2019, 7:55 p.m. | OK | Java 11 | TESTS | 85 | 202 | 0 | 2300 | |
63736848 | Musin | E | Oct. 29, 2019, 3:36 p.m. | OK | Java 11 | TESTS | 85 | 218 | 0 | 2300 | |
63527372 | n_inja mikit kcvlex | E | Oct. 27, 2019, 5:40 a.m. | OK | Java 8 | TESTS | 85 | 904 | 204800 | 2300 | |
63901716 | Spheniscine | E | Oct. 31, 2019, 4:57 a.m. | OK | Kotlin | TESTS | 85 | 171 | 1945600 | 2300 | |
63900192 | Spheniscine | E | Oct. 31, 2019, 4:52 a.m. | OK | Kotlin | TESTS | 85 | 186 | 2150400 | 2300 | |
66084519 | vjudge1 | E | Dec. 1, 2019, 3:27 a.m. | OK | MS C++ | TESTS | 85 | 62 | 1638400 | 2300 | |
65164979 | vesko.r.zdravkov | E | Nov. 16, 2019, 12:56 p.m. | OK | PyPy 3 | TESTS | 85 | 311 | 15052800 | 2300 | |
63525871 | FlakeLCR wow_ok conqueror_of_tourist | E | Oct. 27, 2019, 5:13 a.m. | OK | PyPy 3 | TESTS | 85 | 327 | 21196800 | 2300 | |
63617687 | alipervaiz rappel universe- | E | Oct. 27, 2019, 8:27 p.m. | OK | PyPy 3 | TESTS | 85 | 358 | 20992000 | 2300 | |
69004827 | RULO | E | Jan. 17, 2020, 10:07 p.m. | OK | Python 3 | TESTS | 85 | 420 | 18227200 | 2300 | |
65165051 | vesko.r.zdravkov | E | Nov. 16, 2019, 12:57 p.m. | OK | Python 3 | TESTS | 85 | 421 | 13414400 | 2300 | |
64080229 | naoya Surker23 hanstan | E | Nov. 2, 2019, 10:01 a.m. | OK | Python 3 | TESTS | 85 | 623 | 14950400 | 2300 |
Back to search problems