Codeforces Round 138 (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
223 Codeforces Round 138 (Div. 1) FINISHED False 7200 390061786 Sept. 16, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 71 ) D Spider PROGRAMMING geometry graphs 3000

B"A plane contains a not necessarily convex polygon without self-intersections, consisting of n vertexes, numbered from 1 to n. There is a spider sitting on the border of the polygon, the spider can move like that: Initially the spider is located at the polygon vertex with number s. Find the length of the shortest path to the vertex number t, consisting of transfers and descends. The distance is determined by the usual Euclidean metric . The first line contains integer n (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of vertexes of the given polygon. Next n lines contain two space-separated integers each -- the coordinates of the polygon vertexes. The vertexes are listed in the counter-clockwise order. The coordinates of the polygon vertexes do not exceed 104 in their absolute value. The last line contains two space-separated integers s and t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89s, xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the start and the end vertexes of the sought shortest way. Consider the polygon vertexes numbered in the order they are given in the input, that is, the coordinates of the first vertex are located on the second line of the input and the coordinates of the n-th vertex are on the (n xe2 x80 x89+ xe2 x80 x891)-th line. It is guaranteed that the given polygon is simple, that is, it contains no self-intersections or self-tangencies. In the output print a single real number -- the length of the shortest way from vertex s to vertex t. The answer is considered correct, if its absolute or relative error does not exceed 10 xe2 x80 x89- xe2 x80 x896. In the first sample the spider transfers along the side that connects vertexes 1 and 4. In the second sample the spider doesn't have to transfer anywhere, so the distance equals zero. In the third sample the best strategy for the spider is to transfer from vertex 3 to point (2,3), descend to point (2,1), and then transfer to vertex 1."...

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
18703786 hehe0625 D June 24, 2016, 3:43 p.m. OK GNU C++ TESTS 46 217 25395200 3000
40990758 ReaLNero1 D July 31, 2018, 12:11 a.m. OK GNU C++ TESTS 46 234 56012800 3000
38688291 Scut82 D May 28, 2018, 8:23 a.m. OK GNU C++ TESTS 46 234 56115200 3000
10027932 Codeblooded D Feb. 26, 2015, 4:49 a.m. OK GNU C++ TESTS 46 312 110387200 3000
35848507 ______n______ D March 2, 2018, 5:01 p.m. OK GNU C++ TESTS 46 312 112332800 3000
35848344 ______u______ D March 2, 2018, 4:56 p.m. OK GNU C++ TESTS 46 312 112332800 3000
35848240 _____i_____ D March 2, 2018, 4:56 p.m. OK GNU C++ TESTS 46 312 112332800 3000
35847893 _____k_____ D March 2, 2018, 4:51 p.m. OK GNU C++ TESTS 46 312 112332800 3000
35841343 ______h______ D March 2, 2018, 2:32 p.m. OK GNU C++ TESTS 46 312 112332800 3000
35841261 ______k______ D March 2, 2018, 2:32 p.m. OK GNU C++ TESTS 46 312 112332800 3000
6518486 Zuza D May 1, 2014, 6:47 p.m. OK GNU C++0x TESTS 46 998 41369600 3000
6518444 Zuza D May 1, 2014, 6:38 p.m. OK GNU C++0x TESTS 46 1308 41369600 3000
6518479 Zuza D May 1, 2014, 6:46 p.m. OK GNU C++0x TESTS 46 1310 41369600 3000
63189265 vjudge4 D Oct. 22, 2019, 4:55 p.m. OK GNU C++11 TESTS 46 296 110387200 3000
23667576 Ali.Pi D Jan. 9, 2017, 5:05 p.m. OK GNU C++14 TESTS 46 265 27955200 3000
56037824 Scut82 D June 25, 2019, 12:54 p.m. OK GNU C++14 TESTS 46 312 23347200 3000
67271786 ElangBondol D Dec. 20, 2019, 8:36 a.m. OK GNU C++14 TESTS 46 327 110489600 3000
37338339 Belonogov D April 14, 2018, 7:44 p.m. OK GNU C++14 TESTS 46 405 57446400 3000
37629608 kut_kjb1994 D April 26, 2018, 9:09 a.m. OK GNU C++14 TESTS 46 2246 101888000 3000
2199202 Petr D Sept. 16, 2012, 6:22 p.m. OK Java 6 TESTS 46 1880 144281600 3000
16299646 JShinjuro D Feb. 23, 2016, 8:33 p.m. OK Java 8 TESTS 46 1184 84684800 3000
15142661 HappyNewYearMike D Dec. 31, 2015, 10:38 p.m. OK MS C++ TESTS 46 420 41369600 3000
14428179 Los_Angelos_Laycurse D Nov. 23, 2015, 2:35 p.m. OK MS C++ TESTS 46 451 41369600 3000
2791545 lasten D Dec. 18, 2012, 4:02 p.m. OK MS C++ TESTS 46 1796 212172800 3000

remove filters

Back to search problems