Codeforces Round 313 (Div. 1)

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
559 Codeforces Round 313 (Div. 1) FINISHED False 7200 294249599 July 22, 2015, 2 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 441 ) D Randomizer PROGRAMMING combinatorics geometry probabilities 2800

B"Gerald got tired of playing board games with the usual six-sided die, and he bought a toy called Randomizer. It functions as follows. A Randomizer has its own coordinate plane on which a strictly convex polygon is painted, the polygon is called a basic polygon. If you shake a Randomizer, it draws some nondegenerate (i.e. having a non-zero area) convex polygon with vertices at some vertices of the basic polygon. The result of the roll (more precisely, the result of the shaking) is considered to be the number of points with integer coordinates, which were strictly inside (the points on the border are not considered) the selected polygon. Now Gerald is wondering: what is the expected result of shaking the Randomizer? During the shaking the Randomizer considers all the possible non-degenerate convex polygons with vertices at the vertices of the basic polygon. Let's assume that there are k versions of the polygons. Then the Randomizer chooses each of them with probability . The first line of the input contains a single integer n (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of vertices of the basic polygon. Next n lines contain the coordinates of the vertices of the basic polygon. The i-th of these lines contain two integers xi and yi ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi, xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the coordinates of the i-th vertex of the polygon. The vertices are given in the counter-clockwise order. Print the sought expected value with absolute or relative error at most 10 xe2 x80 x89- xe2 x80 x899. A polygon is called strictly convex if it is convex and no its vertices lie on the same line. Let's assume that a random variable takes values x1, xe2 x80 x89..., xe2 x80 x89xn with probabilities p1, xe2 x80 x89..., xe2 x80 x89pn, correspondingly. Then the expected value of this variable equals to ."...

Tutorials

Codeforces Round 313 — Extended editoral

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
35888315 ______n______ D March 3, 2018, 2:19 p.m. OK D TESTS 70 624 14745600 2800
35888215 ______u______ D March 3, 2018, 2:18 p.m. OK D TESTS 70 624 14745600 2800
35887915 _____k_____ D March 3, 2018, 2:13 p.m. OK D TESTS 70 624 14745600 2800
35886722 _____i_____ D March 3, 2018, 1:51 p.m. OK D TESTS 70 624 14745600 2800
35882911 ______h______ D March 3, 2018, 12:45 p.m. OK D TESTS 70 624 14745600 2800
35882730 ______k______ D March 3, 2018, 12:44 p.m. OK D TESTS 70 624 14745600 2800
35875101 ______i______ D March 3, 2018, 8:08 a.m. OK D TESTS 70 624 14745600 2800
35873537 ______M______ D March 3, 2018, 7:34 a.m. OK D TESTS 70 624 14745600 2800
12240468 Gassa D July 27, 2015, 12:11 p.m. OK D TESTS 70 655 6758400 2800
12240414 Gassa D July 27, 2015, 12:04 p.m. OK D TESTS 70 655 6758400 2800
12209648 GentleSmile D July 24, 2015, 6:27 a.m. OK GNU C++ TESTS 70 373 614400 2800
12685041 Ioser D Aug. 24, 2015, 1:55 p.m. OK GNU C++ TESTS 70 499 1638400 2800
12242120 Vlad_kv D July 27, 2015, 2:56 p.m. OK GNU C++ TESTS 70 499 5222400 2800
12209367 chffy D July 24, 2015, 6:06 a.m. OK GNU C++ TESTS 70 514 1638400 2800
12207565 ConfidenceGainer D July 24, 2015, 2:32 a.m. OK GNU C++ TESTS 70 546 4505600 2800
12431173 bubble000000 D Aug. 10, 2015, 2:17 a.m. OK GNU C++ TESTS 70 561 1638400 2800
12228610 syc1999 D July 26, 2015, 5:04 a.m. OK GNU C++ TESTS 70 561 2048000 2800
27961826 Dream-Reality D June 22, 2017, 9:41 a.m. OK GNU C++ TESTS 70 561 3481600 2800
12207594 ConfidenceGainer D July 24, 2015, 2:36 a.m. OK GNU C++ TESTS 70 561 4505600 2800
13887311 130705009 D Oct. 27, 2015, 8:44 a.m. OK GNU C++ TESTS 70 592 1433600 2800
12197728 waterfalls D July 23, 2015, 9:20 a.m. OK GNU C++11 TESTS 70 358 614400 2800
12197629 waterfalls D July 23, 2015, 9:14 a.m. OK GNU C++11 TESTS 70 358 1843200 2800
12197887 waterfalls D July 23, 2015, 9:31 a.m. OK GNU C++11 TESTS 70 374 614400 2800
12197811 waterfalls D July 23, 2015, 9:26 a.m. OK GNU C++11 TESTS 70 374 614400 2800
12197588 waterfalls D July 23, 2015, 9:10 a.m. OK GNU C++11 TESTS 70 374 1843200 2800
40986360 ReaLNero1 D July 30, 2018, 8:30 p.m. OK GNU C++11 TESTS 70 389 614400 2800
12197568 waterfalls D July 23, 2015, 9:09 a.m. OK GNU C++11 TESTS 70 390 1843200 2800
12185405 -XraY- D July 22, 2015, 4:54 p.m. OK GNU C++11 TESTS 70 405 3584000 2800
12197553 waterfalls D July 23, 2015, 9:08 a.m. OK GNU C++11 TESTS 70 436 1843200 2800
12197484 waterfalls D July 23, 2015, 9:03 a.m. OK GNU C++11 TESTS 70 483 1843200 2800
27754154 Yousef_Salama D June 13, 2017, 11:24 a.m. OK GNU C++14 TESTS 70 577 1638400 2800
32979582 Flash-boy D Dec. 6, 2017, 3:03 p.m. OK GNU C++14 TESTS 70 592 2662400 2800
42307228 MicGor D Aug. 31, 2018, 12:05 p.m. OK GNU C++14 TESTS 70 639 3174400 2800
36290905 ditoly D March 15, 2018, 5:37 a.m. OK GNU C++14 TESTS 70 639 3584000 2800
32133043 FallDream D Nov. 8, 2017, 2:07 a.m. OK GNU C++14 TESTS 70 686 819200 2800
22822911 Svyat D Dec. 8, 2016, 11:09 p.m. OK GNU C++14 TESTS 70 702 1638400 2800
59639463 JhonnyZaz D Aug. 29, 2019, midnight OK GNU C++14 TESTS 70 748 3174400 2800
68397789 yan-zp D Jan. 8, 2020, 11:51 a.m. OK GNU C++14 TESTS 70 780 819200 2800
66748566 autoint D Dec. 13, 2019, 4:32 a.m. OK GNU C++14 TESTS 70 841 3174400 2800
22822905 Svyat D Dec. 8, 2016, 11:08 p.m. OK GNU C++14 TESTS 70 904 1638400 2800
51596271 Anachor D March 20, 2019, 10:18 p.m. OK GNU C++17 TESTS 70 623 1638400 2800
51596073 Anachor D March 20, 2019, 10:05 p.m. OK GNU C++17 TESTS 70 624 1638400 2800
51596048 Anachor D March 20, 2019, 10:03 p.m. OK GNU C++17 TESTS 70 655 1638400 2800
42702420 des1997 D Sept. 9, 2018, 11:17 a.m. OK GNU C++17 TESTS 70 717 1843200 2800
65419213 RUSH_D_CAT D Nov. 20, 2019, 8:17 a.m. OK GNU C++17 TESTS 70 732 3174400 2800
66508518 Fyodor D Dec. 8, 2019, 3:26 p.m. OK GNU C++17 TESTS 70 733 2457600 2800
39146183 ShichengXiao D June 11, 2018, 12:24 p.m. OK GNU C++17 TESTS 70 733 3174400 2800
67651763 hjk1030 D Dec. 26, 2019, 12:23 p.m. OK GNU C++17 TESTS 70 748 819200 2800
41626318 kempusss D Aug. 15, 2018, 2:40 p.m. OK GNU C++17 TESTS 70 748 2048000 2800
56819203 sincerity D July 10, 2019, 9:42 p.m. OK GNU C++17 TESTS 70 763 3584000 2800
12783331 ironman7453 D Aug. 31, 2015, 2:36 a.m. OK Java 8 TESTS 70 655 0 2800
12179872 qwerty787788 D July 22, 2015, 3:35 p.m. OK Java 8 TESTS 70 670 0 2800
12186932 uwi D July 22, 2015, 5:38 p.m. OK Java 8 TESTS 70 1060 0 2800
12187022 uwi D July 22, 2015, 5:41 p.m. OK Java 8 TESTS 70 1075 0 2800
12186908 uwi D July 22, 2015, 5:37 p.m. OK Java 8 TESTS 70 1466 0 2800
12183270 Lewin D July 22, 2015, 4:18 p.m. OK Java 8 TESTS 70 1591 0 2800
43474127 ricurb D Sept. 27, 2018, 1:36 a.m. OK Java 8 TESTS 70 1637 0 2800
43473471 XKev D Sept. 27, 2018, 12:56 a.m. OK Java 8 TESTS 70 1652 0 2800
12176982 niyaznigmatul D July 22, 2015, 3:12 p.m. OK Java 8 TESTS 70 1731 0 2800
12239643 .tx D July 27, 2015, 10:48 a.m. OK Java 8 TESTS 70 1746 0 2800
14316751 RoundheadOFF D Nov. 17, 2015, 5:44 p.m. OK Scala TESTS 70 1184 102400 2800

remove filters

Back to search problems