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 |
---|---|---|---|---|---|---|
1529 | Codeforces Round 722 (Div. 2) | FINISHED | False | 8100 | 109956299 | May 24, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20612 ) | B | Sifid and Strange Subsequences | PROGRAMMING | greedy sortings |
B"A sequence (b_1, b_2, ldots, b_k) is called strange, if the absolute difference between any pair of its elements is greater than or equal to the maximum element in the sequence. Formally speaking, it's strange if for every pair (i, j) with 1 <= i<j <= k , we have |a_i-a_j| geq MAX , where MAX is the largest element of the sequence. In particular, any sequence of length at most 1 is strange. For example, the sequences (-2021, -1, -1, -1) and (-1, 0, 1) are strange, but (3, 0, 1) is not, because |0 - 1| < 3 . Sifid has an array a of n integers. Sifid likes everything big, so among all the strange subsequences of a , he wants to find the length of the longest one. Can you help him? A sequence c is a subsequence of an array d if c can be obtained from d by deletion of several (possibly, zero or all) elements. The first line contains an integer t (1 <= t <= 10^4) -- the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n (1 <= n <= 10^5) -- the length of the array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n (-10^9 <= a_i <= 10^9) -- the elements of the array a . It is guaranteed that the sum of n over all test cases doesn't exceed 10^5 . For each test case output a single integer -- the length of the longest strange subsequence of a . In the first test case, one of the longest strange subsequences is (a_1, a_2, a_3, a_4) In the second test case, one of the longest strange subsequences is (a_1, a_3, a_4, a_5, a_7) . In the third test case, one of the longest strange subsequences is (a_1, a_3, a_4, a_5) . In the fourth test case, one of the longest strange subsequences is (a_2) . In the fifth test case, one of the longest strange subsequences is (a_1, a_2, a_4) . "... |
Codeforces Round #722 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
117253562 | N.N_2004 | B | May 24, 2021, 5:18 p.m. | OK | Clang++17 Diagnostics | TESTS | 15 | 577 | 2662400 | ||
117282439 | IOKKOI | B | May 25, 2021, 4:38 a.m. | OK | GNU C11 | TESTS | 15 | 46 | 409600 | ||
117243918 | 1435730 | B | May 24, 2021, 4:24 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 409600 | ||
117262704 | The_Trout | B | May 24, 2021, 7:01 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 409600 | ||
117246892 | harshita_gupta | B | May 24, 2021, 4:34 p.m. | OK | GNU C11 | TESTS | 15 | 62 | 819200 | ||
117257742 | sr_ram | B | May 24, 2021, 5:51 p.m. | OK | GNU C11 | TESTS | 15 | 62 | 1638400 | ||
117269659 | hendrixg10 | B | May 24, 2021, 9:54 p.m. | OK | GNU C++11 | TESTS | 15 | 31 | 409600 | ||
117287262 | _horizon_ | B | May 25, 2021, 5:46 a.m. | OK | GNU C++11 | TESTS | 15 | 31 | 512000 | ||
117287848 | jkisnotcs | B | May 25, 2021, 5:53 a.m. | OK | GNU C++11 | TESTS | 15 | 31 | 819200 | ||
117286342 | Turing2020 | B | May 25, 2021, 5:34 a.m. | OK | GNU C++11 | TESTS | 15 | 31 | 819200 | ||
117281434 | bkifhr7 | B | May 25, 2021, 4:21 a.m. | OK | GNU C++11 | TESTS | 15 | 31 | 921600 | ||
117273963 | Echoyyy | B | May 25, 2021, 1:19 a.m. | OK | GNU C++11 | TESTS | 15 | 31 | 1638400 | ||
117246100 | Yldan | B | May 24, 2021, 4:31 p.m. | OK | GNU C++11 | TESTS | 15 | 31 | 3993600 | ||
117280049 | abaabaxxx | B | May 25, 2021, 3:55 a.m. | OK | GNU C++11 | TESTS | 15 | 46 | 409600 | ||
117277879 | lifehappy | B | May 25, 2021, 3:09 a.m. | OK | GNU C++11 | TESTS | 15 | 46 | 409600 | ||
117284933 | Leonard | B | May 25, 2021, 5:15 a.m. | OK | GNU C++11 | TESTS | 15 | 46 | 409600 | ||
117279724 | meetjoshi | B | May 25, 2021, 3:47 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117276668 | arham___khan | B | May 25, 2021, 2:44 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117275706 | SurajitPore | B | May 25, 2021, 2:19 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117268795 | seirios | B | May 24, 2021, 9:24 p.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117267550 | GautamSaharan | B | May 24, 2021, 8:48 p.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117266580 | mrfool | B | May 24, 2021, 8:22 p.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117278392 | fpc_coder | B | May 25, 2021, 3:19 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117285630 | me19btech11006 | B | May 25, 2021, 5:24 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117284624 | S_Neal | B | May 25, 2021, 5:11 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117285237 | justaebi | B | May 25, 2021, 5:19 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 409600 | ||
117284340 | whiteedu | B | May 25, 2021, 5:07 a.m. | OK | GNU C++17 | TESTS | 15 | 31 | 409600 | ||
117258207 | Reducto | B | May 24, 2021, 5:56 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 9830400 | ||
117280572 | ashwAni234 | B | May 25, 2021, 4:05 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117282034 | NewMail2019 | B | May 25, 2021, 4:32 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117280156 | eleven_507 | B | May 25, 2021, 3:57 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117281907 | naresh1407 | B | May 25, 2021, 4:29 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117287451 | hrshit2000 | B | May 25, 2021, 5:48 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117286898 | boldcounselor | B | May 25, 2021, 5:42 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117285042 | Dhaval06 | B | May 25, 2021, 5:17 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117285276 | SQ333 | B | May 25, 2021, 5:20 a.m. | OK | GNU C++17 | TESTS | 15 | 46 | 409600 | ||
117258588 | prottoyfuad | B | May 24, 2021, 6 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117288180 | IceKnight1093 | B | May 25, 2021, 5:58 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117280784 | youtsuha | B | May 25, 2021, 4:10 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117279248 | Einestine | B | May 25, 2021, 3:37 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117273011 | SW2000 | B | May 25, 2021, 12:39 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117259191 | kdrkdr | B | May 24, 2021, 6:08 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117256312 | Bu1bu1 | B | May 24, 2021, 5:35 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117254670 | 3ijk2ikj1kij | B | May 24, 2021, 5:23 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 409600 | ||
117268858 | Geothermal | B | May 24, 2021, 9:26 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 512000 | ||
117279181 | __Aditya__ | B | May 25, 2021, 3:36 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 512000 | ||
117255284 | ypa | B | May 24, 2021, 5:27 p.m. | OK | Java 11 | TESTS | 15 | 187 | 0 | ||
117254616 | LionHeart20 | B | May 24, 2021, 5:23 p.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117287522 | KGECian_23 | B | May 25, 2021, 5:49 a.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117280688 | Arjun-Ichiban | B | May 25, 2021, 4:07 a.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117262813 | dhruvil_8803 | B | May 24, 2021, 7:03 p.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117256476 | mohdasim2808 | B | May 24, 2021, 5:37 p.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117256188 | mohdasim2808 | B | May 24, 2021, 5:34 p.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117255022 | Aakash16215 | B | May 24, 2021, 5:26 p.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117246391 | Anuj_Panchal | B | May 24, 2021, 4:32 p.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
117285044 | Sachin_2961 | B | May 25, 2021, 5:17 a.m. | OK | Java 11 | TESTS | 15 | 218 | 0 | ||
117243824 | shubhamgarg21156 | B | May 24, 2021, 4:24 p.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
117285023 | Pranay2516 | B | May 25, 2021, 5:16 a.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
117253981 | Halix | B | May 24, 2021, 5:19 p.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
117247789 | Pranay_ | B | May 24, 2021, 4:37 p.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
117273021 | rsingh3_be18 | B | May 25, 2021, 12:40 a.m. | OK | Java 8 | TESTS | 15 | 140 | 0 | ||
117286949 | dynamo_001 | B | May 25, 2021, 5:42 a.m. | OK | Java 8 | TESTS | 15 | 140 | 0 | ||
117283984 | dynamo_001 | B | May 25, 2021, 5:02 a.m. | OK | Java 8 | TESTS | 15 | 140 | 0 | ||
117276116 | Abdallah_Ragab00 | B | May 25, 2021, 2:30 a.m. | OK | Java 8 | TESTS | 15 | 140 | 0 | ||
117262658 | Gupta-OP | B | May 24, 2021, 7 p.m. | OK | Java 8 | TESTS | 15 | 140 | 0 | ||
117275673 | thedesalizes | B | May 25, 2021, 2:18 a.m. | OK | Java 8 | TESTS | 15 | 155 | 0 | ||
117274828 | Spheniscine | B | May 25, 2021, 1:52 a.m. | OK | Kotlin | TESTS | 15 | 155 | 0 | ||
117281117 | kokonatsu | B | May 25, 2021, 4:16 a.m. | OK | Kotlin | TESTS | 15 | 202 | 2048000 | ||
117287817 | Oasis1337 | B | May 25, 2021, 5:53 a.m. | OK | Kotlin | TESTS | 15 | 280 | 6656000 | ||
117250977 | faxse | B | May 24, 2021, 4:46 p.m. | OK | Mono C# | TESTS | 15 | 140 | 18329600 | ||
117255595 | Codingmyworld | B | May 24, 2021, 5:30 p.m. | OK | MS C++ | TESTS | 15 | 124 | 819200 | ||
117271145 | songuno1 | B | May 24, 2021, 11:08 p.m. | OK | MS C++ 2017 | TESTS | 15 | 46 | 614400 | ||
117284076 | dingzhao777 | B | May 25, 2021, 5:04 a.m. | OK | MS C++ 2017 | TESTS | 15 | 61 | 819200 | ||
117276121 | Dasheverless | B | May 25, 2021, 2:31 a.m. | OK | MS C++ 2017 | TESTS | 15 | 109 | 409600 | ||
117267142 | rho01 | B | May 24, 2021, 8:37 p.m. | OK | MS C++ 2017 | TESTS | 15 | 124 | 409600 | ||
117260650 | Ke1 | B | May 24, 2021, 6:28 p.m. | OK | MS C++ 2017 | TESTS | 15 | 124 | 1433600 | ||
117280519 | shreyas1510 | B | May 25, 2021, 4:04 a.m. | OK | MS C++ 2017 | TESTS | 15 | 139 | 409600 | ||
117246415 | codmacian | B | May 24, 2021, 4:32 p.m. | OK | MS C++ 2017 | TESTS | 15 | 139 | 409600 | ||
117271596 | kurzwe6er | B | May 24, 2021, 11:33 p.m. | OK | MS C++ 2017 | TESTS | 15 | 140 | 409600 | ||
117257903 | Santeru | B | May 24, 2021, 5:53 p.m. | OK | MS C++ 2017 | TESTS | 15 | 140 | 409600 | ||
117245635 | PLA_Nh | B | May 24, 2021, 4:30 p.m. | OK | MS C++ 2017 | TESTS | 15 | 140 | 409600 | ||
117260467 | azukun | B | May 24, 2021, 6:26 p.m. | OK | .NET Core C# | TESTS | 15 | 124 | 9113600 | ||
117287283 | MadinaN | B | May 25, 2021, 5:46 a.m. | OK | PHP | TESTS | 15 | 156 | 7987200 | ||
117244805 | kritarth2121 | B | May 24, 2021, 4:27 p.m. | OK | PyPy 3 | TESTS | 15 | 202 | 10854400 | ||
117265328 | DebRC | B | May 24, 2021, 7:53 p.m. | OK | PyPy 3 | TESTS | 15 | 218 | 9216000 | ||
117245129 | kritarth21 | B | May 24, 2021, 4:28 p.m. | OK | PyPy 3 | TESTS | 15 | 218 | 10342400 | ||
117287827 | not_tehlka | B | May 25, 2021, 5:53 a.m. | OK | PyPy 3 | TESTS | 15 | 233 | 9728000 | ||
117261079 | The_Apurv_Rathore | B | May 24, 2021, 6:35 p.m. | OK | PyPy 3 | TESTS | 15 | 233 | 9830400 | ||
117286026 | ShashankZobb | B | May 25, 2021, 5:30 a.m. | OK | PyPy 3 | TESTS | 15 | 233 | 10137600 | ||
117278266 | noobstar9614 | B | May 25, 2021, 3:17 a.m. | OK | PyPy 3 | TESTS | 15 | 233 | 10854400 | ||
117263789 | pakshi_141199 | B | May 24, 2021, 7:20 p.m. | OK | PyPy 3 | TESTS | 15 | 249 | 10854400 | ||
117262800 | _aadiupadhyay_ | B | May 24, 2021, 7:03 p.m. | OK | PyPy 3 | TESTS | 15 | 249 | 11673600 | ||
117261990 | rishabhrao | B | May 24, 2021, 6:48 p.m. | OK | PyPy 3 | TESTS | 15 | 264 | 10649600 | ||
117251393 | DepressedOne | B | May 24, 2021, 4:47 p.m. | OK | Python 3 | TESTS | 15 | 140 | 8192000 | ||
117255664 | eugalt | B | May 24, 2021, 5:30 p.m. | OK | Python 3 | TESTS | 15 | 140 | 9216000 | ||
117277744 | westwakki | B | May 25, 2021, 3:06 a.m. | OK | Python 3 | TESTS | 15 | 155 | 8192000 | ||
117286953 | Land_oF_cOdErS | B | May 25, 2021, 5:42 a.m. | OK | Python 3 | TESTS | 15 | 155 | 8601600 | ||
117263115 | ermolmak | B | May 24, 2021, 7:08 p.m. | OK | Python 3 | TESTS | 15 | 155 | 8601600 | ||
117250414 | K.goyal | B | May 24, 2021, 4:44 p.m. | OK | Python 3 | TESTS | 15 | 156 | 8499200 | ||
117277676 | 189X1A05B3 | B | May 25, 2021, 3:05 a.m. | OK | Python 3 | TESTS | 15 | 156 | 9728000 | ||
117247729 | MaxArn | B | May 24, 2021, 4:36 p.m. | OK | Python 3 | TESTS | 15 | 170 | 9318400 | ||
117272288 | ardggy | B | May 25, 2021, 12:08 a.m. | OK | Python 3 | TESTS | 15 | 171 | 8601600 | ||
117256739 | gg7916 | B | May 24, 2021, 5:39 p.m. | OK | Python 3 | TESTS | 15 | 186 | 8192000 | ||
117266499 | Eulim | B | May 24, 2021, 8:20 p.m. | OK | Rust | TESTS | 15 | 31 | 6041600 | ||
117266233 | SorKierkegaard | B | May 24, 2021, 8:15 p.m. | OK | Rust | TESTS | 15 | 46 | 6041600 | ||
117266387 | Eulim | B | May 24, 2021, 8:18 p.m. | OK | Rust | TESTS | 15 | 108 | 6041600 | ||
117266307 | Eulim | B | May 24, 2021, 8:16 p.m. | OK | Rust | TESTS | 15 | 155 | 6041600 | ||
117245574 | bqn | B | May 24, 2021, 4:30 p.m. | OK | Rust | TESTS | 15 | 171 | 4096000 |
Back to search problems