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 |
---|---|---|---|---|---|---|
1705 | Codeforces Round 807 (Div. 2) | FINISHED | False | 8100 | 73931099 | July 15, 2022, 1:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 25335 ) | A | Mark the Photographer | PROGRAMMING | greedy |
B'Mark is asked to take a group photo of 2n people. The i -th person has height h_i units. To do so, he ordered these people into two rows, the front row and the back row, each consisting of n people. However, to ensure that everyone is seen properly, the j -th person of the back row must be at least x units taller than the j -th person of the front row for each j between 1 and n , inclusive. Help Mark determine if this is possible. The first line contains one integer t ( 1 <= q t <= q 100 ) -- the number of test cases. Each test case consists of two lines. The first line of each test case contains two positive integers n and x ( 1 <= q n <= q 100 , 1 <= q x <= q 10^3 ) -- the number of people in each row and the minimum difference Mark wants. The second line of each test case contains 2n positive integers h_1,h_2, ldots,h_{2n} ( 1 <= q h_i <= q 10^3 ) -- the height of each person in units. Note that the sum of n over all test cases is not bounded. For each test case, print a single line containing "YES" if Mark could arrange people satisfying his condition and "NO" otherwise. You may print each letter in any case (for example, YES, Yes, yes, yEs will all be recognized as positive answers). In the first test case, one possible order is to have the third, fifth, and sixth person on the back row and the second, first, and fourth on the front row. The heights of the people will look like this. It works because In the second test case, it can be shown there is no way to order people in a way that satisfies the condition. In the third test case, the only way to arrange people to satisfy the condition is to have the first person on the back row and the second person on the front row. '... |
Codeforces Round #807 (Div 2.) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
164358996 | EzzEldinKadry | A | July 15, 2022, 6:45 p.m. | OK | C# 10 | TESTS | 7 | 31 | 1331200 | ||
164349669 | iskyldrm | A | July 15, 2022, 5:12 p.m. | OK | C# 8 | TESTS | 7 | 93 | 1433600 | ||
164372333 | Yaropolk | A | July 15, 2022, 10:18 p.m. | OK | C# 8 | TESTS | 7 | 93 | 1740800 | ||
164346391 | ansergeyg | A | July 15, 2022, 4:46 p.m. | OK | C# 8 | TESTS | 7 | 140 | 1433600 | ||
164362831 | Mani.ac | A | July 15, 2022, 7:32 p.m. | OK | Clang++20 Diagnostics | TESTS | 7 | 31 | 0 | ||
164360198 | Mohamed_Nasr24 | A | July 15, 2022, 6:58 p.m. | OK | Clang++20 Diagnostics | TESTS | 7 | 109 | 8396800 | ||
164388725 | bkifhr6 | A | July 16, 2022, 3:23 a.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164342452 | aryan_2021025 | A | July 15, 2022, 4:24 p.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164344052 | Sarna_Das | A | July 15, 2022, 4:31 p.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164346281 | xghost456 | A | July 15, 2022, 4:45 p.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164354825 | shootoon | A | July 15, 2022, 6:02 p.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164357567 | Raj_2021084 | A | July 15, 2022, 6:29 p.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164357656 | 0708ng | A | July 15, 2022, 6:30 p.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164360988 | Divyansh10108 | A | July 15, 2022, 7:08 p.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164380875 | zwu2021016711 | A | July 16, 2022, 1:38 a.m. | OK | GNU C11 | TESTS | 7 | 15 | 0 | ||
164354129 | butcher_66 | A | July 15, 2022, 5:55 p.m. | OK | GNU C11 | TESTS | 7 | 30 | 0 | ||
164347645 | Kevin8502 | A | July 15, 2022, 4:55 p.m. | OK | GNU C++14 | TESTS | 7 | 0 | 0 | ||
164349710 | omi_farhan75 | A | July 15, 2022, 5:13 p.m. | OK | GNU C++14 | TESTS | 7 | 0 | 0 | ||
164373734 | dengziyue | A | July 15, 2022, 10:39 p.m. | OK | GNU C++14 | TESTS | 7 | 0 | 0 | ||
164341574 | iampkumar | A | July 15, 2022, 4:21 p.m. | OK | GNU C++14 | TESTS | 7 | 0 | 0 | ||
164399383 | IITauqeer | A | July 16, 2022, 5:36 a.m. | OK | GNU C++14 | TESTS | 7 | 0 | 0 | ||
164349104 | omi_farhan | A | July 15, 2022, 5:08 p.m. | OK | GNU C++14 | TESTS | 7 | 0 | 0 | ||
164378357 | Heisenburg-120 | A | July 16, 2022, 12:51 a.m. | OK | GNU C++14 | TESTS | 7 | 0 | 102400 | ||
164342259 | Graythron | A | July 15, 2022, 4:23 p.m. | OK | GNU C++14 | TESTS | 7 | 0 | 102400 | ||
164399554 | harshsodhani31 | A | July 16, 2022, 5:38 a.m. | OK | GNU C++14 | TESTS | 7 | 15 | 0 | ||
164400719 | xlxys | A | July 16, 2022, 5:51 a.m. | OK | GNU C++14 | TESTS | 7 | 15 | 0 | ||
164354411 | dysnomia | A | July 15, 2022, 5:58 p.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164361572 | Rhyme67 | A | July 15, 2022, 7:16 p.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164362476 | vaishnavi_111 | A | July 15, 2022, 7:27 p.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164370128 | Calanosay | A | July 15, 2022, 9:29 p.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164384082 | mobius0110 | A | July 16, 2022, 2:26 a.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164394928 | adi_v_007 | A | July 16, 2022, 4:44 a.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164401474 | _Prince | A | July 16, 2022, 5:58 a.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164357732 | Striker_007 | A | July 15, 2022, 6:31 p.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164358313 | emo27885 | A | July 15, 2022, 6:37 p.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164359221 | RIPA__ | A | July 15, 2022, 6:47 p.m. | OK | GNU C++17 | TESTS | 7 | 0 | 0 | ||
164381394 | osazizsg1 | A | July 16, 2022, 1:47 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 0 | ||
164363167 | Fury | A | July 15, 2022, 7:36 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 0 | ||
164350303 | xlz | A | July 15, 2022, 5:19 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 0 | ||
164348568 | dewfr0st | A | July 15, 2022, 5:03 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 0 | ||
164342293 | arunkumar8202 | A | July 15, 2022, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 0 | ||
164396700 | Duoluoluos | A | July 16, 2022, 5:08 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 0 | ||
164376719 | chenmoooo | A | July 16, 2022, 12:12 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 819200 | ||
164346456 | Jackie_Saad_Mikhael | A | July 15, 2022, 4:47 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 2457600 | ||
164342922 | HBPlayer | A | July 15, 2022, 4:26 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 0 | 3174400 | ||
164400050 | XiDevender | A | July 16, 2022, 5:44 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 15 | 0 | ||
164393321 | LLGM | A | July 16, 2022, 4:23 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164393367 | TawheedOp | A | July 16, 2022, 4:23 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164393482 | digishek | A | July 16, 2022, 4:25 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164395168 | ytkn | A | July 16, 2022, 4:48 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164395520 | Anmol626 | A | July 16, 2022, 4:53 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164395772 | kriplani_123 | A | July 16, 2022, 4:56 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164398095 | Fa_HD | A | July 16, 2022, 5:23 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164392582 | aviitp | A | July 16, 2022, 4:12 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164392532 | idkyk | A | July 16, 2022, 4:11 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164392351 | shivam_100 | A | July 16, 2022, 4:09 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 0 | 0 | ||
164344443 | zolotykhd | A | July 15, 2022, 4:34 p.m. | OK | Go | TESTS | 7 | 30 | 11161600 | ||
164366819 | pili | A | July 15, 2022, 8:29 p.m. | OK | Go | TESTS | 7 | 31 | 614400 | ||
164342243 | zolotykhd | A | July 15, 2022, 4:23 p.m. | OK | Go | TESTS | 7 | 249 | 921600 | ||
164381271 | enviornment | A | July 16, 2022, 1:45 a.m. | OK | Java 11 | TESTS | 7 | 155 | 0 | ||
164379376 | nis1234 | A | July 16, 2022, 1:11 a.m. | OK | Java 11 | TESTS | 7 | 155 | 0 | ||
164352584 | deepaksach | A | July 15, 2022, 5:40 p.m. | OK | Java 11 | TESTS | 7 | 155 | 0 | ||
164352530 | _revenant | A | July 15, 2022, 5:40 p.m. | OK | Java 11 | TESTS | 7 | 156 | 0 | ||
164352261 | limit_exceeder | A | July 15, 2022, 5:38 p.m. | OK | Java 11 | TESTS | 7 | 156 | 0 | ||
164364081 | PriyaAnu | A | July 15, 2022, 7:48 p.m. | OK | Java 11 | TESTS | 7 | 170 | 0 | ||
164395539 | Freetocode | A | July 16, 2022, 4:53 a.m. | OK | Java 11 | TESTS | 7 | 171 | 0 | ||
164395910 | dhruvil_01 | A | July 16, 2022, 4:58 a.m. | OK | Java 11 | TESTS | 7 | 171 | 0 | ||
164392843 | souvik2000 | A | July 16, 2022, 4:16 a.m. | OK | Java 11 | TESTS | 7 | 171 | 0 | ||
164384330 | unknown_world | A | July 16, 2022, 2:29 a.m. | OK | Java 11 | TESTS | 7 | 171 | 0 | ||
164346902 | Stirboy | A | July 15, 2022, 4:49 p.m. | OK | Java 17 | TESTS | 7 | 186 | 204800 | ||
164400627 | goalboy | A | July 16, 2022, 5:50 a.m. | OK | Java 17 | TESTS | 7 | 217 | 716800 | ||
164353002 | AdityaGupta19 | A | July 15, 2022, 5:45 p.m. | OK | Java 17 | TESTS | 7 | 217 | 1126400 | ||
164364811 | achandra03 | A | July 15, 2022, 7:59 p.m. | OK | Java 17 | TESTS | 7 | 218 | 921600 | ||
164394137 | cs_abdullah | A | July 16, 2022, 4:34 a.m. | OK | Java 17 | TESTS | 7 | 234 | 921600 | ||
164358659 | Edward47 | A | July 15, 2022, 6:41 p.m. | OK | Java 17 | TESTS | 7 | 264 | 204800 | ||
164368636 | jawad99 | A | July 15, 2022, 8:59 p.m. | OK | Java 17 | TESTS | 7 | 280 | 0 | ||
164393415 | Darshan_Darji | A | July 16, 2022, 4:24 a.m. | OK | Java 8 | TESTS | 7 | 92 | 0 | ||
164379661 | Sussykin | A | July 16, 2022, 1:16 a.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164368639 | adi_7861 | A | July 15, 2022, 8:59 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164368596 | malekelkassas | A | July 15, 2022, 8:58 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164361074 | gagan_6730 | A | July 15, 2022, 7:09 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164350265 | Hajan | A | July 15, 2022, 5:18 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164348555 | BogoSortIsBest | A | July 15, 2022, 5:02 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164347462 | imsd_14 | A | July 15, 2022, 4:54 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164344838 | rajivrtk12 | A | July 15, 2022, 4:36 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164344160 | themadknight45 | A | July 15, 2022, 4:32 p.m. | OK | Java 8 | TESTS | 7 | 93 | 0 | ||
164364417 | HarryDeveloper | A | July 15, 2022, 7:53 p.m. | OK | Kotlin 1.6 | TESTS | 7 | 202 | 819200 | ||
164383158 | macacod | A | July 16, 2022, 2:13 a.m. | OK | Kotlin 1.6 | TESTS | 7 | 218 | 819200 | ||
164395840 | ebashunacplusplus | A | July 16, 2022, 4:57 a.m. | OK | MS C++ 2017 | TESTS | 7 | 15 | 0 | ||
164381029 | liujh123 | A | July 16, 2022, 1:41 a.m. | OK | MS C++ 2017 | TESTS | 7 | 15 | 0 | ||
164380886 | wzwhgh | A | July 16, 2022, 1:38 a.m. | OK | MS C++ 2017 | TESTS | 7 | 15 | 0 | ||
164377092 | lyqhh88 | A | July 16, 2022, 12:21 a.m. | OK | MS C++ 2017 | TESTS | 7 | 15 | 0 | ||
164348801 | manab_93 | A | July 15, 2022, 5:05 p.m. | OK | MS C++ 2017 | TESTS | 7 | 15 | 0 | ||
164389642 | sunkaimiao | A | July 16, 2022, 3:33 a.m. | OK | MS C++ 2017 | TESTS | 7 | 31 | 0 | ||
164386837 | Killer_No.47 | A | July 16, 2022, 3:02 a.m. | OK | MS C++ 2017 | TESTS | 7 | 31 | 0 | ||
164375290 | y_abobakr | A | July 15, 2022, 11:26 p.m. | OK | MS C++ 2017 | TESTS | 7 | 31 | 0 | ||
164361172 | SahajTC | A | July 15, 2022, 7:11 p.m. | OK | MS C++ 2017 | TESTS | 7 | 31 | 0 | ||
164350308 | Nosov_Vovanus2022 | A | July 15, 2022, 5:19 p.m. | OK | MS C++ 2017 | TESTS | 7 | 31 | 0 | ||
164362018 | goeyj | A | July 15, 2022, 7:22 p.m. | OK | Node.js | TESTS | 7 | 93 | 1331200 | ||
164344103 | 1_2_3_4_5_9 | A | July 15, 2022, 4:32 p.m. | OK | PyPy 2 | TESTS | 7 | 77 | 5939200 | ||
164366547 | fan_of_tourist | A | July 15, 2022, 8:24 p.m. | OK | PyPy 2 | TESTS | 7 | 155 | 716800 | ||
164350945 | hr2565 | A | July 15, 2022, 5:25 p.m. | OK | PyPy 3 | TESTS | 7 | 78 | 2355200 | ||
164341616 | Shrink | A | July 15, 2022, 4:21 p.m. | OK | PyPy 3 | TESTS | 7 | 92 | 1536000 | ||
164383042 | otsuneko | A | July 16, 2022, 2:11 a.m. | OK | PyPy 3 | TESTS | 7 | 92 | 67686400 | ||
164370808 | zxcuser2 | A | July 15, 2022, 9:43 p.m. | OK | PyPy 3 | TESTS | 7 | 93 | 1536000 | ||
164358005 | sohilkhanduja | A | July 15, 2022, 6:34 p.m. | OK | PyPy 3 | TESTS | 7 | 93 | 1638400 | ||
164345520 | kuanc | A | July 15, 2022, 4:40 p.m. | OK | PyPy 3 | TESTS | 7 | 93 | 2662400 | ||
164362437 | DesignCodeForces | A | July 15, 2022, 7:27 p.m. | OK | PyPy 3 | TESTS | 7 | 93 | 3174400 | ||
164349772 | melidia | A | July 15, 2022, 5:13 p.m. | OK | PyPy 3 | TESTS | 7 | 108 | 3072000 | ||
164358613 | Sovi_11 | A | July 15, 2022, 6:40 p.m. | OK | PyPy 3 | TESTS | 7 | 108 | 3174400 | ||
164365946 | Mohamed_Nasr24 | A | July 15, 2022, 8:16 p.m. | OK | PyPy 3 | TESTS | 7 | 108 | 3379200 | ||
164350195 | vladilius | A | July 15, 2022, 5:17 p.m. | OK | PyPy 3-64 | TESTS | 7 | 61 | 1740800 | ||
164391241 | FrozenKandy | A | July 16, 2022, 3:53 a.m. | OK | PyPy 3-64 | TESTS | 7 | 61 | 2150400 | ||
164366515 | Hemanth1854 | A | July 15, 2022, 8:24 p.m. | OK | PyPy 3-64 | TESTS | 7 | 61 | 3993600 | ||
164360881 | aneesh2002 | A | July 15, 2022, 7:07 p.m. | OK | PyPy 3-64 | TESTS | 7 | 61 | 3993600 | ||
164361493 | DarkHorse_it_iz2.0 | A | July 15, 2022, 7:15 p.m. | OK | PyPy 3-64 | TESTS | 7 | 61 | 4300800 | ||
164393787 | fhhuo | A | July 16, 2022, 4:29 a.m. | OK | PyPy 3-64 | TESTS | 7 | 62 | 1740800 | ||
164392236 | 1604mihir | A | July 16, 2022, 4:07 a.m. | OK | PyPy 3-64 | TESTS | 7 | 62 | 1843200 | ||
164383096 | Zaryab_Ajmal | A | July 16, 2022, 2:12 a.m. | OK | PyPy 3-64 | TESTS | 7 | 62 | 1843200 | ||
164367767 | Skillful_Wanderer | A | July 15, 2022, 8:45 p.m. | OK | PyPy 3-64 | TESTS | 7 | 62 | 1843200 | ||
164353119 | kavorka | A | July 15, 2022, 5:46 p.m. | OK | PyPy 3-64 | TESTS | 7 | 62 | 1843200 | ||
164401534 | valak_5701 | A | July 16, 2022, 5:58 a.m. | OK | Python 3 | TESTS | 7 | 31 | 0 | ||
164372968 | Nafees_007 | A | July 15, 2022, 10:35 p.m. | OK | Python 3 | TESTS | 7 | 31 | 0 | ||
164368291 | minsu_kim | A | July 15, 2022, 8:53 p.m. | OK | Python 3 | TESTS | 7 | 31 | 0 | ||
164396742 | tarunrao963040 | A | July 16, 2022, 5:08 a.m. | OK | Python 3 | TESTS | 7 | 31 | 204800 | ||
164367574 | dbit | A | July 15, 2022, 8:42 p.m. | OK | Python 3 | TESTS | 7 | 31 | 204800 | ||
164352957 | numanmahzabin | A | July 15, 2022, 5:44 p.m. | OK | Python 3 | TESTS | 7 | 31 | 204800 | ||
164351883 | Supta_Dev | A | July 15, 2022, 5:34 p.m. | OK | Python 3 | TESTS | 7 | 31 | 204800 | ||
164345538 | bisrat_walle | A | July 15, 2022, 4:40 p.m. | OK | Python 3 | TESTS | 7 | 31 | 204800 | ||
164342142 | mamal | A | July 15, 2022, 4:22 p.m. | OK | Python 3 | TESTS | 7 | 31 | 204800 | ||
164359730 | mjkavanagh7 | A | July 15, 2022, 6:53 p.m. | OK | Python 3 | TESTS | 7 | 31 | 307200 | ||
164361990 | bjin | A | July 15, 2022, 7:21 p.m. | OK | Rust 2021 | TESTS | 7 | 15 | 0 |
Back to search problems