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 |
---|---|---|---|---|---|---|
1921 | Codeforces Round 920 (Div. 3) | FINISHED | False | 8100 | 26493899 | Jan. 15, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 29553 ) | C | Sending Messages | PROGRAMMING | greedy math |
B'Stepan is a very busy person. Today he needs to send n messages at moments m_1, m_2, ... m_n ( m_i < m_{i + 1} ). Unfortunately, by the moment 0 , his phone only has f units of charge left. At the moment 0 , the phone is turned on. The phone loses a units of charge for each unit of time it is on. Also, at any moment, Stepan can turn off the phone and turn it on later. This action consumes b units of energy each time. Consider turning on and off to be instantaneous, so you can turn it on at moment x and send a message at the same moment, and vice versa, send a message at moment x and turn off the phone at the same moment. If at any point the charge level drops to 0 (becomes <= 0 ), it is impossible to send a message at that moment. Since all messages are very important to Stepan, he wants to know if he can send all the messages without the possibility of charging the phone. The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. This is followed by the descriptions of the test cases. The first line of each test case contains four integers n , f , a , and b ( 1 <= n <= 2 cdot 10^5 , 1 <= f, a, b <= 10^9 ) -- the number of messages, the initial phone 's charge, the charge consumption per unit of time, and the consumption when turned off and on sequentially. The second line of each test case contains n integers m_1, m_2, ... , m_n ( 1 <= m_i <= 10^9 , m_i < m_{i + 1} ) -- the moments at which messages need to be sent. It is guaranteed that in a test the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output "YES" if Stepan can send all the messages, and "NO" otherwise. You can output each letter in any case (lowercase or uppercase). For example, the strings "yEs", "yes", "Yes", and "YES" will be accepted as a positive answer. I'... |
Editorial for Codeforces Round 920 (Div. 3) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
241863532 | _Ghoco_ | C | Jan. 15, 2024, 11:23 p.m. | OK | C# 10 | TESTS | 11 | 77 | 19456000 | ||
241884293 | sh_arman | C | Jan. 16, 2024, 5:46 a.m. | OK | C# 10 | TESTS | 11 | 93 | 15974400 | ||
241867961 | bluemegane | C | Jan. 16, 2024, 1:37 a.m. | OK | C# 8 | TESTS | 11 | 171 | 21606400 | ||
241867885 | bluemegane | C | Jan. 16, 2024, 1:35 a.m. | OK | C# 8 | TESTS | 11 | 202 | 21606400 | ||
241876630 | aquily | C | Jan. 16, 2024, 4:08 a.m. | OK | Clang++20 Diagnostics | TESTS | 11 | 1169 | 2560000 | ||
241876982 | aquily | C | Jan. 16, 2024, 4:13 a.m. | OK | Clang++20 Diagnostics | TESTS | 11 | 1201 | 8294400 | ||
241872975 | lucozade | C | Jan. 16, 2024, 3:13 a.m. | OK | Clang++20 Diagnostics | TESTS | 11 | 1216 | 10547200 | ||
241831435 | Anubhav0084 | C | Jan. 15, 2024, 4:47 p.m. | OK | FPC | TESTS | 9 | 109 | 1638400 | ||
241837417 | arrrtem | C | Jan. 15, 2024, 5:08 p.m. | OK | GNU C11 | TESTS | 9 | 77 | 307200 | ||
241832036 | KhwaishGarg007 | C | Jan. 15, 2024, 4:48 p.m. | OK | GNU C11 | TESTS | 9 | 78 | 1024000 | ||
241836483 | mdkhaledmhamud220 | C | Jan. 15, 2024, 5:03 p.m. | OK | GNU C11 | TESTS | 9 | 78 | 1024000 | ||
241836125 | shrujal.ps | C | Jan. 15, 2024, 5:01 p.m. | OK | GNU C11 | TESTS | 9 | 78 | 1024000 | ||
241832019 | menon_710 | C | Jan. 15, 2024, 4:48 p.m. | OK | GNU C11 | TESTS | 9 | 78 | 1843200 | ||
241870238 | 7KING1JOKER | C | Jan. 16, 2024, 2:28 a.m. | OK | GNU C11 | TESTS | 11 | 93 | 819200 | ||
241839196 | jimmy2683 | C | Jan. 15, 2024, 5:18 p.m. | OK | GNU C11 | TESTS | 9 | 93 | 1638400 | ||
241838955 | sujalmeshram | C | Jan. 15, 2024, 5:16 p.m. | OK | GNU C11 | TESTS | 9 | 93 | 1638400 | ||
241841779 | FadedDio | C | Jan. 15, 2024, 5:35 p.m. | OK | GNU C11 | TESTS | 9 | 93 | 1638400 | ||
241881474 | Gov1507 | C | Jan. 16, 2024, 5:15 a.m. | OK | GNU C11 | TESTS | 11 | 93 | 1843200 | ||
241836269 | Asnrabbit | C | Jan. 15, 2024, 5:02 p.m. | OK | GNU C++14 | TESTS | 9 | 61 | 0 | ||
241861543 | omeganot | C | Jan. 15, 2024, 10:06 p.m. | OK | GNU C++14 | TESTS | 11 | 61 | 819200 | ||
241871945 | Anderw_ | C | Jan. 16, 2024, 2:58 a.m. | OK | GNU C++14 | TESTS | 11 | 61 | 819200 | ||
241858988 | Ahmed_Nasreldeen | C | Jan. 15, 2024, 9:01 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 0 | ||
241847018 | rizhabh | C | Jan. 15, 2024, 6:15 p.m. | OK | GNU C++14 | TESTS | 9 | 62 | 0 | ||
241854034 | DarkHomosapien | C | Jan. 15, 2024, 7:38 p.m. | OK | GNU C++14 | TESTS | 9 | 62 | 1638400 | ||
241868186 | Zhou__Yiiii | C | Jan. 16, 2024, 1:43 a.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
241881708 | haulg3 | C | Jan. 16, 2024, 5:18 a.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
241866723 | icexhb | C | Jan. 16, 2024, 1:08 a.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
241863369 | CollegeBoard | C | Jan. 15, 2024, 11:15 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
241833808 | L3AD3R_120 | C | Jan. 15, 2024, 4:51 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 819200 | ||
241871651 | Now_IsThe_Important_Time | C | Jan. 16, 2024, 2:54 a.m. | OK | GNU C++17 | TESTS | 11 | 46 | 819200 | ||
241832644 | Phantom769 | C | Jan. 15, 2024, 4:49 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 819200 | ||
241879251 | professor_sergio | C | Jan. 16, 2024, 4:47 a.m. | OK | GNU C++17 | TESTS | 11 | 46 | 2457600 | ||
241849673 | automac | C | Jan. 15, 2024, 6:40 p.m. | OK | GNU C++17 | TESTS | 9 | 61 | 1638400 | ||
241847806 | ashuSam | C | Jan. 15, 2024, 6:22 p.m. | OK | GNU C++17 | TESTS | 9 | 61 | 1638400 | ||
241836625 | A7med_Sayed | C | Jan. 15, 2024, 5:04 p.m. | OK | GNU C++17 | TESTS | 9 | 61 | 14438400 | ||
241865128 | yhkhoo | C | Jan. 16, 2024, 12:24 a.m. | OK | GNU C++17 | TESTS | 11 | 62 | 0 | ||
241882697 | toufiqahmedshr | C | Jan. 16, 2024, 5:29 a.m. | OK | GNU C++17 | TESTS | 11 | 62 | 0 | ||
241880359 | JomnoiZ | C | Jan. 16, 2024, 5:03 a.m. | OK | GNU C++17 | TESTS | 11 | 62 | 0 | ||
241852122 | __TRUE__ | C | Jan. 15, 2024, 7:06 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 15 | 3276800 | ||
241862582 | sandoval95 | C | Jan. 15, 2024, 10:42 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 31 | 0 | ||
241841419 | Hedylhh | C | Jan. 15, 2024, 5:32 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 31 | 0 | ||
241874926 | ztwanan20 | C | Jan. 16, 2024, 3:44 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 31 | 819200 | ||
241881089 | KXD04 | C | Jan. 16, 2024, 5:11 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 31 | 1638400 | ||
241882537 | Invincible24 | C | Jan. 16, 2024, 5:27 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 31 | 1638400 | ||
241860373 | DeadWasp420 | C | Jan. 15, 2024, 9:32 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 31 | 4198400 | ||
241841945 | Hedylhh | C | Jan. 15, 2024, 5:37 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 46 | 0 | ||
241882807 | SzHeN | C | Jan. 16, 2024, 5:30 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 0 | ||
241877690 | xw_oo | C | Jan. 16, 2024, 4:25 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 819200 | ||
241872926 | kissna | C | Jan. 16, 2024, 3:12 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 31 | 0 | ||
241874597 | IanISam | C | Jan. 16, 2024, 3:39 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 31 | 0 | ||
241876358 | knightzzz1 | C | Jan. 16, 2024, 4:04 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 31 | 0 | ||
241877532 | Giga_Cronos | C | Jan. 16, 2024, 4:22 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 31 | 0 | ||
241879220 | zijin12 | C | Jan. 16, 2024, 4:47 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 31 | 0 | ||
241880538 | vancywu | C | Jan. 16, 2024, 5:05 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 31 | 0 | ||
241867123 | shirokane_rinko | C | Jan. 16, 2024, 1:19 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 31 | 0 | ||
241842881 | haters | C | Jan. 15, 2024, 5:43 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 0 | ||
241841276 | experimenta | C | Jan. 15, 2024, 5:31 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 0 | ||
241840754 | payal_27 | C | Jan. 15, 2024, 5:28 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 0 | ||
241865897 | samuelX159 | C | Jan. 16, 2024, 12:48 a.m. | OK | Java 11 | TESTS | 11 | 217 | 0 | ||
241875397 | formidablechief27 | C | Jan. 16, 2024, 3:50 a.m. | OK | Java 11 | TESTS | 11 | 234 | 5529600 | ||
241857936 | wat2 | C | Jan. 15, 2024, 8:41 p.m. | OK | Java 11 | TESTS | 11 | 249 | 0 | ||
241860002 | Nick | C | Jan. 15, 2024, 9:23 p.m. | OK | Java 11 | TESTS | 11 | 249 | 10342400 | ||
241838197 | sabalparajay | C | Jan. 15, 2024, 5:12 p.m. | OK | Java 11 | TESTS | 9 | 483 | 0 | ||
241862971 | crrystaly | C | Jan. 15, 2024, 11 p.m. | OK | Java 11 | TESTS | 11 | 529 | 0 | ||
241858766 | vinayak_20 | C | Jan. 15, 2024, 8:56 p.m. | OK | Java 11 | TESTS | 11 | 545 | 0 | ||
241844287 | rajneesh.osho | C | Jan. 15, 2024, 5:54 p.m. | OK | Java 11 | TESTS | 9 | 545 | 0 | ||
241855638 | AkshatSaxena_05 | C | Jan. 15, 2024, 8:02 p.m. | OK | Java 11 | TESTS | 9 | 560 | 0 | ||
241844247 | SmartCode | C | Jan. 15, 2024, 5:53 p.m. | OK | Java 11 | TESTS | 9 | 561 | 0 | ||
241865891 | samuelX159 | C | Jan. 16, 2024, 12:47 a.m. | OK | Java 17 | TESTS | 11 | 264 | 0 | ||
241856930 | rachita2597 | C | Jan. 15, 2024, 8:23 p.m. | OK | Java 17 | TESTS | 11 | 280 | 819200 | ||
241846114 | ash_79 | C | Jan. 15, 2024, 6:08 p.m. | OK | Java 17 | TESTS | 9 | 311 | 0 | ||
241869036 | Jatinydv17 | C | Jan. 16, 2024, 2:03 a.m. | OK | Java 17 | TESTS | 11 | 311 | 512000 | ||
241836727 | shubhanshu_jha14 | C | Jan. 15, 2024, 5:04 p.m. | OK | Java 17 | TESTS | 9 | 358 | 22220800 | ||
241882040 | Raging_Shashank | C | Jan. 16, 2024, 5:22 a.m. | OK | Java 17 | TESTS | 11 | 514 | 307200 | ||
241882007 | RageGuy | C | Jan. 16, 2024, 5:21 a.m. | OK | Java 17 | TESTS | 11 | 514 | 307200 | ||
241865692 | wuhu_ac | C | Jan. 16, 2024, 12:42 a.m. | OK | Java 17 | TESTS | 11 | 514 | 819200 | ||
241835434 | QWQwww | C | Jan. 15, 2024, 4:58 p.m. | OK | Java 17 | TESTS | 9 | 529 | 204800 | ||
241839589 | bikashsahh | C | Jan. 15, 2024, 5:21 p.m. | OK | Java 17 | TESTS | 9 | 530 | 204800 | ||
241872385 | ND_ | C | Jan. 16, 2024, 3:05 a.m. | OK | Java 21 | TESTS | 11 | 233 | 0 | ||
241865878 | samuelX159 | C | Jan. 16, 2024, 12:47 a.m. | OK | Java 21 | TESTS | 11 | 296 | 0 | ||
241863685 | player22 | C | Jan. 15, 2024, 11:29 p.m. | OK | Java 21 | TESTS | 11 | 342 | 204800 | ||
241834584 | Pratik_M07 | C | Jan. 15, 2024, 4:54 p.m. | OK | Java 21 | TESTS | 9 | 358 | 614400 | ||
241878061 | ChongQY | C | Jan. 16, 2024, 4:31 a.m. | OK | Java 21 | TESTS | 11 | 389 | 46899200 | ||
241847991 | Apoorv10aaa | C | Jan. 15, 2024, 6:23 p.m. | OK | Java 21 | TESTS | 9 | 577 | 22835200 | ||
241859674 | Om77 | C | Jan. 15, 2024, 9:15 p.m. | OK | Java 21 | TESTS | 11 | 638 | 307200 | ||
241867432 | goalboy | C | Jan. 16, 2024, 1:26 a.m. | OK | Java 21 | TESTS | 11 | 639 | 409600 | ||
241841888 | Harsh_Agrawal_12 | C | Jan. 15, 2024, 5:36 p.m. | OK | Java 21 | TESTS | 9 | 701 | 512000 | ||
241834623 | Marcelace | C | Jan. 15, 2024, 4:54 p.m. | OK | Java 21 | TESTS | 9 | 701 | 7372800 | ||
241835530 | alexklm | C | Jan. 15, 2024, 4:58 p.m. | OK | Java 8 | TESTS | 9 | 155 | 2867200 | ||
241843692 | tirthgohil1410 | C | Jan. 15, 2024, 5:50 p.m. | OK | Java 8 | TESTS | 9 | 171 | 2867200 | ||
241854475 | Sumitsingh7 | C | Jan. 15, 2024, 7:44 p.m. | OK | Java 8 | TESTS | 9 | 202 | 5836800 | ||
241853278 | k.SUMANTH | C | Jan. 15, 2024, 7:21 p.m. | OK | Java 8 | TESTS | 9 | 451 | 0 | ||
241846399 | kdprasad0036 | C | Jan. 15, 2024, 6:10 p.m. | OK | Java 8 | TESTS | 9 | 483 | 0 | ||
241853057 | k.SUMANTH | C | Jan. 15, 2024, 7:18 p.m. | OK | Java 8 | TESTS | 9 | 498 | 0 | ||
241854172 | Baidiki | C | Jan. 15, 2024, 7:40 p.m. | OK | Java 8 | TESTS | 9 | 514 | 0 | ||
241859237 | arvindf232 | C | Jan. 15, 2024, 9:06 p.m. | OK | Kotlin 1.9 | TESTS | 11 | 311 | 7168000 | ||
241832869 | s2110676154 | C | Jan. 15, 2024, 4:49 p.m. | OK | Kotlin 1.9 | TESTS | 9 | 888 | 118374400 | ||
241833220 | pecker | C | Jan. 15, 2024, 4:49 p.m. | OK | MS C++ 2017 | TESTS | 9 | 171 | 3993600 | ||
241864584 | HRRRRXXX | C | Jan. 16, 2024, 12:07 a.m. | OK | MS C++ 2017 | TESTS | 11 | 202 | 1638400 | ||
241864509 | HRRRRXXX | C | Jan. 16, 2024, 12:05 a.m. | OK | MS C++ 2017 | TESTS | 11 | 202 | 1638400 | ||
241854491 | pijamassolemnes | C | Jan. 15, 2024, 7:45 p.m. | OK | MS C++ 2017 | TESTS | 9 | 249 | 1638400 | ||
241836759 | __breeze__ | C | Jan. 15, 2024, 5:04 p.m. | OK | MS C++ 2017 | TESTS | 9 | 249 | 2457600 | ||
241872266 | jiajunnb | C | Jan. 16, 2024, 3:04 a.m. | OK | MS C++ 2017 | TESTS | 11 | 249 | 3276800 | ||
241864966 | Square_Sponge | C | Jan. 16, 2024, 12:19 a.m. | OK | MS C++ 2017 | TESTS | 11 | 265 | 1638400 | ||
241840385 | Sofi_ | C | Jan. 15, 2024, 5:25 p.m. | OK | MS C++ 2017 | TESTS | 9 | 265 | 1638400 | ||
241835012 | shuangya | C | Jan. 15, 2024, 4:56 p.m. | OK | MS C++ 2017 | TESTS | 9 | 280 | 1638400 | ||
241851116 | amit_shinde | C | Jan. 15, 2024, 6:55 p.m. | OK | MS C++ 2017 | TESTS | 9 | 280 | 4915200 | ||
241865393 | albom45674 | C | Jan. 16, 2024, 12:33 a.m. | OK | PHP | TESTS | 11 | 77 | 23142400 | ||
241863700 | crapcode | C | Jan. 15, 2024, 11:30 p.m. | OK | PHP | TESTS | 11 | 93 | 31539200 | ||
241864969 | rvronak | C | Jan. 16, 2024, 12:19 a.m. | OK | PyPy 3 | TESTS | 11 | 530 | 18841600 | ||
241848480 | noob_username | C | Jan. 15, 2024, 6:28 p.m. | OK | PyPy 3 | TESTS | 9 | 546 | 19046400 | ||
241835960 | gardengnome | C | Jan. 15, 2024, 5 p.m. | OK | PyPy 3-64 | TESTS | 9 | 108 | 27545600 | ||
241863188 | nealzane | C | Jan. 15, 2024, 11:08 p.m. | OK | PyPy 3-64 | TESTS | 11 | 124 | 25088000 | ||
241870991 | Drunkula | C | Jan. 16, 2024, 2:41 a.m. | OK | PyPy 3-64 | TESTS | 11 | 124 | 26726400 | ||
241859747 | Namika | C | Jan. 15, 2024, 9:17 p.m. | OK | PyPy 3-64 | TESTS | 11 | 124 | 29900800 | ||
241859751 | DRDIV | C | Jan. 15, 2024, 9:17 p.m. | OK | PyPy 3-64 | TESTS | 11 | 140 | 26726400 | ||
241858587 | Quick-One | C | Jan. 15, 2024, 8:53 p.m. | OK | PyPy 3-64 | TESTS | 11 | 140 | 27545600 | ||
241842994 | NitroSpear | C | Jan. 15, 2024, 5:44 p.m. | OK | PyPy 3-64 | TESTS | 9 | 140 | 27545600 | ||
241837817 | GirirajParik_08 | C | Jan. 15, 2024, 5:10 p.m. | OK | PyPy 3-64 | TESTS | 9 | 140 | 29900800 | ||
241882821 | Mind_Reaper | C | Jan. 16, 2024, 5:30 a.m. | OK | PyPy 3-64 | TESTS | 11 | 155 | 24473600 | ||
241861686 | Deecey01 | C | Jan. 15, 2024, 10:11 p.m. | OK | PyPy 3-64 | TESTS | 11 | 155 | 27238400 | ||
241839459 | OLOGY | C | Jan. 15, 2024, 5:20 p.m. | OK | Python 2 | TESTS | 9 | 233 | 13004800 | ||
241840276 | durga256 | C | Jan. 15, 2024, 5:25 p.m. | OK | Python 3 | TESTS | 9 | 139 | 28160000 | ||
241862465 | IroineGrandison | C | Jan. 15, 2024, 10:38 p.m. | OK | Python 3 | TESTS | 11 | 155 | 26419200 | ||
241838775 | ra__hul | C | Jan. 15, 2024, 5:15 p.m. | OK | Python 3 | TESTS | 9 | 170 | 27033600 | ||
241866812 | Biniyamseid | C | Jan. 16, 2024, 1:10 a.m. | OK | Python 3 | TESTS | 11 | 171 | 26624000 | ||
241879651 | Naitikshah | C | Jan. 16, 2024, 4:53 a.m. | OK | Python 3 | TESTS | 11 | 171 | 27750400 | ||
241861132 | LizzieReed | C | Jan. 15, 2024, 9:52 p.m. | OK | Python 3 | TESTS | 11 | 171 | 27955200 | ||
241839344 | Nour_202 | C | Jan. 15, 2024, 5:19 p.m. | OK | Python 3 | TESTS | 9 | 171 | 27955200 | ||
241835827 | xmwriam | C | Jan. 15, 2024, 5 p.m. | OK | Python 3 | TESTS | 9 | 171 | 28057600 | ||
241833148 | EvelynZT | C | Jan. 15, 2024, 4:49 p.m. | OK | Python 3 | TESTS | 9 | 171 | 28057600 | ||
241876674 | Sambath_S | C | Jan. 16, 2024, 4:09 a.m. | OK | Python 3 | TESTS | 11 | 171 | 30003200 | ||
241863428 | 0x81 | C | Jan. 15, 2024, 11:18 p.m. | OK | Ruby 3 | TESTS | 11 | 623 | 23756800 | ||
241858721 | liut | C | Jan. 15, 2024, 8:55 p.m. | OK | Rust 2021 | TESTS | 11 | 30 | 1638400 |
Back to search problems