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 |
---|---|---|---|---|---|---|
1786 | Codeforces Round 850 (Div. 2, based on VK Cup 2022 - Final Round) | FINISHED | False | 10800 | 61667663 | Feb. 5, 2023, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 9155 ) | B | Cake Assembly Line | PROGRAMMING | brute force sortings |
B'A cake assembly line in a bakery was once again optimized, and now n cakes are made at a time! In the last step, each of the n cakes should be covered with chocolate. Consider a side view on the conveyor belt, let it be a number line. The i -th cake occupies the segment [a_i - w, a_i + w] on this line, each pair of these segments does not have common points. Above the conveyor, there are n dispensers, and when a common button is pressed, chocolate from the i -th dispenser will cover the conveyor segment [b_i - h, b_i + h] . Each pair of these segments also does not have common points. The calibration of this conveyor belt part has not yet been performed, so you are to make it. Determine if it 's possible to shift the conveyor so that each cake has some chocolate on it, and there is no chocolate outside the cakes. You can assume that the conveyour is long enough, so the cakes never fall. Also note that the button can only be pressed once. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^5 ). The description of the test cases follows. The first line of each test case contains three integers n , w , and h ( 1 <= n <= 10^5 ; 1 <= w, h <= 10^5 ; h <= w ) -- the number of cakes and dispensers, as well as the halfwidths of cakes and segments on which the chocolate is dispensed. The second line contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= 10^9 ) -- the positions of the cakes centers. It is guaranteed that a_i + w < a_{i + 1} - w for all i . The third line contains n integers b_1 , b_2 , ..., b_n ( 1 <= b_i <= 10^9 ) -- the positions of the dispensers. It is guaranteed that b_i + h < b_{i + 1} - h for all i . It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case output "YES", if i'... |
Codeforces Round #850 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
192369828 | mmegg | B | Feb. 5, 2023, 4:56 p.m. | OK | GNU C11 | TESTS | 9 | 46 | 819200 | ||
192337380 | manasnarang18 | B | Feb. 5, 2023, 2:11 p.m. | OK | GNU C11 | TESTS | 9 | 124 | 819200 | ||
192338674 | _DRIN_ | B | Feb. 5, 2023, 2:16 p.m. | OK | GNU C11 | TESTS | 9 | 124 | 1638400 | ||
192424257 | Smallorange | B | Feb. 6, 2023, 5:36 a.m. | OK | GNU C11 | TESTS | 10 | 249 | 3174400 | ||
192374681 | omeganot | B | Feb. 5, 2023, 5:34 p.m. | OK | GNU C++14 | TESTS | 9 | 46 | 819200 | ||
192366477 | Blackening | B | Feb. 5, 2023, 4:33 p.m. | OK | GNU C++14 | TESTS | 9 | 46 | 819200 | ||
192341797 | ok_code | B | Feb. 5, 2023, 2:28 p.m. | OK | GNU C++14 | TESTS | 9 | 46 | 1638400 | ||
192339498 | _ppp204 | B | Feb. 5, 2023, 2:19 p.m. | OK | GNU C++14 | TESTS | 9 | 46 | 3174400 | ||
192351304 | PranksterComet | B | Feb. 5, 2023, 3:04 p.m. | OK | GNU C++14 | TESTS | 9 | 61 | 819200 | ||
192344293 | Tus_har0112 | B | Feb. 5, 2023, 2:38 p.m. | OK | GNU C++14 | TESTS | 9 | 61 | 819200 | ||
192341081 | wish_rajput | B | Feb. 5, 2023, 2:25 p.m. | OK | GNU C++14 | TESTS | 9 | 61 | 1638400 | ||
192333334 | PEPPAPIGRAN | B | Feb. 5, 2023, 1:59 p.m. | OK | GNU C++14 | TESTS | 9 | 61 | 1638400 | ||
192366208 | singhabhishek6 | B | Feb. 5, 2023, 4:31 p.m. | OK | GNU C++14 | TESTS | 9 | 61 | 2662400 | ||
192384711 | RED_MONK | B | Feb. 5, 2023, 6:59 p.m. | OK | GNU C++14 | TESTS | 9 | 61 | 2662400 | ||
192374526 | Azimjonm0012 | B | Feb. 5, 2023, 5:33 p.m. | OK | GNU C++17 | TESTS | 9 | 15 | 2662400 | ||
192343164 | cyrux21 | B | Feb. 5, 2023, 2:33 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 819200 | ||
192364587 | Turkhuuu | B | Feb. 5, 2023, 4:21 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 819200 | ||
192363368 | jaineshmachhi | B | Feb. 5, 2023, 4:14 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 819200 | ||
192344519 | mario-vimal | B | Feb. 5, 2023, 2:38 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 819200 | ||
192334349 | you2lyou2 | B | Feb. 5, 2023, 2:01 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 1536000 | ||
192381280 | AnkitMr | B | Feb. 5, 2023, 6:28 p.m. | OK | GNU C++17 | TESTS | 9 | 46 | 1638400 | ||
192363010 | remastered | B | Feb. 5, 2023, 4:12 p.m. | OK | GNU C++17 | TESTS | 9 | 61 | 819200 | ||
192363739 | __InnocentStranger__ | B | Feb. 5, 2023, 4:16 p.m. | OK | GNU C++17 | TESTS | 9 | 61 | 819200 | ||
192373976 | jaineshmachhi | B | Feb. 5, 2023, 5:28 p.m. | OK | GNU C++17 | TESTS | 9 | 61 | 819200 | ||
192347830 | leoliu0217 | B | Feb. 5, 2023, 2:51 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 31 | 819200 | ||
192369241 | EduardoBrito | B | Feb. 5, 2023, 4:52 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 31 | 1638400 | ||
192385944 | Nelt | B | Feb. 5, 2023, 7:11 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 31 | 1843200 | ||
192343258 | ashiqi2 | B | Feb. 5, 2023, 2:34 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 46 | 819200 | ||
192417716 | gluchie | B | Feb. 6, 2023, 3:54 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 46 | 819200 | ||
192408829 | Yumee | B | Feb. 6, 2023, 12:57 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 46 | 819200 | ||
192373238 | panthera69tigris | B | Feb. 5, 2023, 5:22 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 46 | 819200 | ||
192366294 | Omja | B | Feb. 5, 2023, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 46 | 819200 | ||
192332074 | A_Homura | B | Feb. 5, 2023, 1:55 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 46 | 819200 | ||
192418107 | kk_d | B | Feb. 6, 2023, 4:01 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 46 | 1638400 | ||
192373571 | physics0523 | B | Feb. 5, 2023, 5:25 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 409600 | ||
192374348 | AkramElOmrani | B | Feb. 5, 2023, 5:31 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 819200 | ||
192374030 | emthrm | B | Feb. 5, 2023, 5:29 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 819200 | ||
192369118 | Sumitp007 | B | Feb. 5, 2023, 4:52 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 819200 | ||
192379521 | me_poojan23 | B | Feb. 5, 2023, 6:13 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 819200 | ||
192365422 | roycf123 | B | Feb. 5, 2023, 4:26 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 819200 | ||
192409403 | Yanz | B | Feb. 6, 2023, 1:11 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 819200 | ||
192421764 | UUUnmei | B | Feb. 6, 2023, 5:02 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 819200 | ||
192365471 | Desh01 | B | Feb. 5, 2023, 4:26 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 819200 | ||
192376060 | duken72 | B | Feb. 5, 2023, 5:46 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 31 | 819200 | ||
192426075 | july_tang | B | Feb. 6, 2023, 5:59 a.m. | OK | Go | TESTS | 10 | 296 | 4710400 | ||
192364745 | scc9811 | B | Feb. 5, 2023, 4:22 p.m. | OK | Java 11 | TESTS | 9 | 217 | 0 | ||
192389894 | wat2 | B | Feb. 5, 2023, 7:52 p.m. | OK | Java 11 | TESTS | 10 | 233 | 0 | ||
192340442 | deepakkdkk | B | Feb. 5, 2023, 2:23 p.m. | OK | Java 11 | TESTS | 9 | 249 | 512000 | ||
192339539 | prakharpandey01 | B | Feb. 5, 2023, 2:19 p.m. | OK | Java 11 | TESTS | 9 | 311 | 0 | ||
192379458 | habib_48 | B | Feb. 5, 2023, 6:13 p.m. | OK | Java 11 | TESTS | 9 | 311 | 3686400 | ||
192385131 | TrailBlazer | B | Feb. 5, 2023, 7:03 p.m. | OK | Java 11 | TESTS | 9 | 327 | 0 | ||
192338153 | adarsh_code_01 | B | Feb. 5, 2023, 2:14 p.m. | OK | Java 11 | TESTS | 9 | 373 | 0 | ||
192351257 | creativegiant | B | Feb. 5, 2023, 3:04 p.m. | OK | Java 11 | TESTS | 9 | 373 | 6963200 | ||
192336155 | Dan1c | B | Feb. 5, 2023, 2:06 p.m. | OK | Java 11 | TESTS | 9 | 389 | 9523200 | ||
192383896 | Hitesh517 | B | Feb. 5, 2023, 6:51 p.m. | OK | Java 11 | TESTS | 9 | 452 | 0 | ||
192347263 | _CHEEMS_ | B | Feb. 5, 2023, 2:49 p.m. | OK | Java 17 | TESTS | 9 | 233 | 819200 | ||
192333635 | mlangc | B | Feb. 5, 2023, 1:59 p.m. | OK | Java 17 | TESTS | 9 | 234 | 204800 | ||
192332323 | Eslam_Ahmed | B | Feb. 5, 2023, 1:56 p.m. | OK | Java 17 | TESTS | 9 | 249 | 819200 | ||
192345160 | T_PAVAN_NAGARAJU | B | Feb. 5, 2023, 2:41 p.m. | OK | Java 17 | TESTS | 9 | 249 | 1843200 | ||
192346037 | RammohanSharma | B | Feb. 5, 2023, 2:44 p.m. | OK | Java 17 | TESTS | 9 | 265 | 3993600 | ||
192349702 | apoorvambavat | B | Feb. 5, 2023, 2:59 p.m. | OK | Java 17 | TESTS | 9 | 311 | 15974400 | ||
192335089 | rudra03 | B | Feb. 5, 2023, 2:03 p.m. | OK | Java 17 | TESTS | 9 | 514 | 921600 | ||
192350682 | AlcorRoss | B | Feb. 5, 2023, 3:02 p.m. | OK | Java 17 | TESTS | 9 | 545 | 204800 | ||
192404289 | Sudhanshu_61 | B | Feb. 5, 2023, 11:15 p.m. | OK | Java 17 | TESTS | 10 | 592 | 614400 | ||
192334910 | RahulAhuja2901 | B | Feb. 5, 2023, 2:03 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
192406210 | megaspazz | B | Feb. 5, 2023, 11:59 p.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
192339790 | ak472003 | B | Feb. 5, 2023, 2:20 p.m. | OK | Java 8 | TESTS | 9 | 140 | 1536000 | ||
192343244 | vkukretiwork | B | Feb. 5, 2023, 2:33 p.m. | OK | Java 8 | TESTS | 9 | 140 | 1638400 | ||
192336228 | Swapniltri | B | Feb. 5, 2023, 2:07 p.m. | OK | Java 8 | TESTS | 9 | 171 | 3072000 | ||
192341399 | formidablechief_27 | B | Feb. 5, 2023, 2:27 p.m. | OK | Java 8 | TESTS | 9 | 171 | 4403200 | ||
192347899 | dualthread | B | Feb. 5, 2023, 2:52 p.m. | OK | Java 8 | TESTS | 9 | 295 | 2764800 | ||
192332779 | aditya888 | B | Feb. 5, 2023, 1:57 p.m. | OK | Java 8 | TESTS | 9 | 452 | 0 | ||
192412465 | chenyi040901 | B | Feb. 6, 2023, 2:20 a.m. | OK | Java 8 | TESTS | 10 | 779 | 0 | ||
192332058 | Gadi | B | Feb. 5, 2023, 1:55 p.m. | OK | MS C++ 2017 | TESTS | 9 | 171 | 819200 | ||
192348720 | gaspar.kristijan | B | Feb. 5, 2023, 2:55 p.m. | OK | MS C++ 2017 | TESTS | 9 | 171 | 3481600 | ||
192364722 | skimono | B | Feb. 5, 2023, 4:22 p.m. | OK | MS C++ 2017 | TESTS | 9 | 202 | 5734400 | ||
192363670 | t.o.halo | B | Feb. 5, 2023, 4:15 p.m. | OK | MS C++ 2017 | TESTS | 9 | 218 | 819200 | ||
192340697 | 153floppa | B | Feb. 5, 2023, 2:24 p.m. | OK | MS C++ 2017 | TESTS | 9 | 233 | 1945600 | ||
192333118 | yosefeyad024 | B | Feb. 5, 2023, 1:58 p.m. | OK | MS C++ 2017 | TESTS | 9 | 233 | 1945600 | ||
192368889 | alsrb0504 | B | Feb. 5, 2023, 4:50 p.m. | OK | Node.js | TESTS | 9 | 186 | 15974400 | ||
192337834 | maxymczech | B | Feb. 5, 2023, 2:13 p.m. | OK | Node.js | TESTS | 9 | 390 | 16793600 | ||
192339812 | yoralbayev | B | Feb. 5, 2023, 2:20 p.m. | OK | PHP | TESTS | 9 | 217 | 58880000 | ||
192373059 | misorin | B | Feb. 5, 2023, 5:20 p.m. | OK | PyPy 3 | TESTS | 9 | 171 | 15974400 | ||
192364025 | hxu10 | B | Feb. 5, 2023, 4:17 p.m. | OK | PyPy 3 | TESTS | 9 | 186 | 17715200 | ||
192413362 | bpdolson | B | Feb. 6, 2023, 2:37 a.m. | OK | PyPy 3 | TESTS | 10 | 233 | 16281600 | ||
192395954 | hxu10 | B | Feb. 5, 2023, 9:06 p.m. | OK | PyPy 3 | TESTS | 10 | 233 | 17715200 | ||
192348068 | okay4869 | B | Feb. 5, 2023, 2:52 p.m. | OK | PyPy 3 | TESTS | 9 | 780 | 15360000 | ||
192366482 | harshini.paranjape | B | Feb. 5, 2023, 4:33 p.m. | OK | PyPy 3 | TESTS | 9 | 795 | 15769600 | ||
192376092 | anshumannandan | B | Feb. 5, 2023, 5:46 p.m. | OK | PyPy 3-64 | TESTS | 9 | 140 | 17100800 | ||
192377389 | SophieHatter | B | Feb. 5, 2023, 5:56 p.m. | OK | PyPy 3-64 | TESTS | 9 | 140 | 26214400 | ||
192357345 | MohmadZaid._. | B | Feb. 5, 2023, 4:10 p.m. | OK | PyPy 3-64 | TESTS | 9 | 155 | 19763200 | ||
192397961 | gardengnome | B | Feb. 5, 2023, 9:34 p.m. | OK | PyPy 3-64 | TESTS | 10 | 171 | 16588800 | ||
192410404 | Omar.Gawdat | B | Feb. 6, 2023, 1:35 a.m. | OK | PyPy 3-64 | TESTS | 10 | 171 | 20275200 | ||
192371393 | hkwu6013 | B | Feb. 5, 2023, 5:08 p.m. | OK | PyPy 3-64 | TESTS | 9 | 171 | 20992000 | ||
192397894 | WolG | B | Feb. 5, 2023, 9:33 p.m. | OK | PyPy 3-64 | TESTS | 10 | 171 | 25190400 | ||
192413688 | Mohamed_Hamed | B | Feb. 6, 2023, 2:42 a.m. | OK | PyPy 3-64 | TESTS | 10 | 186 | 16588800 | ||
192345183 | 2momo2 | B | Feb. 5, 2023, 2:41 p.m. | OK | PyPy 3-64 | TESTS | 9 | 186 | 16588800 | ||
192409696 | liuaaa | B | Feb. 6, 2023, 1:18 a.m. | OK | PyPy 3-64 | TESTS | 10 | 186 | 20582400 | ||
192375501 | dzaga | B | Feb. 5, 2023, 5:41 p.m. | OK | Python 3 | TESTS | 9 | 312 | 12800000 | ||
192346973 | chopin123 | B | Feb. 5, 2023, 2:48 p.m. | OK | Python 3 | TESTS | 9 | 343 | 10240000 | ||
192337404 | rohanmitra2420 | B | Feb. 5, 2023, 2:11 p.m. | OK | Python 3 | TESTS | 9 | 358 | 10547200 | ||
192343794 | java_py | B | Feb. 5, 2023, 2:36 p.m. | OK | Python 3 | TESTS | 9 | 390 | 10035200 | ||
192341338 | A_Ankit | B | Feb. 5, 2023, 2:26 p.m. | OK | Python 3 | TESTS | 9 | 436 | 10035200 | ||
192340535 | PMityurin | B | Feb. 5, 2023, 2:23 p.m. | OK | Python 3 | TESTS | 9 | 436 | 10547200 | ||
192348663 | Codynfinity | B | Feb. 5, 2023, 2:55 p.m. | OK | Python 3 | TESTS | 9 | 436 | 11673600 | ||
192337800 | ma3ter3ky | B | Feb. 5, 2023, 2:13 p.m. | OK | Python 3 | TESTS | 9 | 452 | 10342400 | ||
192351252 | Alecksey | B | Feb. 5, 2023, 3:04 p.m. | OK | Python 3 | TESTS | 9 | 467 | 10035200 | ||
192336661 | idkwmirn | B | Feb. 5, 2023, 2:08 p.m. | OK | Python 3 | TESTS | 9 | 467 | 13209600 | ||
192365747 | p-a-t | B | Feb. 5, 2023, 4:28 p.m. | OK | Rust 2021 | TESTS | 9 | 31 | 1433600 | ||
192378576 | fQuark | B | Feb. 5, 2023, 6:05 p.m. | OK | Rust 2021 | TESTS | 9 | 46 | 13619200 |
Back to search problems