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 |
---|---|---|---|---|---|---|
1371 | Codeforces Round 654 (Div. 2) | FINISHED | False | 7200 | 143655863 | July 1, 2020, 1:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20713 ) | C | A Cookie for You | PROGRAMMING | constructive algorithms greedy implementation math |
B'Anna is a girl so brave that she is loved by everyone in the city and citizens love her cookies. She is planning to hold a party with cookies. Now she has a vanilla cookies and b chocolate cookies for the party. She invited n guests of the first type and m guests of the second type to the party. They will come to the party in some order. After coming to the party, each guest will choose the type of cookie (vanilla or chocolate) to eat. There is a difference in the way how they choose that type: If there are v vanilla cookies and c chocolate cookies at the moment, when the guest comes, then After that: Anna wants to know if there exists some order of guests, such that no one guest gets angry. Your task is to answer her question. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next t lines contain descriptions of test cases. For each test case, the only line contains four integers a , b , n , m ( 0 <= a,b,n,m <= 10^{18}, n+m neq 0 ). For each test case, print the answer in one line. If there exists at least one valid order, print "Yes". Otherwise, print "No". You can print each letter in any case (upper or lower). In the first test case, let 's consider the order {1, 2, 2 } of types of guests. Then: So, this order can 't be chosen by Anna. Let 's consider the order {2, 2, 1 } of types of guests. Then: So, the answer to this test case is "Yes". In the fifth test case, it is illustrated, that the number of cookies ( a + b ) can be equal to zero, but the number of guests ( n + m ) can 't be equal to zero. In the sixth test case, be careful about the overflow of 32 -bit integer type. '... |
Codeforces Round #654 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
85669041 | ruban | C | July 1, 2020, 2:41 p.m. | OK | Delphi | TESTS | 25 | 31 | 307200 | ||
85688736 | chowdhuryshashwoto | C | July 1, 2020, 3:21 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85685829 | Abrar_Al_Samit | C | July 1, 2020, 3:15 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85685803 | vladislav_k | C | July 1, 2020, 3:15 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85738507 | Himelcse005 | C | July 2, 2020, 5:28 a.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85706752 | tanishk_1 | C | July 1, 2020, 5:41 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85705532 | khasrulShihab | C | July 1, 2020, 5:29 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85700482 | Rahin31 | C | July 1, 2020, 4:50 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85699939 | physics0523 | C | July 1, 2020, 4:48 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85690084 | subham348 | C | July 1, 2020, 3:24 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85694118 | Amin.s | C | July 1, 2020, 3:32 p.m. | OK | GNU C11 | TESTS | 25 | 31 | 0 | ||
85672105 | DanielMontes | C | July 1, 2020, 2:47 p.m. | OK | GNU C++11 | TESTS | 25 | 15 | 0 | ||
85682880 | dreamstarfirst | C | July 1, 2020, 3:09 p.m. | OK | GNU C++11 | TESTS | 25 | 15 | 0 | ||
85672652 | flover_qq | C | July 1, 2020, 2:48 p.m. | OK | GNU C++11 | TESTS | 25 | 15 | 0 | ||
85663064 | 275307894a | C | July 1, 2020, 2:30 p.m. | OK | GNU C++11 | TESTS | 25 | 15 | 0 | ||
85723260 | A_sc_1 | C | July 1, 2020, 11:13 p.m. | OK | GNU C++11 | TESTS | 25 | 15 | 0 | ||
85738248 | vjudge1 | C | July 2, 2020, 5:24 a.m. | OK | GNU C++11 | TESTS | 25 | 15 | 0 | ||
85673453 | mejiamejia | C | July 1, 2020, 2:50 p.m. | OK | GNU C++11 | TESTS | 25 | 15 | 3788800 | ||
85731405 | LOVE_YJZ | C | July 2, 2020, 3:17 a.m. | OK | GNU C++11 | TESTS | 25 | 30 | 0 | ||
85728243 | the.one.1 | C | July 2, 2020, 2:04 a.m. | OK | GNU C++11 | TESTS | 25 | 30 | 0 | ||
85727221 | Neeraj9436 | C | July 2, 2020, 1:38 a.m. | OK | GNU C++11 | TESTS | 25 | 30 | 0 | ||
85670476 | darshmodi | C | July 1, 2020, 2:44 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85665963 | bansal_naman | C | July 1, 2020, 2:35 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85672826 | KISL_ | C | July 1, 2020, 2:48 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85674738 | Mr.vajpayee | C | July 1, 2020, 2:52 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85681329 | Mboker0109 | C | July 1, 2020, 3:06 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85684823 | swapscool | C | July 1, 2020, 3:13 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85672724 | AbuRifatMuhammed | C | July 1, 2020, 2:48 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85672301 | Siyaana | C | July 1, 2020, 2:47 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 0 | ||
85712561 | gonerogue7755 | C | July 1, 2020, 6:54 p.m. | OK | GNU C++14 | TESTS | 25 | 30 | 102400 | ||
85740831 | poisonserpent_17 | C | July 2, 2020, 6:02 a.m. | OK | GNU C++14 | TESTS | 25 | 31 | 0 | ||
85721759 | David_Garcia | C | July 1, 2020, 10:18 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85666574 | Infinito_ | C | July 1, 2020, 2:36 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85711185 | Chocobar | C | July 1, 2020, 6:34 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85683523 | rocketrex | C | July 1, 2020, 3:10 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85677567 | splendid_marvel | C | July 1, 2020, 2:58 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85708070 | skankhunt_42 | C | July 1, 2020, 5:55 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85707605 | haser | C | July 1, 2020, 5:50 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85691317 | worm_eaten_by_chicken | C | July 1, 2020, 3:26 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 0 | ||
85687758 | HishamDroubi | C | July 1, 2020, 3:19 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 204800 | ||
85699031 | abmax777 | C | July 1, 2020, 4:45 p.m. | OK | GNU C++17 | TESTS | 25 | 30 | 204800 | ||
85661559 | Theofratus | C | July 1, 2020, 2:27 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 15 | 0 | ||
85719010 | nprakhar0411 | C | July 1, 2020, 8:57 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 15 | 0 | ||
85698701 | ggdwbg | C | July 1, 2020, 4:44 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 15 | 204800 | ||
85715010 | morete | C | July 1, 2020, 7:32 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 30 | 0 | ||
85719365 | lightseba | C | July 1, 2020, 9:07 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 30 | 0 | ||
85724378 | nicknamee12 | C | July 2, 2020, 12:03 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 30 | 0 | ||
85726539 | iaNTU | C | July 2, 2020, 1:20 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 30 | 0 | ||
85731051 | LethalPuppy | C | July 2, 2020, 3:09 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 30 | 0 | ||
85736177 | Sstee1XD | C | July 2, 2020, 4:51 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 30 | 0 | ||
85694639 | III_Wolverine_III | C | July 1, 2020, 3:32 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 30 | 0 | ||
85668731 | ktateish | C | July 1, 2020, 2:40 p.m. | OK | Go | TESTS | 25 | 46 | 102400 | ||
85719515 | Russell_Emerine | C | July 1, 2020, 9:11 p.m. | OK | Haskell | TESTS | 25 | 46 | 102400 | ||
85708776 | GForceSquared | C | July 1, 2020, 6:04 p.m. | OK | Java 11 | TESTS | 25 | 171 | 0 | ||
85708720 | chandler0702 | C | July 1, 2020, 6:03 p.m. | OK | Java 11 | TESTS | 25 | 171 | 0 | ||
85705043 | pgupta9830 | C | July 1, 2020, 5:24 p.m. | OK | Java 11 | TESTS | 25 | 171 | 0 | ||
85701811 | bobib | C | July 1, 2020, 4:58 p.m. | OK | Java 11 | TESTS | 25 | 171 | 0 | ||
85675704 | p_unit | C | July 1, 2020, 2:54 p.m. | OK | Java 11 | TESTS | 25 | 171 | 0 | ||
85725269 | anhtaihsgs | C | July 2, 2020, 12:36 a.m. | OK | Java 11 | TESTS | 25 | 186 | 0 | ||
85723665 | Oopsimbad | C | July 1, 2020, 11:32 p.m. | OK | Java 11 | TESTS | 25 | 186 | 0 | ||
85716424 | sam_abbas80 | C | July 1, 2020, 7:57 p.m. | OK | Java 11 | TESTS | 25 | 186 | 0 | ||
85712967 | ritwikrst | C | July 1, 2020, 7 p.m. | OK | Java 11 | TESTS | 25 | 186 | 0 | ||
85703258 | skittles1412 | C | July 1, 2020, 5:08 p.m. | OK | Java 11 | TESTS | 25 | 186 | 0 | ||
85663343 | elkadymohammed01 | C | July 1, 2020, 2:30 p.m. | OK | Java 8 | TESTS | 25 | 108 | 0 | ||
85726443 | _maverick | C | July 2, 2020, 1:16 a.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85738042 | ragnarok001 | C | July 2, 2020, 5:21 a.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85735308 | atharvat77 | C | July 2, 2020, 4:35 a.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85725884 | texasaboy1 | C | July 2, 2020, 12:57 a.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85718206 | jxin31415 | C | July 1, 2020, 8:37 p.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85717791 | ay_08 | C | July 1, 2020, 8:27 p.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85708843 | Hasib_Ullah | C | July 1, 2020, 6:05 p.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85704559 | flyman3046 | C | July 1, 2020, 5:20 p.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85704551 | the_royal_raj | C | July 1, 2020, 5:20 p.m. | OK | Java 8 | TESTS | 25 | 109 | 0 | ||
85726050 | Spheniscine | C | July 2, 2020, 1:03 a.m. | OK | Kotlin | TESTS | 25 | 109 | 0 | ||
85732402 | timurtibeyev | C | July 2, 2020, 3:38 a.m. | OK | Kotlin | TESTS | 25 | 124 | 0 | ||
85713871 | Hakiobo | C | July 1, 2020, 7:13 p.m. | OK | Kotlin | TESTS | 25 | 124 | 0 | ||
85670735 | rocketm | C | July 1, 2020, 2:44 p.m. | OK | Kotlin | TESTS | 25 | 140 | 0 | ||
85662014 | wuchaojie925 | C | July 1, 2020, 2:28 p.m. | OK | Kotlin | TESTS | 25 | 171 | 0 | ||
85695117 | Glamdring | C | July 1, 2020, 3:33 p.m. | OK | Kotlin | TESTS | 25 | 171 | 0 | ||
85682400 | wbars | C | July 1, 2020, 3:08 p.m. | OK | Kotlin | TESTS | 25 | 187 | 0 | ||
85686706 | totole | C | July 1, 2020, 3:17 p.m. | OK | Kotlin | TESTS | 25 | 202 | 102400 | ||
85667718 | CepGamer | C | July 1, 2020, 2:39 p.m. | OK | Kotlin | TESTS | 25 | 202 | 1024000 | ||
85670160 | riantkb | C | July 1, 2020, 2:43 p.m. | OK | Mono C# | TESTS | 25 | 77 | 819200 | ||
85664872 | Myeongjoon | C | July 1, 2020, 2:33 p.m. | OK | Mono C# | TESTS | 25 | 77 | 2457600 | ||
85687677 | magicmoo | C | July 1, 2020, 3:19 p.m. | OK | MS C++ | TESTS | 25 | 46 | 0 | ||
85682089 | Biang-Biang | C | July 1, 2020, 3:07 p.m. | OK | MS C++ | TESTS | 25 | 46 | 0 | ||
85682867 | YamagenSakam | C | July 1, 2020, 3:09 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85731332 | skymin | C | July 2, 2020, 3:16 a.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85728046 | pandoomanda | C | July 2, 2020, 1:59 a.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85707008 | HelloWorld101 | C | July 1, 2020, 5:43 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85686237 | pandoomanda | C | July 1, 2020, 3:16 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85680729 | xsc | C | July 1, 2020, 3:04 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85678531 | drobucs | C | July 1, 2020, 3 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85675200 | grey | C | July 1, 2020, 2:53 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85672572 | khoabright | C | July 1, 2020, 2:48 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85669828 | TimKo | C | July 1, 2020, 2:42 p.m. | OK | MS C++ 2017 | TESTS | 25 | 31 | 0 | ||
85662557 | Loremon | C | July 1, 2020, 2:29 p.m. | OK | Node.js | TESTS | 25 | 93 | 1228800 | ||
85734851 | OmniSliver | C | July 2, 2020, 4:27 a.m. | OK | Node.js | TESTS | 25 | 108 | 1536000 | ||
85666776 | raj1307 | C | July 1, 2020, 2:37 p.m. | OK | PyPy 2 | TESTS | 25 | 139 | 614400 | ||
85681675 | starkizard | C | July 1, 2020, 3:06 p.m. | OK | PyPy 2 | TESTS | 25 | 155 | 1638400 | ||
85662697 | sksshivam007 | C | July 1, 2020, 2:29 p.m. | OK | PyPy 2 | TESTS | 25 | 156 | 1843200 | ||
85715401 | ap1008 | C | July 1, 2020, 7:38 p.m. | OK | PyPy 2 | TESTS | 25 | 187 | 2457600 | ||
85663040 | snape_here | C | July 1, 2020, 2:30 p.m. | OK | PyPy 2 | TESTS | 25 | 218 | 8704000 | ||
85682658 | Satwik_Tiwari | C | July 1, 2020, 3:08 p.m. | OK | PyPy 2 | TESTS | 25 | 234 | 8294400 | ||
85677747 | mo-hit | C | July 1, 2020, 2:58 p.m. | OK | PyPy 2 | TESTS | 25 | 234 | 9420800 | ||
85674043 | kanhaiya38 | C | July 1, 2020, 2:51 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 204800 | ||
85662760 | gintoki_s | C | July 1, 2020, 2:29 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 204800 | ||
85702973 | ramgarg102 | C | July 1, 2020, 5:06 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 1331200 | ||
85708266 | GoatTimeDavis | C | July 1, 2020, 5:57 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 1433600 | ||
85705623 | PracticeAccountICL | C | July 1, 2020, 5:30 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 1433600 | ||
85669997 | bravotango | C | July 1, 2020, 2:43 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 1536000 | ||
85669836 | anilsaxena | C | July 1, 2020, 2:42 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 1638400 | ||
85679461 | westwakki | C | July 1, 2020, 3:02 p.m. | OK | PyPy 3 | TESTS | 25 | 155 | 2048000 | ||
85672015 | manish.17 | C | July 1, 2020, 2:47 p.m. | OK | PyPy 3 | TESTS | 25 | 156 | 1536000 | ||
85699218 | x3mka | C | July 1, 2020, 4:46 p.m. | OK | PyPy 3 | TESTS | 25 | 156 | 1740800 | ||
85713505 | ap1008 | C | July 1, 2020, 7:08 p.m. | OK | Python 2 | TESTS | 25 | 186 | 0 | ||
85700131 | ComptineDunAutreEte | C | July 1, 2020, 4:49 p.m. | OK | Python 2 | TESTS | 25 | 186 | 0 | ||
85692691 | kmd99 | C | July 1, 2020, 3:29 p.m. | OK | Python 2 | TESTS | 25 | 187 | 0 | ||
85662420 | lalith_krg1 | C | July 1, 2020, 2:29 p.m. | OK | Python 2 | TESTS | 25 | 187 | 0 | ||
85680698 | KA_Rma | C | July 1, 2020, 3:04 p.m. | OK | Python 3 | TESTS | 25 | 108 | 307200 | ||
85740022 | drashtijtandel | C | July 2, 2020, 5:51 a.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85736191 | jjoyner0892 | C | July 2, 2020, 4:51 a.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85727826 | KanhuKeNanu | C | July 2, 2020, 1:54 a.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85727078 | sarcasmqueen | C | July 2, 2020, 1:34 a.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85726134 | pk01 | C | July 2, 2020, 1:06 a.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85715840 | bhavy_barca | C | July 1, 2020, 7:46 p.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85709045 | Raselroky | C | July 1, 2020, 6:07 p.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85708000 | prime.1729 | C | July 1, 2020, 5:54 p.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85706519 | ranjithm2001 | C | July 1, 2020, 5:39 p.m. | OK | Python 3 | TESTS | 25 | 109 | 0 | ||
85666864 | masa0216masa0216masa0216 | C | July 1, 2020, 2:37 p.m. | OK | Ruby | TESTS | 25 | 966 | 921600 | ||
85704986 | shirakia | C | July 1, 2020, 5:24 p.m. | OK | Ruby | TESTS | 25 | 998 | 1638400 | ||
85701628 | cotton100pc | C | July 1, 2020, 4:57 p.m. | OK | Rust | TESTS | 25 | 31 | 204800 | ||
85723045 | bqn | C | July 1, 2020, 11:05 p.m. | OK | Rust | TESTS | 25 | 61 | 0 |
Back to search problems