Codeforces Round 231 (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
394 Codeforces Round 231 (Div. 2) FINISHED False 7200 383495423 Feb. 20, 2014, 3:30 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 132 ) E Lightbulb for Minister PROGRAMMING geometry

The Minister for education is coming! Naturally, nobody wants to perform poorly in front of such a honored guest. However, two hours before the arrival it turned out that one of the classes has a malfunctioning lightbulb — for some reason it doesn't get enough energy. The solution was found quickly: all we've got to do is to change the location of the lightbulb so that it got the maximum amount of energy. Everybody knows that the power of the lightbulb equals , where C is some constant value and r i is the Euclidean distance from the bulb to the i -th generator. Consequently, our task is to minimize . Of course, we know the positions of all generators. The bulb should be on the ceiling of the class. The ceiling of the class is in the form of a strictly convex m -gon (the class itself has the form of a right prism with a strictly convex m -gon at the bottom). Help to find the optimum location for the bulb. Assume that all generators are in the plane of the class ceiling. Consider that the plane of the class ceiling has some Cartesian coordinate system introduced. The first line contains integer n (2 ≤ n ≤ 10 5 ) — the number of generators. Each of the next n lines contains a pair of integers x i , y i , representing the coordinates of the i -th generator in the plane of the class ceiling. It's guaranteed that no two generators have the same location. The next line contains integer m (3 ≤ m ≤ 10 5 ) — the number of vertexes in the convex polygon that describes the ceiling of the class. Each of the following m lines contains a pair of integers p i , q i , representing the coordinates of the i -th point of the polygon in the clockwise order. It's guaranteed that the polygon is strictly convex. The absolute value of all the coordinates don't exceed 10 6 . Print a single real number — the minimum value of the sum of squares of distances from the generators to the point of the lightbulb's optimal position. The answer will be considered valid if its absolute or re

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
7694959 ruban E Sept. 6, 2014, 3 p.m. OK Delphi TESTS 20 46 1740800
6379963 niyaznigmatul E April 16, 2014, 3:50 p.m. OK FPC TESTS 20 61 4915200
14027135 130705009 E Nov. 2, 2015, 12:57 p.m. OK GNU C++ TESTS 20 31 1433600
6542373 ashu1461 E May 4, 2014, 3:56 a.m. OK GNU C++ TESTS 20 31 2662400
5952854 SoroushE E March 6, 2014, 5:58 p.m. OK GNU C++ TESTS 20 31 2662400
6562236 zld3794955 E May 6, 2014, 12:37 p.m. OK GNU C++ TESTS 20 31 3276800
15142002 HappyNewYearMike E Dec. 31, 2015, 10:01 p.m. OK GNU C++ TESTS 20 46 1433600
6063606 KrK E March 18, 2014, 9:36 p.m. OK GNU C++ TESTS 20 46 1536000
5930186 dhh1995 E March 5, 2014, 9:53 a.m. OK GNU C++ TESTS 20 46 1536000
35863947 ______u______ E March 2, 2018, 10:58 p.m. OK GNU C++ TESTS 20 46 3481600
35863782 ______n______ E March 2, 2018, 10:53 p.m. OK GNU C++ TESTS 20 46 3481600
35863361 _____i_____ E March 2, 2018, 10:44 p.m. OK GNU C++ TESTS 20 46 3481600
6321382 Kharybin E April 11, 2014, 9:38 a.m. OK GNU C++0x TESTS 20 46 2457600
6913076 Zuza E June 19, 2014, 2:55 p.m. OK GNU C++0x TESTS 20 530 3686400
5931254 Xellos E March 5, 2014, 11:57 a.m. OK GNU C++0x TESTS 20 904 1638400
11969960 jiu-ye1 E July 8, 2015, 9:34 a.m. OK GNU C++11 TESTS 20 15 3174400
11931107 a654889339 E July 5, 2015, 5:27 a.m. OK GNU C++11 TESTS 20 15 3276800
40989010 ReaLNero1 E July 30, 2018, 10:32 p.m. OK GNU C++11 TESTS 20 31 3276800
11931113 a654889339 E July 5, 2015, 5:28 a.m. OK GNU C++11 TESTS 20 31 3276800
70527694 big_tq E Feb. 7, 2020, 8:26 p.m. OK GNU C++11 TESTS 20 46 1433600
67274575 ElangBondol E Dec. 20, 2019, 9:41 a.m. OK GNU C++11 TESTS 20 46 1433600
57891774 lopare E July 28, 2019, 12:06 p.m. OK GNU C++11 TESTS 20 46 1433600
57819963 py_ultron E July 26, 2019, 10:18 p.m. OK GNU C++11 TESTS 20 46 1433600
16698800 numbertheorist17 E March 13, 2016, 3:43 p.m. OK GNU C++11 TESTS 20 46 1638400
17139026 freebsdx E April 3, 2016, 3:24 a.m. OK GNU C++11 TESTS 20 46 3584000
67958484 mota_haathi E Dec. 30, 2019, 10:37 a.m. OK GNU C++14 TESTS 20 61 1536000
23543311 Ali.Pi E Jan. 4, 2017, 8:13 p.m. OK GNU C++14 TESTS 20 61 3481600
37432392 orbitingflea E April 18, 2018, 10:42 a.m. OK GNU C++14 TESTS 20 62 4096000
37432432 orbitingflea E April 18, 2018, 10:43 a.m. OK GNU C++14 TESTS 20 62 4403200
60453339 abeker E Sept. 12, 2019, 4:51 p.m. OK GNU C++14 TESTS 20 62 4812800
55699189 ytxytx E June 18, 2019, 2:28 a.m. OK GNU C++14 TESTS 20 62 4812800
55699164 ytxytx E June 18, 2019, 2:26 a.m. OK GNU C++14 TESTS 20 62 4812800
53213565 137774288 E April 24, 2019, 7:14 a.m. OK GNU C++14 TESTS 20 77 3174400
37683709 kut_kjb1994 E April 28, 2018, 11:25 a.m. OK GNU C++14 TESTS 20 171 8704000
37683610 kut_kjb1994 E April 28, 2018, 11:21 a.m. OK GNU C++14 TESTS 20 171 8704000
57124257 ruo E July 16, 2019, 3:16 a.m. OK GNU C++17 TESTS 20 46 2457600
60159047 kempusss E Sept. 6, 2019, 8:12 a.m. OK GNU C++17 TESTS 20 62 204800
60158700 kempusss E Sept. 6, 2019, 8:02 a.m. OK GNU C++17 TESTS 20 62 204800
67689795 tap_tapii E Dec. 27, 2019, 10:34 a.m. OK GNU C++17 TESTS 20 655 6758400
55392444 chongryong E June 10, 2019, 10:21 a.m. OK GNU C++17 TESTS 20 670 9113600
55006180 hbi1998 E June 3, 2019, 7:39 a.m. OK GNU C++17 TESTS 20 670 9113600
58337266 Sali_adelkhah E Aug. 5, 2019, 11:56 a.m. OK GNU C++17 TESTS 20 702 307200
58231578 kobortor E Aug. 3, 2019, 5:05 p.m. OK GNU C++17 TESTS 20 717 307200
44970691 tri E Oct. 27, 2018, 11:38 p.m. OK Java 8 TESTS 20 140 0
25796739 pitfall E March 25, 2017, 11:50 a.m. OK Java 8 TESTS 20 171 20582400
56434909 mennafadali E July 2, 2019, 1:41 p.m. OK Java 8 TESTS 20 186 0
21760463 Ahmad_Elsagheer E Oct. 24, 2016, 10:36 p.m. OK Java 8 TESTS 20 202 0
16708980 vjudge1 E March 14, 2016, 7:03 a.m. OK MS C++ TESTS 20 139 1740800
16708204 vjudge5 E March 14, 2016, 5:33 a.m. OK MS C++ TESTS 20 187 3174400

remove filters

Back to search problems