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 |
---|---|---|---|---|---|---|
1445 | Codeforces Round 680 (Div. 2, based on Moscow Team Olympiad) | FINISHED | False | 7200 | 127594499 | Nov. 1, 2020, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 19134 ) | A | Array Rearrangment | PROGRAMMING | greedy sortings |
B"You are given two arrays a and b , each consisting of n positive integers, and an integer x . Please determine if one can rearrange the elements of b so that a_i + b_i <= q x holds for each i ( 1 <= i <= n ). The first line of input contains one integer t ( 1 <= q t <= q 100 ) -- the number of test cases. t blocks follow, each describing an individual test case. The first line of each test case contains two integers n and x ( 1 <= q n <= q 50 ; 1 <= q x <= q 1000 ) -- the length of arrays a and b , and the parameter x , described in the problem statement. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_1 <= a_2 <= ... <= a_n <= q x ) -- the elements of array a in non-descending order. The third line of each test case contains n integers b_1, b_2, ldots, b_n ( 1 <= q b_1 <= b_2 <= ... <= b_n <= q x ) -- the elements of array b in non-descending order. Test cases are separated by a blank line. For each test case print Yes if one can rearrange the corresponding array b so that a_i + b_i <= q x holds for each i ( 1 <= i <= n ) or No otherwise. Each character can be printed in any case. In the first test case, one can rearrange b so it'll look like [1, 2, 1] . In this case, 1 + 1 <= q 4 ; 2 + 2 <= q 4 ; 3 + 1 <= q 4 . In the second test case, one can set b to [5, 2] , then 1 + 5 <= q 6 ; 4 + 2 <= q 6 . In the third test case, no matter how one shuffles array b , a_4 + b_4 = 4 + b_4 > 4 . In the fourth test case, there is only one rearrangement of array b and it doesn't satisfy the condition since 5 + 5 > 5 . "... |
Codeforces Round #680 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
97379662 | mr11261 | A | Nov. 1, 2020, 6:31 p.m. | OK | D | TESTS | 10 | 31 | 0 | ||
97359166 | Gassa | A | Nov. 1, 2020, 1:53 p.m. | OK | D | TESTS | 10 | 31 | 0 | ||
97394563 | KhavidBap | A | Nov. 2, 2020, 3:17 a.m. | OK | FPC | TESTS | 10 | 31 | 0 | ||
97344474 | tuongvy27082002lqd | A | Nov. 1, 2020, 12:35 p.m. | OK | FPC | TESTS | 10 | 31 | 0 | ||
97389984 | BugLeave | A | Nov. 2, 2020, 12:21 a.m. | OK | GNU C11 | TESTS | 10 | 15 | 0 | ||
97400651 | hirenkachhadiya6666 | A | Nov. 2, 2020, 5:51 a.m. | OK | GNU C11 | TESTS | 10 | 15 | 0 | ||
97362940 | Ahammed_77 | A | Nov. 1, 2020, 2:33 p.m. | OK | GNU C11 | TESTS | 10 | 15 | 0 | ||
97371642 | ja1467 | A | Nov. 1, 2020, 4:19 p.m. | OK | GNU C11 | TESTS | 10 | 15 | 0 | ||
97354252 | wszdbha | A | Nov. 1, 2020, 1:04 p.m. | OK | GNU C11 | TESTS | 10 | 15 | 0 | ||
97349089 | Tian.kk | A | Nov. 1, 2020, 12:49 p.m. | OK | GNU C11 | TESTS | 10 | 15 | 204800 | ||
97367922 | ratulmandal431 | A | Nov. 1, 2020, 3:31 p.m. | OK | GNU C11 | TESTS | 10 | 30 | 0 | ||
97344922 | allay | A | Nov. 1, 2020, 12:36 p.m. | OK | GNU C11 | TESTS | 10 | 30 | 0 | ||
97358207 | qubee.evan15 | A | Nov. 1, 2020, 1:43 p.m. | OK | GNU C11 | TESTS | 10 | 30 | 0 | ||
97360876 | mayeed | A | Nov. 1, 2020, 2:10 p.m. | OK | GNU C11 | TESTS | 10 | 30 | 0 | ||
97368659 | Sanjida1903070 | A | Nov. 1, 2020, 3:40 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97388272 | expect2004 | A | Nov. 1, 2020, 10:47 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97389319 | zqyyy | A | Nov. 1, 2020, 11:44 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97389543 | abi200415 | A | Nov. 1, 2020, 11:57 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97388839 | vlam21 | A | Nov. 1, 2020, 11:17 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97390472 | autistic_boy | A | Nov. 2, 2020, 12:45 a.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97399703 | vice_why112 | A | Nov. 2, 2020, 5:32 a.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97397137 | 2018331047 | A | Nov. 2, 2020, 4:31 a.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97380794 | rafaielanam | A | Nov. 1, 2020, 6:52 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97379658 | albeXL | A | Nov. 1, 2020, 6:31 p.m. | OK | GNU C++11 | TESTS | 10 | 15 | 0 | ||
97371566 | iamhkr | A | Nov. 1, 2020, 4:18 p.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
97367436 | dg25 | A | Nov. 1, 2020, 3:25 p.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
97364542 | vjudge4 | A | Nov. 1, 2020, 2:51 p.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
97356853 | My_gpa_is_low_ | A | Nov. 1, 2020, 1:33 p.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
97364520 | harshit2503 | A | Nov. 1, 2020, 2:50 p.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
97361118 | Itsmdshahin | A | Nov. 1, 2020, 2:12 p.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1126400 | ||
97396804 | prshntsrivas | A | Nov. 2, 2020, 4:22 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 1638400 | ||
97399708 | Gunjeeta09 | A | Nov. 2, 2020, 5:32 a.m. | OK | GNU C++14 | TESTS | 10 | 30 | 0 | ||
97395154 | s_agnik1511 | A | Nov. 2, 2020, 3:34 a.m. | OK | GNU C++14 | TESTS | 10 | 30 | 0 | ||
97394200 | Saikat800 | A | Nov. 2, 2020, 3:07 a.m. | OK | GNU C++14 | TESTS | 10 | 30 | 0 | ||
97365103 | Divyanshj_810 | A | Nov. 1, 2020, 2:57 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
97394925 | ShivyShiv | A | Nov. 2, 2020, 3:28 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
97383639 | abhinavvv306 | A | Nov. 1, 2020, 7:55 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
97368016 | Akshatg45 | A | Nov. 1, 2020, 3:32 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
97362197 | rohitkumpan01 | A | Nov. 1, 2020, 2:25 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
97357344 | chen2511902448 | A | Nov. 1, 2020, 1:36 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 0 | ||
97373224 | Haunted_Cpp | A | Nov. 1, 2020, 4:44 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 102400 | ||
97376340 | VivekPG | A | Nov. 1, 2020, 5:35 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 102400 | ||
97388639 | bloodfox | A | Nov. 1, 2020, 11:07 p.m. | OK | GNU C++17 | TESTS | 10 | 15 | 102400 | ||
97398471 | agayush | A | Nov. 2, 2020, 5:06 a.m. | OK | GNU C++17 | TESTS | 10 | 15 | 102400 | ||
97372099 | Prince349k | A | Nov. 1, 2020, 4:26 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97372671 | Atoev__Urvatullo | A | Nov. 1, 2020, 4:34 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97373194 | mesbah19 | A | Nov. 1, 2020, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97375174 | salehsargolzaee | A | Nov. 1, 2020, 5:15 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97381590 | Arif19 | A | Nov. 1, 2020, 7:08 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97382024 | Sergey140146659 | A | Nov. 1, 2020, 7:17 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97366531 | prottoyfuad | A | Nov. 1, 2020, 3:14 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97363739 | vfpx07 | A | Nov. 1, 2020, 2:42 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97361854 | ritikrai | A | Nov. 1, 2020, 2:21 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97360070 | AlphaNumero | A | Nov. 1, 2020, 2:01 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 15 | 0 | ||
97370465 | coderrohan14 | A | Nov. 1, 2020, 4:03 p.m. | OK | Java 11 | TESTS | 10 | 156 | 0 | ||
97389578 | Jason_hacker | A | Nov. 1, 2020, 11:59 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97386312 | blackBird | A | Nov. 1, 2020, 9:17 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97385240 | dupr | A | Nov. 1, 2020, 8:42 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97383215 | mphillotry | A | Nov. 1, 2020, 7:44 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97381534 | jadevade | A | Nov. 1, 2020, 7:07 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97370479 | gssakash | A | Nov. 1, 2020, 4:03 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97367647 | alphasaurs | A | Nov. 1, 2020, 3:28 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97366419 | Witless_Deer | A | Nov. 1, 2020, 3:12 p.m. | OK | Java 11 | TESTS | 10 | 171 | 0 | ||
97385442 | codebook_2000 | A | Nov. 1, 2020, 8:48 p.m. | OK | Java 11 | TESTS | 10 | 186 | 0 | ||
97359959 | O-infinity | A | Nov. 1, 2020, 2 p.m. | OK | Java 8 | TESTS | 10 | 108 | 0 | ||
97359549 | coolManit | A | Nov. 1, 2020, 1:56 p.m. | OK | Java 8 | TESTS | 10 | 108 | 0 | ||
97351200 | toufique_husein | A | Nov. 1, 2020, 12:56 p.m. | OK | Java 8 | TESTS | 10 | 108 | 0 | ||
97398821 | Digvijaysingh0707 | A | Nov. 2, 2020, 5:13 a.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
97398586 | a_2410 | A | Nov. 2, 2020, 5:08 a.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
97395246 | yesbutno1685 | A | Nov. 2, 2020, 3:36 a.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
97391680 | prasoon006 | A | Nov. 2, 2020, 1:40 a.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
97385347 | procrastinate7 | A | Nov. 1, 2020, 8:45 p.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
97379535 | RichardBot7000 | A | Nov. 1, 2020, 6:28 p.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
97367417 | Java | A | Nov. 1, 2020, 3:24 p.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | ||
97378725 | TimDev | A | Nov. 1, 2020, 6:14 p.m. | OK | Kotlin | TESTS | 10 | 155 | 614400 | ||
97360099 | koper | A | Nov. 1, 2020, 2:01 p.m. | OK | Kotlin | TESTS | 10 | 156 | 2252800 | ||
97357139 | Ahmadjon | A | Nov. 1, 2020, 1:35 p.m. | OK | Kotlin | TESTS | 10 | 171 | 2150400 | ||
97370917 | thy0602 | A | Nov. 1, 2020, 4:09 p.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 0 | ||
97365753 | rafle | A | Nov. 1, 2020, 3:04 p.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 0 | ||
97354010 | AndreyKov | A | Nov. 1, 2020, 1:03 p.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 0 | ||
97358278 | NooB_VasnH | A | Nov. 1, 2020, 1:44 p.m. | OK | MS C++ 2017 | TESTS | 10 | 31 | 102400 | ||
97371451 | kopris | A | Nov. 1, 2020, 4:16 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
97358504 | Gravekper | A | Nov. 1, 2020, 1:46 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
97358092 | ustaritz | A | Nov. 1, 2020, 1:42 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
97348461 | Start_Learning | A | Nov. 1, 2020, 12:47 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 0 | ||
97378838 | priyanshusharmaaug03 | A | Nov. 1, 2020, 6:16 p.m. | OK | MS C++ 2017 | TESTS | 10 | 46 | 409600 | ||
97362124 | lebron87 | A | Nov. 1, 2020, 2:24 p.m. | OK | PyPy 2 | TESTS | 10 | 109 | 204800 | ||
97364364 | beethoven97 | A | Nov. 1, 2020, 2:49 p.m. | OK | PyPy 2 | TESTS | 10 | 109 | 1433600 | ||
97378089 | AggarwalRaghav | A | Nov. 1, 2020, 6:02 p.m. | OK | PyPy 3 | TESTS | 10 | 124 | 1638400 | ||
97390584 | jungmin1755 | A | Nov. 2, 2020, 12:51 a.m. | OK | PyPy 3 | TESTS | 10 | 139 | 1536000 | ||
97370620 | BelieveInYourself | A | Nov. 1, 2020, 4:05 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1433600 | ||
97364381 | umrhiumrhi | A | Nov. 1, 2020, 2:49 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1536000 | ||
97388466 | Liberator187 | A | Nov. 1, 2020, 10:56 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1638400 | ||
97382924 | newton3 | A | Nov. 1, 2020, 7:37 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1638400 | ||
97380394 | StealthGamer | A | Nov. 1, 2020, 6:44 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1638400 | ||
97366915 | shadoX | A | Nov. 1, 2020, 3:19 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1638400 | ||
97365800 | .Mr. | A | Nov. 1, 2020, 3:05 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1638400 | ||
97356337 | dufresne_1949 | A | Nov. 1, 2020, 1:29 p.m. | OK | PyPy 3 | TESTS | 10 | 140 | 1638400 | ||
97346707 | manjeet404 | A | Nov. 1, 2020, 12:42 p.m. | OK | Python 2 | TESTS | 10 | 171 | 0 | ||
97392505 | prayashverma007 | A | Nov. 2, 2020, 2:16 a.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97388584 | shamir0xe | A | Nov. 1, 2020, 11:03 p.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97385708 | KLWDSF_mantra | A | Nov. 1, 2020, 8:56 p.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97365285 | ranaanand | A | Nov. 1, 2020, 2:59 p.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97362902 | funkid | A | Nov. 1, 2020, 2:33 p.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97358237 | nurligenovtemirlan | A | Nov. 1, 2020, 1:44 p.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97358132 | sastaganja | A | Nov. 1, 2020, 1:43 p.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97358085 | nihalsrivastava2016 | A | Nov. 1, 2020, 1:42 p.m. | OK | Python 3 | TESTS | 10 | 93 | 307200 | ||
97398808 | Rashi30 | A | Nov. 2, 2020, 5:13 a.m. | OK | Python 3 | TESTS | 10 | 108 | 307200 | ||
97397764 | Meii_Meii_Green | A | Nov. 2, 2020, 4:49 a.m. | OK | Python 3 | TESTS | 10 | 108 | 307200 | ||
97381132 | cifrzak | A | Nov. 1, 2020, 6:59 p.m. | OK | Scala | TESTS | 10 | 576 | 0 |
Back to search problems