Yandex.Algorithm 2011: Qualification 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
82 Yandex.Algorithm 2011: Qualification 2 FINISHED False 7200 471797985 May 6, 2011, 3 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 247 ) E Corridor PROGRAMMING geometry 2500

Consider a house plan. Let the house be represented by an infinite horizontal strip defined by the inequality - h ≤ y ≤ h. Strictly outside the house there are two light sources at the points (0, f) and (0, - f). Windows are located in the walls, the windows are represented by segments on the lines y = h and y = - h. Also, the windows are arranged symmetrically about the line y = 0. Your task is to find the area of the floor at the home, which will be lighted by the sources of light. The first line of the input file contains three integers n, h and f (1 ≤ n ≤ 500, 1 ≤ h ≤ 10, h < f ≤ 1000). Next, n lines contain two integers each li, ri ( - 5000 ≤ li < ri ≤ 5000), each entry indicates two segments. Endpoints of the first segment are (li, h)-(ri, h), and endpoints of the second segment are (li, - h)-(ri, - h). These segments describe location of windows. Numbers in the lines are space-separated. It is guaranteed that no two distinct segments have common points. Print the single real number -- the area of the illuminated part of the floor with an absolute or relative error of no more than 10 - 4. The second sample test is shown on the figure. Green area is the desired area of the illuminated part of the floor. Violet segments indicate windows.

Tutorials

1889

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
444101 maxim_polt E May 10, 2011, 12:38 a.m. OK Delphi TESTS 53 110 1024000 2500
440001 tourist E May 6, 2011, 4:47 p.m. OK Delphi TESTS 53 130 1024000 2500
2874504 luogan E Jan. 5, 2013, 12:36 a.m. OK FPC TESTS 53 78 0 2500
951377 zanoes E Dec. 11, 2011, 9:29 a.m. OK FPC TESTS 53 590 1126400 2500
545643 vlad107 E July 14, 2011, 9:27 p.m. OK FPC TESTS 53 1940 1126400 2500
1445607 sillycross E March 31, 2012, 7:12 a.m. OK FPC TESTS 53 2470 2252800 2500
14187132 130705009 E Nov. 10, 2015, 4:16 p.m. OK GNU C++ TESTS 53 15 0 2500
2794603 yxfish E Dec. 19, 2012, 12:39 p.m. OK GNU C++ TESTS 53 15 307200 2500
6002906 crx E March 12, 2014, 12:27 p.m. OK GNU C++ TESTS 53 30 0 2500
604782 ytau E Aug. 13, 2011, 8:10 a.m. OK GNU C++ TESTS 53 30 1433600 2500
444902 251083874 E May 11, 2011, 6:42 a.m. OK GNU C++ TESTS 53 30 1433600 2500
40992729 ReaLNero1 E July 31, 2018, 1:31 a.m. OK GNU C++ TESTS 53 31 0 2500
4161558 vjtest E July 25, 2013, 6:59 a.m. OK GNU C++ TESTS 53 31 0 2500
3467904 CHONPS E April 3, 2013, 8:58 a.m. OK GNU C++ TESTS 53 31 0 2500
2911189 kmxyvb E Jan. 13, 2013, 1:05 p.m. OK GNU C++ TESTS 53 31 0 2500
2880011 littlefriend E Jan. 7, 2013, 8:17 a.m. OK GNU C++ TESTS 53 31 0 2500
2827830 apia E Dec. 26, 2012, 6:03 a.m. OK GNU C++0x TESTS 53 31 0 2500
2827410 CMHJT E Dec. 26, 2012, 12:33 a.m. OK GNU C++0x TESTS 53 46 0 2500
2567053 llj_bash E Nov. 16, 2012, 12:47 p.m. OK GNU C++0x TESTS 53 78 0 2500
2831411 dc. E Dec. 27, 2012, 2 a.m. OK GNU C++0x TESTS 53 312 204800 2500
439698 2222 E May 6, 2011, 4:41 p.m. OK GNU C++0x TESTS 53 360 1433600 2500
440163 DDDDDDDDDDDDDDDDDDDDDDDD E May 6, 2011, 4:51 p.m. OK GNU C++0x TESTS 53 610 1536000 2500
7811553 vjudge5 E Sept. 16, 2014, 4:32 p.m. OK GNU C++0x TESTS 53 842 0 2500
16841709 freebsdx E March 20, 2016, 3:24 p.m. OK GNU C++11 TESTS 53 30 2048000 2500
37543921 hawkomg E April 23, 2018, 3:55 a.m. OK GNU C++11 TESTS 53 30 3379200 2500
57905383 lopare E July 28, 2019, 5:24 p.m. OK GNU C++11 TESTS 53 31 0 2500
45252805 KCSC E Nov. 3, 2018, 5:35 p.m. OK GNU C++11 TESTS 53 31 0 2500
17069265 freebsdx E March 31, 2016, 8:11 a.m. OK GNU C++11 TESTS 53 31 1843200 2500
35898489 ______u______ E March 3, 2018, 6:16 p.m. OK GNU C++11 TESTS 53 31 2048000 2500
35898070 _____k_____ E March 3, 2018, 6:14 p.m. OK GNU C++11 TESTS 53 31 2048000 2500
35897765 ______n______ E March 3, 2018, 6:05 p.m. OK GNU C++11 TESTS 53 31 2048000 2500
35897609 _____i_____ E March 3, 2018, 5:59 p.m. OK GNU C++11 TESTS 53 31 2048000 2500
35891974 ______h______ E March 3, 2018, 3:21 p.m. OK GNU C++11 TESTS 53 31 2048000 2500
56016914 sorry_im_smurfing E June 24, 2019, 10:06 p.m. OK GNU C++14 TESTS 53 31 0 2500
55060183 bhargav_0085 E June 3, 2019, 9:49 p.m. OK GNU C++14 TESTS 53 31 0 2500
24945419 KhaledKEE E Feb. 23, 2017, 6:38 p.m. OK GNU C++14 TESTS 53 109 2150400 2500
23563202 Ali.Pi E Jan. 5, 2017, 9:24 p.m. OK GNU C++14 TESTS 53 124 2150400 2500
38768101 kut_kjb1994 E May 30, 2018, 10:01 a.m. OK GNU C++14 TESTS 53 187 3379200 2500
39454051 ruo E June 21, 2018, 7:22 a.m. OK GNU C++17 TESTS 53 31 0 2500
43037886 xuanquang1999 E Sept. 18, 2018, 2:21 p.m. OK GNU C++17 TESTS 53 46 0 2500
43051489 MahmoudHamdyY E Sept. 18, 2018, 10:04 p.m. OK GNU C++17 TESTS 53 311 204800 2500
459731 ostrovski.alex E May 19, 2011, 8:10 p.m. OK Java 6 TESTS 53 190 35532800 2500
439970 ivan.metelsky E May 6, 2011, 4:46 p.m. OK Java 6 TESTS 53 230 43315200 2500
444072 TomConerly E May 9, 2011, 10:32 p.m. OK Java 6 TESTS 53 310 43315200 2500
439535 andrewzta E May 6, 2011, 4:37 p.m. OK Java 6 TESTS 53 410 43315200 2500
440912 fetetriste E May 6, 2011, 5:54 p.m. OK Java 6 TESTS 53 580 43622400 2500
440778 uwi E May 6, 2011, 5:49 p.m. OK Java 6 TESTS 53 660 43315200 2500
444071 TomConerly E May 9, 2011, 10:27 p.m. OK Java 6 TESTS 53 3470 43315200 2500
16185135 mkirsche E Feb. 18, 2016, 7:24 p.m. OK Java 7 TESTS 53 608 0 2500
2854056 niyaznigmatul E Dec. 29, 2012, 2:47 p.m. OK Java 7 TESTS 53 1046 102400 2500
23723542 Chapecoense E Jan. 11, 2017, 6 p.m. OK Java 8 TESTS 53 1075 21299200 2500
455542 TheNewOne E May 14, 2011, 8:46 p.m. OK MS C++ TESTS 53 170 1433600 2500
441434 Anton_Lunyov E May 6, 2011, 7:21 p.m. OK MS C++ TESTS 53 200 1433600 2500
440941 al13n E May 6, 2011, 5:55 p.m. OK MS C++ TESTS 53 230 1433600 2500
7811552 vjudge3 E Sept. 16, 2014, 4:32 p.m. OK MS C++ TESTS 53 622 0 2500
440474 vadimkantorov E May 6, 2011, 4:57 p.m. OK MS C++ TESTS 53 630 4710400 2500
438297 MikhailRubinchik.ru E May 6, 2011, 4:09 p.m. OK MS C++ TESTS 53 640 4710400 2500
446310 Connector E May 13, 2011, 1:15 p.m. OK MS C++ TESTS 53 950 1433600 2500

remove filters

Back to search problems