Codeforces Round 790 (Div. 4)

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
1676 Codeforces Round 790 (Div. 4) FINISHED False 7200 79629299 May 10, 2022, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16960 ) F Longest Strike PROGRAMMING data structures greedy implementation sortings two pointers

B'Given an array a of length n and an integer k , you are tasked to find any two numbers l and r ( l <= q r ) such that: If no numbers satisfy the conditions, output -1. For example, if a=[11, 11, 12, 13, 13, 14, 14] and k=2 , then: A pair of l and r for which the first condition holds and r-l is maximal is l = 13 , r = 14 . The first line of the input contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains the integers n and k ( 1 <= n <= 2 cdot 10^5 , 1 <= q k <= q n ) -- the length of the array a and the minimum amount of times each number in the range [l, r] should appear respectively. Then a single line follows, containing n integers describing the array a ( 1 <= q a_i <= q 10^9 ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case output 2 numbers, l and r that satisfy the conditions, or "-1" if no numbers satisfy the conditions. If multiple answers exist, you can output any. '...

Tutorials

Codeforces Round #790 (Div. 4) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
156824014 bluemegane F May 11, 2022, 11:28 a.m. OK C# 8 TESTS 23 186 32768000
156794513 hibye1217 F May 11, 2022, 8:06 a.m. OK GNU C11 TESTS 23 62 1638400
156804727 Graythron F May 11, 2022, 9:26 a.m. OK GNU C++14 TESTS 23 62 819200
156844795 luogu_bot3 F May 11, 2022, 3:08 p.m. OK GNU C++14 TESTS 23 78 819200
156793952 whiteskull F May 11, 2022, 7:59 a.m. OK GNU C++14 TESTS 23 78 1638400
156792527 BElive F May 11, 2022, 7:41 a.m. OK GNU C++14 TESTS 23 78 2457600
156787040 ManharGupta F May 11, 2022, 6:34 a.m. OK GNU C++14 TESTS 23 78 2457600
156875876 Rzarman F May 12, 2022, 1:13 a.m. OK GNU C++14 TESTS 23 78 2457600
156853744 ashpardhi9696 F May 11, 2022, 5 p.m. OK GNU C++14 TESTS 23 78 3993600
156790736 kushal_sheth F May 11, 2022, 7:19 a.m. OK GNU C++14 TESTS 23 78 4812800
156820482 daikaduc F May 11, 2022, 10:49 a.m. OK GNU C++14 TESTS 23 78 32051200
156799477 Bliss_of_comprehension F May 11, 2022, 9:05 a.m. OK GNU C++14 TESTS 23 92 2457600
156826887 khshg F May 11, 2022, 11:57 a.m. OK GNU C++17 TESTS 23 62 819200
156828365 in_use F May 11, 2022, 12:12 p.m. OK GNU C++17 TESTS 23 62 1638400
156788030 Ruins F May 11, 2022, 6:45 a.m. OK GNU C++17 TESTS 23 62 2457600
156790691 Amigomust F May 11, 2022, 7:18 a.m. OK GNU C++17 TESTS 23 62 2457600
156800307 wyy_233 F May 11, 2022, 9:15 a.m. OK GNU C++17 TESTS 23 62 3174400
156798459 codenarocode F May 11, 2022, 8:52 a.m. OK GNU C++17 TESTS 23 77 819200
156831714 KAUSTUBH152003 F May 11, 2022, 12:45 p.m. OK GNU C++17 TESTS 23 77 1638400
156863885 abdosaad2 F May 11, 2022, 7:21 p.m. OK GNU C++17 TESTS 23 77 2457600
156843711 p4lacios F May 11, 2022, 2:53 p.m. OK GNU C++17 TESTS 23 77 2457600
156814655 haesb F May 11, 2022, 9:40 a.m. OK GNU C++17 TESTS 23 77 2662400
156865857 avicodes F May 11, 2022, 7:56 p.m. OK GNU C++17 (64) TESTS 23 46 2969600
156799603 Somaditya02 F May 11, 2022, 9:06 a.m. OK GNU C++17 (64) TESTS 23 61 1638400
156788230 mandy_17 F May 11, 2022, 6:47 a.m. OK GNU C++17 (64) TESTS 23 93 18739200
156836888 starchaser F May 11, 2022, 1:37 p.m. OK GNU C++17 (64) TESTS 23 93 21401600
156833505 starchaser F May 11, 2022, 1:03 p.m. OK GNU C++17 (64) TESTS 23 109 21401600
156825477 codertonk F May 11, 2022, 11:43 a.m. OK GNU C++17 (64) TESTS 23 124 10444800
156815905 adid_r10 F May 11, 2022, 9:55 a.m. OK GNU C++17 (64) TESTS 23 139 9728000
156817857 jahid_arif F May 11, 2022, 10:18 a.m. OK GNU C++17 (64) TESTS 23 139 12595200
156824937 SolarNova F May 11, 2022, 11:38 a.m. OK GNU C++17 (64) TESTS 23 139 12595200
156876147 IrisQAQ F May 12, 2022, 1:22 a.m. OK GNU C++17 (64) TESTS 23 140 819200
156791634 EnterYourName F May 11, 2022, 7:30 a.m. OK GNU C++20 (64) TESTS 23 46 819200
156877548 silent_Joy F May 12, 2022, 2:12 a.m. OK GNU C++20 (64) TESTS 23 46 819200
156791124 _JP007 F May 11, 2022, 7:24 a.m. OK GNU C++20 (64) TESTS 23 46 1638400
156861465 erto F May 11, 2022, 6:43 p.m. OK GNU C++20 (64) TESTS 23 46 1638400
156875390 caiBird555 F May 12, 2022, 12:55 a.m. OK GNU C++20 (64) TESTS 23 46 2150400
156843649 daniyar-is-019_er-2025 F May 11, 2022, 2:53 p.m. OK GNU C++20 (64) TESTS 23 46 2457600
156821624 iCatOH F May 11, 2022, 11:02 a.m. OK GNU C++20 (64) TESTS 23 46 2969600
156787422 SaiPrasad_27 F May 11, 2022, 6:38 a.m. OK GNU C++20 (64) TESTS 23 46 2969600
156787197 SaiPrasad_27 F May 11, 2022, 6:36 a.m. OK GNU C++20 (64) TESTS 23 46 2969600
156834981 zywyshangan F May 11, 2022, 1:18 p.m. OK GNU C++20 (64) TESTS 23 46 2969600
156788865 chenxiaoming F May 11, 2022, 6:55 a.m. OK Java 11 TESTS 23 280 7884800
156838993 anmol.mact F May 11, 2022, 2 p.m. OK Java 11 TESTS 23 389 18534400
156882942 Kaldaruly F May 12, 2022, 4:24 a.m. OK Java 11 TESTS 23 421 18534400
156789418 goyalneha2607 F May 11, 2022, 7:02 a.m. OK Java 11 TESTS 23 436 19148800
156798056 JIRAIYA_Sama F May 11, 2022, 8:47 a.m. OK Java 11 TESTS 23 451 16793600
156798519 v7fgg F May 11, 2022, 8:53 a.m. OK Java 11 TESTS 23 451 18739200
156799918 amitmandal F May 11, 2022, 9:11 a.m. OK Java 11 TESTS 23 452 24985600
156847702 im_amanaashish F May 11, 2022, 3:44 p.m. OK Java 11 TESTS 23 452 32563200
156866613 eshan18.09 F May 11, 2022, 8:10 p.m. OK Java 11 TESTS 23 514 23244800
156837482 Aaryendra F May 11, 2022, 1:43 p.m. OK Java 11 TESTS 23 530 17408000
156853067 PrElude1201 F May 11, 2022, 4:51 p.m. OK Java 8 TESTS 23 218 6041600
156852668 PrElude1201 F May 11, 2022, 4:45 p.m. OK Java 8 TESTS 23 218 6144000
156848773 Belal_Abouraya F May 11, 2022, 3:56 p.m. OK Java 8 TESTS 23 233 6451200
156856382 PrElude1201 F May 11, 2022, 5:37 p.m. OK Java 8 TESTS 23 265 6041600
156853136 srijanchakraborty F May 11, 2022, 4:52 p.m. OK Java 8 TESTS 23 296 14745600
156828423 govindrajput F May 11, 2022, 12:13 p.m. OK Java 8 TESTS 23 312 14745600
156881622 Zahid_Hasan_Sahin F May 12, 2022, 3:55 a.m. OK Java 8 TESTS 23 312 18329600
156873519 gblake31 F May 11, 2022, 11:37 p.m. OK Java 8 TESTS 23 373 18124800
156798834 ttolkku F May 11, 2022, 8:57 a.m. OK Java 8 TESTS 23 390 18944000
156855597 PrElude1201 F May 11, 2022, 5:26 p.m. OK Java 8 TESTS 23 436 0
156856651 Tangerine F May 11, 2022, 5:40 p.m. OK MS C++ 2017 TESTS 23 280 9728000
156866166 Still_Theory F May 11, 2022, 8:02 p.m. OK MS C++ 2017 TESTS 23 312 14540800
156849450 bhdtr F May 11, 2022, 4:05 p.m. OK MS C++ 2017 TESTS 23 358 8704000
156819975 ELPSYCONGROON F May 11, 2022, 10:42 a.m. OK MS C++ 2017 TESTS 23 374 13721600
156814139 XYShaoKang F May 11, 2022, 9:34 a.m. OK Node.js TESTS 23 265 37376000
156859277 ShrijitShaswat F May 11, 2022, 6:13 p.m. OK PyPy 3 TESTS 23 171 19353600
156787189 YMSeah F May 11, 2022, 6:36 a.m. OK PyPy 3 TESTS 23 202 19046400
156792622 aayush_chhabra F May 11, 2022, 7:42 a.m. OK PyPy 3 TESTS 23 202 25190400
156792253 AbnerShen F May 11, 2022, 7:38 a.m. OK PyPy 3 TESTS 23 202 26419200
156795672 AbnerShen F May 11, 2022, 8:20 a.m. OK PyPy 3 TESTS 23 249 26316800
156872335 samchen123 F May 11, 2022, 10:46 p.m. OK PyPy 3 TESTS 23 296 17715200
156858452 KeiTsukishima F May 11, 2022, 6:02 p.m. OK PyPy 3 TESTS 23 311 24985600
156822381 shy3205 F May 11, 2022, 11:11 a.m. OK PyPy 3 TESTS 23 327 22016000
156867111 titia F May 11, 2022, 8:20 p.m. OK PyPy 3 TESTS 23 358 24780800
156882716 sepa38 F May 12, 2022, 4:19 a.m. OK PyPy 3 TESTS 23 405 28569600
156798315 jimm89 F May 11, 2022, 8:50 a.m. OK PyPy 3-64 TESTS 23 140 28979200
156818005 yusinv F May 11, 2022, 10:20 a.m. OK PyPy 3-64 TESTS 23 156 32665600
156798235 jimm89 F May 11, 2022, 8:49 a.m. OK PyPy 3-64 TESTS 23 186 28979200
156829258 beethoven97 F May 11, 2022, 12:21 p.m. OK PyPy 3-64 TESTS 23 186 39731200
156798568 oadey89 F May 11, 2022, 8:53 a.m. OK PyPy 3-64 TESTS 23 187 28979200
156792844 siganai F May 11, 2022, 7:45 a.m. OK PyPy 3-64 TESTS 23 187 32358400
156840227 bjy F May 11, 2022, 2:14 p.m. OK PyPy 3-64 TESTS 23 202 30105600
156875124 Juanm1 F May 12, 2022, 12:45 a.m. OK PyPy 3-64 TESTS 23 202 37580800
156857934 AbnerShen F May 11, 2022, 5:55 p.m. OK PyPy 3-64 TESTS 23 202 37683200
156858005 AbnerShen F May 11, 2022, 5:56 p.m. OK PyPy 3-64 TESTS 23 218 37888000
156798453 FrozenKandy F May 11, 2022, 8:52 a.m. OK Python 3 TESTS 23 280 13721600
156881728 jloai009 F May 12, 2022, 3:57 a.m. OK Python 3 TESTS 23 343 16793600
156881367 jloai009 F May 12, 2022, 3:49 a.m. OK Python 3 TESTS 23 343 16793600
156867766 titia F May 11, 2022, 8:33 p.m. OK Python 3 TESTS 23 390 17408000
156842285 rr745 F May 11, 2022, 2:36 p.m. OK Python 3 TESTS 23 436 16486400
156787034 KK_1729 F May 11, 2022, 6:34 a.m. OK Python 3 TESTS 23 764 25497600

remove filters

Back to search problems