Codeforces Round 647 (Div. 1) - Thanks, Algo Muse!

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
1361 Codeforces Round 647 (Div. 1) - Thanks, Algo Muse! FINISHED False 9000 146071511 June 4, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 323 ) D Johnny and James PROGRAMMING greedy implementation math trees 2900

B"James Bond, Johnny's favorite secret agent, has a new mission. There are n enemy bases, each of them is described by its coordinates so that we can think about them as points in the Cartesian plane. The bases can communicate with each other, sending a signal, which is the ray directed from the chosen point to the origin or in the opposite direction. The exception is the central base, which lies at the origin and can send a signal in any direction. When some two bases want to communicate, there are two possible scenarios. If they lie on the same line with the origin, one of them can send a signal directly to the other one. Otherwise, the signal is sent from the first base to the central, and then the central sends it to the second base. We denote the distance between two bases as the total Euclidean distance that a signal sent between them has to travel. Bond can damage all but some k bases, which he can choose arbitrarily. A damaged base can't send or receive the direct signal but still can pass it between two working bases. In particular, James can damage the central base, and the signal can still be sent between any two undamaged bases as before, so the distance between them remains the same. What is the maximal sum of the distances between all pairs of remaining bases that 007 can achieve by damaging exactly n - k of them? The first line contains two integers n and k (2 <= q k <= q n <= q 5 cdot 10^5) -- the total number of bases and number of bases that have to remain, respectively. Each of the next n lines contains two integers x and y (-10^9 <= q x, y <= q 10^9) , i -th line contains coordinates of the i -th base. You can assume that no two points coincide and that one of them is (0, 0) . You should output one number -- the maximal possible sum of distances between all pairs of some k from given bases. Your answer will be accepted if the absolute or relative error "...

Tutorials

Codeforces Round #647 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
83258801 superbigjuruo D June 10, 2020, 12:11 a.m. OK GNU C++11 TESTS 244 312 36864000 2900
83285288 LJC00118 D June 10, 2020, 9:14 a.m. OK GNU C++11 TESTS 244 327 22323200 2900
82612761 yasugongshang D June 5, 2020, 8:36 a.m. OK GNU C++11 TESTS 243 358 30617600 2900
83181439 _twilight D June 9, 2020, 3:13 a.m. OK GNU C++11 TESTS 244 389 19763200 2900
82770815 Shrimp_ D June 7, 2020, 10:35 a.m. OK GNU C++11 TESTS 244 389 22630400 2900
82627970 daifucong D June 5, 2020, 11:57 a.m. OK GNU C++11 TESTS 243 421 34201600 2900
82609659 frodakcin D June 5, 2020, 8 a.m. OK GNU C++11 TESTS 243 436 18329600 2900
82588263 cjy2003 D June 5, 2020, 2:35 a.m. OK GNU C++11 TESTS 243 436 76595200 2900
82691433 LuoshuiTianyi D June 6, 2020, 9:26 a.m. OK GNU C++11 TESTS 244 452 75980800 2900
82619570 xyz32768 D June 5, 2020, 10:03 a.m. OK GNU C++11 TESTS 243 467 18534400 2900
82555442 gs12117 D June 4, 2020, 4:47 p.m. OK GNU C++14 TESTS 243 436 27545600 2900
82575886 TadijaSebez D June 4, 2020, 8:08 p.m. OK GNU C++14 TESTS 243 514 48742400 2900
83278818 yhx-12243 D June 10, 2020, 7:43 a.m. OK GNU C++14 TESTS 244 545 40345600 2900
82539062 ainta D June 4, 2020, 4:02 p.m. OK GNU C++14 TESTS 243 545 93286400 2900
82555320 DBradac D June 4, 2020, 4:46 p.m. OK GNU C++14 TESTS 243 623 61337600 2900
82575782 sg60 D June 4, 2020, 8:06 p.m. OK GNU C++14 TESTS 243 639 44544000 2900
82647771 RobeZH D June 5, 2020, 4:26 p.m. OK GNU C++14 TESTS 243 670 38195200 2900
82667344 zhouzhendong D June 6, 2020, 1:09 a.m. OK GNU C++14 TESTS 243 701 16486400 2900
82631787 sjc_fan D June 5, 2020, 12:53 p.m. OK GNU C++14 TESTS 243 732 51404800 2900
82631083 MagicSpark D June 5, 2020, 12:43 p.m. OK GNU C++14 TESTS 243 732 51404800 2900
82671643 guyan D June 6, 2020, 3:42 a.m. OK GNU C++17 TESTS 243 451 26521600 2900
82595029 jiangly D June 5, 2020, 4:47 a.m. OK GNU C++17 TESTS 243 530 18329600 2900
82550445 tlwpdus D June 4, 2020, 4:32 p.m. OK GNU C++17 TESTS 243 530 37376000 2900
82572719 Amoo_Safar D June 4, 2020, 7:18 p.m. OK GNU C++17 TESTS 243 546 26214400 2900
83105813 CMXRYNP D June 8, 2020, 6:34 a.m. OK GNU C++17 TESTS 244 576 33996800 2900
82736944 mthehtester D June 6, 2020, 8:42 p.m. OK GNU C++17 TESTS 244 577 16588800 2900
82899016 AlexanderL D June 8, 2020, 2:19 a.m. OK GNU C++17 TESTS 244 608 14028800 2900
82532533 tourist D June 4, 2020, 3:46 p.m. OK GNU C++17 TESTS 243 608 16588800 2900
82539127 cookiedoth D June 4, 2020, 4:02 p.m. OK GNU C++17 TESTS 243 670 36044800 2900
83088225 nickluo D June 8, 2020, 6:15 a.m. OK GNU C++17 TESTS 244 670 39731200 2900
82748124 neal D June 7, 2020, 4:11 a.m. OK GNU C++17 (64) TESTS 244 296 12083200 2900
82748053 neal D June 7, 2020, 4:09 a.m. OK GNU C++17 (64) TESTS 244 296 12083200 2900
82747645 neal D June 7, 2020, 3:58 a.m. OK GNU C++17 (64) TESTS 244 296 12083200 2900
82748094 neal D June 7, 2020, 4:10 a.m. OK GNU C++17 (64) TESTS 244 311 12083200 2900
82728946 timf1089 D June 6, 2020, 6:02 p.m. OK GNU C++17 (64) TESTS 244 389 85094400 2900
82594067 jiangly D June 5, 2020, 4:30 a.m. OK GNU C++17 (64) TESTS 243 405 18022400 2900
82582077 irri D June 4, 2020, 11:06 p.m. OK GNU C++17 (64) TESTS 243 405 40140800 2900
82536652 maroonrk D June 4, 2020, 3:56 p.m. OK GNU C++17 (64) TESTS 243 436 38912000 2900
82560342 al13n D June 4, 2020, 5 p.m. OK GNU C++17 (64) TESTS 243 452 19968000 2900
82638734 zx2003 D June 5, 2020, 2:27 p.m. OK GNU C++17 (64) TESTS 243 483 69120000 2900
82585086 Lewin D June 5, 2020, 1:04 a.m. OK Java 11 TESTS 243 1138 114688000 2900
82585127 Lewin D June 5, 2020, 1:05 a.m. OK Java 11 TESTS 243 1169 135680000 2900
82701477 uwi D June 6, 2020, 11:57 a.m. OK Java 11 TESTS 244 1887 155238400 2900
82596727 ahmadhoumani D June 5, 2020, 5:15 a.m. OK Java 8 TESTS 243 1169 104960000 2900
82618066 cwise D June 5, 2020, 9:44 a.m. OK Java 8 TESTS 243 1887 176742400 2900
82676699 Spheniscine D June 6, 2020, 5:38 a.m. OK Kotlin TESTS 244 1372 128102400 2900
82677249 Spheniscine D June 6, 2020, 5:48 a.m. OK Kotlin TESTS 244 1403 124928000 2900
82672153 Spheniscine D June 6, 2020, 3:57 a.m. OK Kotlin TESTS 243 1669 189644800 2900
82673362 Spheniscine D June 6, 2020, 4:27 a.m. OK Kotlin TESTS 244 1762 192512000 2900
82671606 Spheniscine D June 6, 2020, 3:41 a.m. OK Kotlin TESTS 243 1840 191385600 2900
82776939 user202729_ D June 7, 2020, 12:10 p.m. OK Rust TESTS 244 389 40550400 2900

remove filters

Back to search problems