Codeforces Round 823 (Div. 2)

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
1730 Codeforces Round 823 (Div. 2) FINISHED False 7200 73063463 Sept. 25, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13327 ) B Meeting on the Line PROGRAMMING binary search greedy implementation math ternary search 1600

B" n people live on the coordinate line, the i -th one lives at the point x_i ( 1 <= i <= n ). They want to choose a position x_0 to meet. The i -th person will spend |x_i - x_0| minutes to get to the meeting place. Also, the i -th person needs t_i minutes to get dressed, so in total he or she needs t_i + |x_i - x_0| minutes. Here |y| denotes the absolute value of y . These people ask you to find a position x_0 that minimizes the time in which all n people can gather at the meeting place. The first line contains a single integer t ( 1 <= t <= 10^3 ) -- the number of test cases. Then the test cases follow. Each test case consists of three lines. The first line contains a single integer n ( 1 <= n <= 10^5 ) -- the number of people. The second line contains n integers x_1, x_2, ... , x_n ( 0 <= x_i <= 10^{8} ) -- the positions of the people. The third line contains n integers t_1, t_2, ... , t_n ( 0 <= t_i <= 10^{8} ), where t_i is the time i -th person needs to get dressed. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print a single real number -- the optimum position x_0 . It can be shown that the optimal position x_0 is unique. Your answer will be considered correct if its absolute or relative error does not exceed 10^{ xe2 x88 x926} . Formally, let your answer be a , the jury's answer be b . Your answer will be considered correct if frac{|a xe2 x88 x92b|}{max(1,|b|)} <= 10^{ xe2 x88 x926} . "...

Tutorials

Codeforces Round #823 — editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
173529595 singhkrishnajsr143 B Sept. 26, 2022, 1:50 a.m. OK C# 10 TESTS 14 108 19148800 1600
173500420 Ezonok B Sept. 25, 2022, 5:35 p.m. OK C# 10 TESTS 14 170 18739200 1600
173536804 ranahamid B Sept. 26, 2022, 4:11 a.m. OK C# 10 TESTS 14 218 25395200 1600
173538387 Kanszhan B Sept. 26, 2022, 4:44 a.m. OK Clang++17 Diagnostics TESTS 14 373 1945600 1600
173527829 Theshuai B Sept. 26, 2022, 1:12 a.m. OK Clang++17 Diagnostics TESTS 14 1669 1024000 1600
173538956 Kanszhan B Sept. 26, 2022, 4:55 a.m. OK Clang++17 Diagnostics TESTS 14 1684 3891200 1600
173538446 Kanszhan B Sept. 26, 2022, 4:45 a.m. OK Clang++17 Diagnostics TESTS 14 1684 3891200 1600
173524724 vashweek B Sept. 25, 2022, 11:40 p.m. OK D TESTS 14 1248 16691200 1600
173512386 1300elo B Sept. 25, 2022, 7:35 p.m. OK FPC TESTS 14 389 1638400 1600
173503909 samchen123 B Sept. 25, 2022, 6:01 p.m. OK FPC TESTS 14 389 1638400 1600
173487542 VerakinT B Sept. 25, 2022, 4:21 p.m. OK GNU C11 TESTS 14 140 819200 1600
173489950 CG_CDI B Sept. 25, 2022, 4:28 p.m. OK GNU C++14 TESTS 14 62 40140800 1600
173541590 abs_xyz B Sept. 26, 2022, 5:42 a.m. OK GNU C++14 TESTS 14 77 409600 1600
173517916 AshrafMaged22 B Sept. 25, 2022, 8:53 p.m. OK GNU C++14 TESTS 14 77 819200 1600
173498560 rons_07 B Sept. 25, 2022, 5:22 p.m. OK GNU C++14 TESTS 14 77 819200 1600
173535888 FascTide B Sept. 26, 2022, 3:53 a.m. OK GNU C++14 TESTS 14 77 1638400 1600
173528299 linyihdfj B Sept. 26, 2022, 1:21 a.m. OK GNU C++14 TESTS 14 77 1638400 1600
173488507 WhiskeyLake B Sept. 25, 2022, 4:24 p.m. OK GNU C++14 TESTS 14 77 1638400 1600
173513980 Sarveshprofessional2004a B Sept. 25, 2022, 7:56 p.m. OK GNU C++14 TESTS 14 77 2355200 1600
173506055 invincible_sachin_9 B Sept. 25, 2022, 6:21 p.m. OK GNU C++14 TESTS 14 77 2969600 1600
173507272 _vaibhavr_ B Sept. 25, 2022, 6:34 p.m. OK GNU C++14 TESTS 14 77 4812800 1600
173513815 Tazzadar B Sept. 25, 2022, 7:54 p.m. OK GNU C++17 TESTS 14 62 5632000 1600
173502389 dreami63 B Sept. 25, 2022, 5:49 p.m. OK GNU C++17 TESTS 14 77 819200 1600
173542484 world__tour B Sept. 26, 2022, 5:56 a.m. OK GNU C++17 TESTS 14 77 819200 1600
173539195 utkarsh2238 B Sept. 26, 2022, 5 a.m. OK GNU C++17 TESTS 14 77 819200 1600
173538687 Yagnik007 B Sept. 26, 2022, 4:49 a.m. OK GNU C++17 TESTS 14 77 819200 1600
173522740 MoAdel_ B Sept. 25, 2022, 10:38 p.m. OK GNU C++17 TESTS 14 77 819200 1600
173511563 michal_w B Sept. 25, 2022, 7:24 p.m. OK GNU C++17 TESTS 14 77 819200 1600
173497077 AnnKinoko B Sept. 25, 2022, 5:13 p.m. OK GNU C++17 TESTS 14 77 819200 1600
173502054 ASM_ATIKUR B Sept. 25, 2022, 5:47 p.m. OK GNU C++17 TESTS 14 77 1638400 1600
173508119 akshatsgh B Sept. 25, 2022, 6:43 p.m. OK GNU C++17 TESTS 14 77 1843200 1600
173515499 risel B Sept. 25, 2022, 8:18 p.m. OK GNU C++17 (64) TESTS 14 30 819200 1600
173527124 xiece666 B Sept. 26, 2022, 12:54 a.m. OK GNU C++17 (64) TESTS 14 31 2662400 1600
173525651 liuxiangbin B Sept. 26, 2022, 12:09 a.m. OK GNU C++17 (64) TESTS 14 46 819200 1600
173523395 akwa_blue B Sept. 25, 2022, 10:58 p.m. OK GNU C++17 (64) TESTS 14 46 1228800 1600
173537322 sohith03 B Sept. 26, 2022, 4:22 a.m. OK GNU C++17 (64) TESTS 14 46 1638400 1600
173516234 cuzynot B Sept. 25, 2022, 8:28 p.m. OK GNU C++17 (64) TESTS 14 46 2969600 1600
173536551 lunchbox B Sept. 26, 2022, 4:06 a.m. OK GNU C++17 (64) TESTS 14 61 409600 1600
173526358 JJcjn B Sept. 26, 2022, 12:31 a.m. OK GNU C++17 (64) TESTS 14 61 819200 1600
173530952 cheng1202 B Sept. 26, 2022, 2:18 a.m. OK GNU C++17 (64) TESTS 14 61 819200 1600
173501100 yaoveil B Sept. 25, 2022, 5:39 p.m. OK GNU C++17 (64) TESTS 14 61 819200 1600
173497938 maspy B Sept. 25, 2022, 5:18 p.m. OK GNU C++20 (64) TESTS 14 15 5836800 1600
173540203 YLWang B Sept. 26, 2022, 5:17 a.m. OK GNU C++20 (64) TESTS 14 30 921600 1600
173499508 NotSponsored B Sept. 25, 2022, 5:28 p.m. OK GNU C++20 (64) TESTS 14 31 409600 1600
173499146 EssaRamzy B Sept. 25, 2022, 5:26 p.m. OK GNU C++20 (64) TESTS 14 31 409600 1600
173522039 moathhamudah B Sept. 25, 2022, 10:19 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1600
173539453 Mercuryyy B Sept. 26, 2022, 5:05 a.m. OK GNU C++20 (64) TESTS 14 31 819200 1600
173532942 luo123456 B Sept. 26, 2022, 2:59 a.m. OK GNU C++20 (64) TESTS 14 31 819200 1600
173529422 PranavAdlinge B Sept. 26, 2022, 1:46 a.m. OK GNU C++20 (64) TESTS 14 31 819200 1600
173523172 05st B Sept. 25, 2022, 10:51 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1600
173518073 KirillK1 B Sept. 25, 2022, 8:56 p.m. OK GNU C++20 (64) TESTS 14 31 819200 1600
173497648 koqo B Sept. 25, 2022, 5:17 p.m. OK Go TESTS 14 155 4403200 1600
173503336 ekwek B Sept. 25, 2022, 5:57 p.m. OK Java 11 TESTS 14 187 0 1600
173517155 yudi23 B Sept. 25, 2022, 8:42 p.m. OK Java 11 TESTS 14 218 0 1600
173532335 oneafter B Sept. 26, 2022, 2:48 a.m. OK Java 11 TESTS 14 233 0 1600
173516611 Keshavkeshu B Sept. 25, 2022, 8:33 p.m. OK Java 11 TESTS 14 233 0 1600
173487164 Longgggggggg B Sept. 25, 2022, 4:20 p.m. OK Java 11 TESTS 14 233 0 1600
173517781 yadavdipesh B Sept. 25, 2022, 8:51 p.m. OK Java 11 TESTS 14 233 409600 1600
173513804 mareshkau B Sept. 25, 2022, 7:54 p.m. OK Java 11 TESTS 14 234 1433600 1600
173513868 mareshkau B Sept. 25, 2022, 7:54 p.m. OK Java 11 TESTS 14 248 1433600 1600
173539732 x21svage B Sept. 26, 2022, 5:09 a.m. OK Java 11 TESTS 14 249 0 1600
173507573 IanISam B Sept. 25, 2022, 6:37 p.m. OK Java 11 TESTS 14 249 0 1600
173498415 Ali04 B Sept. 25, 2022, 5:21 p.m. OK Java 17 TESTS 14 280 921600 1600
173487446 MrOtter B Sept. 25, 2022, 4:21 p.m. OK Java 17 TESTS 14 295 307200 1600
173517129 aggressor_ B Sept. 25, 2022, 8:41 p.m. OK Java 17 TESTS 14 374 204800 1600
173512624 b1rr0 B Sept. 25, 2022, 7:38 p.m. OK Java 17 TESTS 14 374 921600 1600
173528060 chaojikkz B Sept. 26, 2022, 1:17 a.m. OK Java 17 TESTS 14 389 1126400 1600
173524138 freehandle B Sept. 25, 2022, 11:22 p.m. OK Java 17 TESTS 14 467 6041600 1600
173528592 _wjy B Sept. 26, 2022, 1:28 a.m. OK Java 17 TESTS 14 639 614400 1600
173489666 GustavoV B Sept. 25, 2022, 4:27 p.m. OK Java 17 TESTS 14 732 1638400 1600
173495399 selenophile B Sept. 25, 2022, 5:05 p.m. OK Java 17 TESTS 14 795 512000 1600
173541953 yashpandey73 B Sept. 26, 2022, 5:48 a.m. OK Java 8 TESTS 14 124 0 1600
173540248 headshot1703 B Sept. 26, 2022, 5:17 a.m. OK Java 8 TESTS 14 139 0 1600
173499157 Kaldaruly B Sept. 25, 2022, 5:26 p.m. OK Java 8 TESTS 14 155 0 1600
173520574 AbdelrahmanFathy B Sept. 25, 2022, 9:42 p.m. OK Java 8 TESTS 14 170 0 1600
173513072 Parimal B Sept. 25, 2022, 7:44 p.m. OK Java 8 TESTS 14 171 0 1600
173506346 leonlian B Sept. 25, 2022, 6:24 p.m. OK Java 8 TESTS 14 171 0 1600
173512644 Parimal B Sept. 25, 2022, 7:38 p.m. OK Java 8 TESTS 14 186 0 1600
173501022 Sussykin B Sept. 25, 2022, 5:39 p.m. OK Java 8 TESTS 14 218 0 1600
173508029 ankit_0207 B Sept. 25, 2022, 6:42 p.m. OK Java 8 TESTS 14 234 0 1600
173487701 vaibhav_1710 B Sept. 25, 2022, 4:22 p.m. OK Java 8 TESTS 14 264 0 1600
173486244 kadalijo B Sept. 25, 2022, 4:18 p.m. OK Kotlin 1.6 TESTS 14 576 15462400 1600
173511895 ata_y243 B Sept. 25, 2022, 7:28 p.m. OK MS C++ 2017 TESTS 14 280 1638400 1600
173531243 kidneywastaken B Sept. 26, 2022, 2:25 a.m. OK MS C++ 2017 TESTS 14 327 3174400 1600
173486073 misaka12435 B Sept. 25, 2022, 4:17 p.m. OK MS C++ 2017 TESTS 14 327 7270400 1600
173501573 Eldies B Sept. 25, 2022, 5:43 p.m. OK MS C++ 2017 TESTS 14 327 7987200 1600
173497686 Eldies B Sept. 25, 2022, 5:17 p.m. OK MS C++ 2017 TESTS 14 327 7987200 1600
173505265 andreyDagger B Sept. 25, 2022, 6:14 p.m. OK MS C++ 2017 TESTS 14 420 1638400 1600
173499824 gaspar.kristijan B Sept. 25, 2022, 5:30 p.m. OK MS C++ 2017 TESTS 14 468 3686400 1600
173525301 dagmat B Sept. 25, 2022, 11:59 p.m. OK PyPy 3 TESTS 14 139 21811200 1600
173502828 dolphin2025 B Sept. 25, 2022, 5:53 p.m. OK PyPy 3 TESTS 14 280 13312000 1600
173503775 WHg00 B Sept. 25, 2022, 6 p.m. OK PyPy 3 TESTS 14 296 14643200 1600
173487513 vlk0 B Sept. 25, 2022, 4:21 p.m. OK PyPy 3 TESTS 14 311 14540800 1600
173542165 Jvaeyhcd B Sept. 26, 2022, 5:51 a.m. OK PyPy 3 TESTS 14 342 13926400 1600
173506588 Voitek2001 B Sept. 25, 2022, 6:26 p.m. OK PyPy 3 TESTS 14 342 16793600 1600
173485590 rajbunsha B Sept. 25, 2022, 4:16 p.m. OK PyPy 3 TESTS 14 343 13721600 1600
173515955 _Saacosta B Sept. 25, 2022, 8:24 p.m. OK PyPy 3 TESTS 14 343 20480000 1600
173488139 jplassmann B Sept. 25, 2022, 4:23 p.m. OK PyPy 3 TESTS 14 374 14848000 1600
173503474 hsng299 B Sept. 25, 2022, 5:58 p.m. OK PyPy 3 TESTS 14 436 13209600 1600
173503357 lucasma8795 B Sept. 25, 2022, 5:57 p.m. OK PyPy 3-64 TESTS 14 109 23756800 1600
173528374 Turtleeee B Sept. 26, 2022, 1:23 a.m. OK PyPy 3-64 TESTS 14 124 21504000 1600
173522920 yesofa B Sept. 25, 2022, 10:43 p.m. OK PyPy 3-64 TESTS 14 124 22118400 1600
173498487 gesuta B Sept. 25, 2022, 5:22 p.m. OK PyPy 3-64 TESTS 14 124 23142400 1600
173499926 deepaklaksman B Sept. 25, 2022, 5:31 p.m. OK PyPy 3-64 TESTS 14 124 24371200 1600
173513763 SophieHatter B Sept. 25, 2022, 7:53 p.m. OK PyPy 3-64 TESTS 14 124 30822400 1600
173530221 InariInDream B Sept. 26, 2022, 2:03 a.m. OK PyPy 3-64 TESTS 14 139 31027200 1600
173530471 Remineva B Sept. 26, 2022, 2:07 a.m. OK PyPy 3-64 TESTS 14 140 21708800 1600
173499100 Varad2002 B Sept. 25, 2022, 5:25 p.m. OK PyPy 3-64 TESTS 14 140 22220800 1600
173500984 krishna369 B Sept. 25, 2022, 5:39 p.m. OK PyPy 3-64 TESTS 14 155 18841600 1600
173539570 sheknows B Sept. 26, 2022, 5:07 a.m. OK Python 3 TESTS 14 171 16179200 1600
173499858 VioletVal B Sept. 25, 2022, 5:31 p.m. OK Python 3 TESTS 14 171 16179200 1600
173502149 zhangkang B Sept. 25, 2022, 5:48 p.m. OK Python 3 TESTS 14 202 15974400 1600
173506503 romech B Sept. 25, 2022, 6:26 p.m. OK Python 3 TESTS 14 217 9728000 1600
173508661 sixthcore B Sept. 25, 2022, 6:48 p.m. OK Python 3 TESTS 14 218 9830400 1600
173497075 VibhorS B Sept. 25, 2022, 5:13 p.m. OK Python 3 TESTS 14 234 15974400 1600
173509461 Karcher B Sept. 25, 2022, 6:58 p.m. OK Python 3 TESTS 14 248 15872000 1600
173504091 eugalt B Sept. 25, 2022, 6:03 p.m. OK Python 3 TESTS 14 249 22528000 1600
173537212 gnltjr123 B Sept. 26, 2022, 4:19 a.m. OK Python 3 TESTS 14 265 10752000 1600
173536637 Ragn8rok B Sept. 26, 2022, 4:08 a.m. OK Python 3 TESTS 14 280 21504000 1600
173515008 Hyrulia B Sept. 25, 2022, 8:10 p.m. OK Rust 2021 TESTS 14 30 7372800 1600
173491456 jcowgill B Sept. 25, 2022, 4:32 p.m. OK Rust 2021 TESTS 14 31 3379200 1600

remove filters

Back to search problems