Good Bye 2022: 2023 is NEAR

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
1770 Good Bye 2022: 2023 is NEAR FINISHED False 9000 64855463 Dec. 30, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19797 ) B Koxia and Permutation PROGRAMMING constructive algorithms

B'Reve has two integers n and k . Let p be a permutation ^ dagger of length n . Let c be an array of length n - k + 1 such that c_i = max(p_i, ... , p_{i+k-1}) + min(p_i, ... , p_{i+k-1}). Let the cost of the permutation p be the maximum element of c . Koxia wants you to construct a permutation with the minimum possible cost. ^ dagger A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array), and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 2000 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains two integers n and k ( 1 <= q k <= q n <= q 2 cdot 10^5 ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output n integers p_1,p_2, ... ,p_n , which is a permutation with minimal cost. If there is more than one permutation with minimal cost, you may output any of them. In the first test case, Therefore, the cost is max(6,4,6)=6 . It can be proven that this is the minimal cost. '...

Tutorials

Good Bye 2022 -- Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
187437265 Kamill_m B Dec. 31, 2022, 11:02 a.m. OK C# 10 TESTS 18 670 3174400
187437230 LL__LOX B Dec. 31, 2022, 11:02 a.m. OK C# 10 TESTS 18 670 3174400
187488605 Sasikumar_22 B Jan. 1, 2023, 2:04 a.m. OK Clang++17 Diagnostics TESTS 18 109 0
187412817 coderspecial3131 B Dec. 31, 2022, 6:24 a.m. OK GNU C11 TESTS 18 811 0
187408377 ashh18 B Dec. 31, 2022, 5:28 a.m. OK GNU C11 TESTS 18 811 0
187427500 HVD_160 B Dec. 31, 2022, 9:10 a.m. OK GNU C11 TESTS 18 826 819200
187451372 Codeforces.c B Dec. 31, 2022, 1:44 p.m. OK GNU C11 TESTS 18 826 819200
187407957 Vibhav123 B Dec. 31, 2022, 5:22 a.m. OK GNU C11 TESTS 18 841 0
187454114 Harry_03 B Dec. 31, 2022, 2:17 p.m. OK GNU C11 TESTS 18 842 0
187400703 zeroliebe B Dec. 31, 2022, 2:55 a.m. OK GNU C++14 TESTS 18 31 0
187397665 -Complex- B Dec. 31, 2022, 1:29 a.m. OK GNU C++14 TESTS 18 31 0
187395479 Lavine B Dec. 31, 2022, 12:04 a.m. OK GNU C++14 TESTS 18 31 0
187439909 Fantasyli B Dec. 31, 2022, 11:34 a.m. OK GNU C++14 TESTS 18 31 0
187420532 Shrich B Dec. 31, 2022, 7:46 a.m. OK GNU C++14 TESTS 18 31 0
187402742 Lyccrius B Dec. 31, 2022, 3:43 a.m. OK GNU C++14 TESTS 18 31 0
187400997 qwaftex B Dec. 31, 2022, 3:01 a.m. OK GNU C++14 TESTS 18 31 819200
187400633 RDFZzzx B Dec. 31, 2022, 2:53 a.m. OK GNU C++14 TESTS 18 31 819200
187399000 Kamranali B Dec. 31, 2022, 2:12 a.m. OK GNU C++14 TESTS 18 31 1638400
187424868 shenhaomin B Dec. 31, 2022, 8:40 a.m. OK GNU C++14 TESTS 18 31 1638400
187433638 yordanpi B Dec. 31, 2022, 10:21 a.m. OK GNU C++17 TESTS 18 31 0
187433578 arpitgoyal878 B Dec. 31, 2022, 10:21 a.m. OK GNU C++17 TESTS 18 31 0
187431485 _family_rocks B Dec. 31, 2022, 9:56 a.m. OK GNU C++17 TESTS 18 31 0
187412794 Abhay_Khattry B Dec. 31, 2022, 6:23 a.m. OK GNU C++17 TESTS 18 31 0
187493874 pursuit_of_happiness B Jan. 1, 2023, 5:08 a.m. OK GNU C++17 TESTS 18 31 0
187456379 Kiwi06 B Dec. 31, 2022, 2:44 p.m. OK GNU C++17 TESTS 18 31 0
187486690 Etile9998 B Jan. 1, 2023, 12:35 a.m. OK GNU C++17 TESTS 18 31 0
187446460 Nickjia B Dec. 31, 2022, 12:48 p.m. OK GNU C++17 TESTS 18 31 0
187438627 Anurag203 B Dec. 31, 2022, 11:19 a.m. OK GNU C++17 TESTS 18 31 0
187437516 Shorya_1 B Dec. 31, 2022, 11:05 a.m. OK GNU C++17 TESTS 18 31 0
187453454 path_ B Dec. 31, 2022, 2:08 p.m. OK GNU C++17 (64) TESTS 18 31 0
187495093 kamisatoMiko B Jan. 1, 2023, 5:38 a.m. OK GNU C++17 (64) TESTS 18 31 0
187489975 lynmisakura B Jan. 1, 2023, 3:03 a.m. OK GNU C++17 (64) TESTS 18 31 0
187488691 kuluruvineeth B Jan. 1, 2023, 2:08 a.m. OK GNU C++17 (64) TESTS 18 31 0
187484294 INAUTUM B Dec. 31, 2022, 10:32 p.m. OK GNU C++17 (64) TESTS 18 31 0
187477252 awesomeguy856 B Dec. 31, 2022, 7:21 p.m. OK GNU C++17 (64) TESTS 18 31 0
187463137 Yumee B Dec. 31, 2022, 4:05 p.m. OK GNU C++17 (64) TESTS 18 31 0
187450963 aviral10 B Dec. 31, 2022, 1:40 p.m. OK GNU C++17 (64) TESTS 18 31 0
187445805 knatwila B Dec. 31, 2022, 12:41 p.m. OK GNU C++17 (64) TESTS 18 31 0
187437869 m7md_ashraf22 B Dec. 31, 2022, 11:10 a.m. OK GNU C++17 (64) TESTS 18 31 0
187419549 black_fyre B Dec. 31, 2022, 7:34 a.m. OK GNU C++20 (64) TESTS 18 15 0
187423499 kaptollika2345551 B Dec. 31, 2022, 8:23 a.m. OK GNU C++20 (64) TESTS 18 15 0
187444041 Ryougi-Shiki B Dec. 31, 2022, 12:21 p.m. OK GNU C++20 (64) TESTS 18 15 0
187445491 Summer_Water B Dec. 31, 2022, 12:38 p.m. OK GNU C++20 (64) TESTS 18 15 0
187396536 lucccff B Dec. 31, 2022, 12:48 a.m. OK GNU C++20 (64) TESTS 18 15 409600
187481236 xenderxing123 B Dec. 31, 2022, 8:54 p.m. OK GNU C++20 (64) TESTS 18 30 0
187450517 Dream_Veid B Dec. 31, 2022, 1:34 p.m. OK GNU C++20 (64) TESTS 18 30 0
187433837 AnuragTripathi B Dec. 31, 2022, 10:23 a.m. OK GNU C++20 (64) TESTS 18 30 0
187432738 kumar_333 B Dec. 31, 2022, 10:11 a.m. OK GNU C++20 (64) TESTS 18 30 0
187481252 tonystark2022003 B Dec. 31, 2022, 8:55 p.m. OK GNU C++20 (64) TESTS 18 30 0
187409543 yeroc B Dec. 31, 2022, 5:45 a.m. OK Java 11 TESTS 18 217 0
187381125 wat2 B Dec. 30, 2022, 6:57 p.m. OK Java 11 TESTS 18 218 0
187427604 coderama B Dec. 31, 2022, 9:11 a.m. OK Java 11 TESTS 18 233 0
187391818 uttaran_das B Dec. 30, 2022, 9:49 p.m. OK Java 11 TESTS 18 233 2252800
187472500 ru_cp_p B Dec. 31, 2022, 6 p.m. OK Java 11 TESTS 18 249 0
187422674 amanraj01 B Dec. 31, 2022, 8:13 a.m. OK Java 11 TESTS 18 249 0
187415672 rounakchauhan70 B Dec. 31, 2022, 6:53 a.m. OK Java 11 TESTS 18 249 0
187470165 etian6795 B Dec. 31, 2022, 5:31 p.m. OK Java 11 TESTS 18 249 102400
187413101 La_Pagla B Dec. 31, 2022, 6:27 a.m. OK Java 11 TESTS 18 264 0
187411297 Jagnath_Reddy B Dec. 31, 2022, 6:07 a.m. OK Java 11 TESTS 18 296 0
187387724 not_just_rr B Dec. 30, 2022, 8:23 p.m. OK Java 17 TESTS 18 249 921600
187440715 Srisaivamshi B Dec. 31, 2022, 11:43 a.m. OK Java 17 TESTS 18 280 614400
187427847 Faizan2.0 B Dec. 31, 2022, 9:14 a.m. OK Java 17 TESTS 18 295 614400
187417897 goalboy B Dec. 31, 2022, 7:16 a.m. OK Java 17 TESTS 18 295 16998400
187384766 CrinklyGolem B Dec. 30, 2022, 7:40 p.m. OK Java 17 TESTS 18 296 921600
187417202 goalboy B Dec. 31, 2022, 7:09 a.m. OK Java 17 TESTS 18 296 17203200
187411846 mdmehedihqssqn B Dec. 31, 2022, 6:13 a.m. OK Java 17 TESTS 18 311 921600
187403681 The_Blazing B Dec. 31, 2022, 4:04 a.m. OK Java 17 TESTS 18 623 921600
187386975 Eugenics B Dec. 30, 2022, 8:11 p.m. OK Java 17 TESTS 18 764 819200
187407126 DevanshuSharma-Deva B Dec. 31, 2022, 5:10 a.m. OK Java 17 TESTS 18 873 1126400
187460001 rohit_ramdas_v B Dec. 31, 2022, 3:28 p.m. OK Java 8 TESTS 18 124 0
187381854 Koka B Dec. 30, 2022, 7:04 p.m. OK Java 8 TESTS 18 124 0
187428052 rahul_dce B Dec. 31, 2022, 9:16 a.m. OK Java 8 TESTS 18 124 2457600
187391311 Sussykin B Dec. 30, 2022, 9:35 p.m. OK Java 8 TESTS 18 124 2457600
187494348 deepoX B Jan. 1, 2023, 5:21 a.m. OK Java 8 TESTS 18 139 2457600
187459891 rohit_ramdas_v B Dec. 31, 2022, 3:27 p.m. OK Java 8 TESTS 18 140 0
187424474 icpc_loser B Dec. 31, 2022, 8:35 a.m. OK Java 8 TESTS 18 155 0
187406930 vis21 B Dec. 31, 2022, 5:06 a.m. OK Java 8 TESTS 18 170 0
187433265 wizardleen B Dec. 31, 2022, 10:17 a.m. OK Java 8 TESTS 18 202 13824000
187403420 QUITTING B Dec. 31, 2022, 3:58 a.m. OK Java 8 TESTS 18 248 4915200
187406271 eneskayiklik B Dec. 31, 2022, 4:56 a.m. OK Kotlin 1.7 TESTS 18 468 63488000
187400958 1434314294 B Dec. 31, 2022, 3 a.m. OK MS C++ 2017 TESTS 18 124 0
187399147 Pregabalin B Dec. 31, 2022, 2:16 a.m. OK MS C++ 2017 TESTS 18 124 0
187471948 agniv123 B Dec. 31, 2022, 5:54 p.m. OK MS C++ 2017 TESTS 18 124 2252800
187471057 agniv123 B Dec. 31, 2022, 5:42 p.m. OK MS C++ 2017 TESTS 18 124 2252800
187447275 yosefeyad024 B Dec. 31, 2022, 12:58 p.m. OK MS C++ 2017 TESTS 18 140 0
187430618 Aksurana B Dec. 31, 2022, 9:46 a.m. OK MS C++ 2017 TESTS 18 140 0
187448887 YMSeah B Dec. 31, 2022, 1:16 p.m. OK PyPy 3 TESTS 18 202 13414400
187440578 rajeshpenugonda B Dec. 31, 2022, 11:41 a.m. OK PyPy 3 TESTS 18 233 16281600
187384285 grawlixes B Dec. 30, 2022, 7:33 p.m. OK PyPy 3 TESTS 18 264 14336000
187430511 yashvashistha958 B Dec. 31, 2022, 9:45 a.m. OK PyPy 3 TESTS 18 280 12595200
187409595 Secret_19 B Dec. 31, 2022, 5:45 a.m. OK PyPy 3 TESTS 18 280 12595200
187491330 Calabash_yang B Jan. 1, 2023, 3:52 a.m. OK PyPy 3 TESTS 18 280 13824000
187412440 torqueaj B Dec. 31, 2022, 6:19 a.m. OK PyPy 3 TESTS 18 327 9932800
187423341 Pranjallko B Dec. 31, 2022, 8:22 a.m. OK PyPy 3 TESTS 18 358 9932800
187390522 taksqth B Dec. 30, 2022, 9:15 p.m. OK PyPy 3-64 TESTS 18 93 8908800
187448541 xy961218 B Dec. 31, 2022, 1:12 p.m. OK PyPy 3-64 TESTS 18 93 12288000
187450575 anshumannandan B Dec. 31, 2022, 1:35 p.m. OK PyPy 3-64 TESTS 18 109 9011200
187411077 shotoyoo B Dec. 31, 2022, 6:04 a.m. OK PyPy 3-64 TESTS 18 109 10854400
187430002 V.Karthik B Dec. 31, 2022, 9:38 a.m. OK PyPy 3-64 TESTS 18 109 14643200
187402863 Youarenotgood B Dec. 31, 2022, 3:45 a.m. OK PyPy 3-64 TESTS 18 109 16076800
187390738 ste7an B Dec. 30, 2022, 9:21 p.m. OK PyPy 3-64 TESTS 18 109 16076800
187465046 Triump_0112 B Dec. 31, 2022, 4:30 p.m. OK PyPy 3-64 TESTS 18 109 16179200
187405262 zouyu9631 B Dec. 31, 2022, 4:38 a.m. OK PyPy 3-64 TESTS 18 109 21094400
187481605 sparsh.saxena234 B Dec. 31, 2022, 9:06 p.m. OK PyPy 3-64 TESTS 18 124 16076800
187428997 phlao5654we B Dec. 31, 2022, 9:27 a.m. OK Python 3 TESTS 18 140 16486400
187416855 godsdice B Dec. 31, 2022, 7:05 a.m. OK Python 3 TESTS 18 171 10854400
187426606 slickk B Dec. 31, 2022, 9 a.m. OK Python 3 TESTS 18 234 2867200
187492325 Rahulsust B Jan. 1, 2023, 4:24 a.m. OK Python 3 TESTS 18 264 3891200
187407105 Red_luigi B Dec. 31, 2022, 5:09 a.m. OK Python 3 TESTS 18 265 5632000
187406315 FCBd_w B Dec. 31, 2022, 4:56 a.m. OK Python 3 TESTS 18 295 0
187394622 Rayhan1011414120 B Dec. 30, 2022, 11:24 p.m. OK Python 3 TESTS 18 295 6041600
187401988 sonic407 B Dec. 31, 2022, 3:26 a.m. OK Python 3 TESTS 18 296 0
187397469 ladirajagupta2001 B Dec. 31, 2022, 1:22 a.m. OK Python 3 TESTS 18 296 6041600
187379587 OzodbekX B Dec. 30, 2022, 6:41 p.m. OK Python 3 TESTS 18 296 6041600
187400092 Spheniscine B Dec. 31, 2022, 2:41 a.m. OK Rust 2021 TESTS 18 31 4300800
187399873 Spheniscine B Dec. 31, 2022, 2:36 a.m. OK Rust 2021 TESTS 18 31 5939200

remove filters

Back to search problems