Codeforces Round 509 (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
1041 Codeforces Round 509 (Div. 2) FINISHED False 7200 194729099 Sept. 16, 2018, 10:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1504 ) F Ray in the tube PROGRAMMING data structures divide and conquer dp math 2400

B"You are given a tube which is reflective inside represented as two non-coinciding, but parallel to Ox lines. Each line has some special integer points -- positions of sensors on sides of the tube. You are going to emit a laser ray in the tube. To do so, you have to choose two integer points A and B on the first and the second line respectively (coordinates can be negative): the point A is responsible for the position of the laser, and the point B -- for the direction of the laser ray. The laser ray is a ray starting at A and directed at B which will reflect from the sides of the tube (it doesn't matter if there are any sensors at a reflection point or not). A sensor will only register the ray if the ray hits exactly at the position of the sensor. Calculate the maximum number of sensors which can register your ray if you choose points A and B on the first and the second lines respectively. The first line contains two integers n and y_1 ( 1 <= n <= 10^5 , 0 <= y_1 <= 10^9 ) -- number of sensors on the first line and its y coordinate. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^9 ) -- x coordinates of the sensors on the first line in the ascending order. The third line contains two integers m and y_2 ( 1 <= m <= 10^5 , y_1 < y_2 <= 10^9 ) -- number of sensors on the second line and its y coordinate. The fourth line contains m integers b_1, b_2, ldots, b_m ( 0 <= b_i <= 10^9 ) -- x coordinates of the sensors on the second line in the ascending order. Print the only integer -- the maximum number of sensors which can register the ray. One of the solutions illustrated on the image by pair A_2 and B_2 . "...

Tutorials

Codeforces Round #509 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42968919 emoairx F Sept. 17, 2018, 4:18 a.m. OK GNU C++11 TESTS 83 46 1638400 2400
42968902 emoairx F Sept. 17, 2018, 4:16 a.m. OK GNU C++11 TESTS 83 46 1638400 2400
42968786 yasugongshang F Sept. 17, 2018, 4:09 a.m. OK GNU C++11 TESTS 83 46 1638400 2400
42968741 emoairx F Sept. 17, 2018, 4:06 a.m. OK GNU C++11 TESTS 83 46 1638400 2400
42968821 yasugongshang F Sept. 17, 2018, 4:11 a.m. OK GNU C++11 TESTS 83 46 1740800 2400
42967659 emoairx F Sept. 17, 2018, 2:56 a.m. OK GNU C++11 TESTS 83 61 1638400 2400
42951435 emoairx F Sept. 16, 2018, 2:33 p.m. OK GNU C++11 TESTS 83 62 1638400 2400
42967613 emoairx F Sept. 17, 2018, 2:52 a.m. OK GNU C++11 TESTS 83 77 1638400 2400
43012783 code_struck F Sept. 17, 2018, 7:44 p.m. OK GNU C++11 TESTS 83 77 15360000 2400
48075482 Itst F Jan. 8, 2019, 4:12 a.m. OK GNU C++11 TESTS 83 77 45465600 2400
42968951 emoairx F Sept. 17, 2018, 4:19 a.m. OK GNU C++14 TESTS 83 31 1740800 2400
42968834 yasugongshang F Sept. 17, 2018, 4:12 a.m. OK GNU C++14 TESTS 83 31 1740800 2400
44751574 ReaLNero1 F Oct. 23, 2018, 8:13 p.m. OK GNU C++14 TESTS 83 46 1740800 2400
42968936 emoairx F Sept. 17, 2018, 4:19 a.m. OK GNU C++14 TESTS 83 46 1740800 2400
43055477 user202729_ F Sept. 19, 2018, 3:20 a.m. OK GNU C++14 TESTS 83 78 819200 2400
64051682 ljaneczk F Nov. 1, 2019, 10:05 p.m. OK GNU C++14 TESTS 83 93 29696000 2400
43045704 ramanujan22 F Sept. 18, 2018, 5:55 p.m. OK GNU C++14 TESTS 83 109 26419200 2400
42968905 emoairx F Sept. 17, 2018, 4:16 a.m. OK GNU C++14 TESTS 83 124 1638400 2400
48075572 Itst F Jan. 8, 2019, 4:14 a.m. OK GNU C++14 TESTS 83 155 45568000 2400
48075520 Itst F Jan. 8, 2019, 4:13 a.m. OK GNU C++14 TESTS 83 155 45670400 2400
42968837 yasugongshang F Sept. 17, 2018, 4:12 a.m. OK GNU C++17 TESTS 83 46 1740800 2400
42955864 WNG F Sept. 16, 2018, 4:17 p.m. OK GNU C++17 TESTS 83 78 1638400 2400
42996551 cjnwq F Sept. 17, 2018, 12:16 p.m. OK GNU C++17 TESTS 83 78 3686400 2400
42967830 O_O_ F Sept. 17, 2018, 3:08 a.m. OK GNU C++17 TESTS 83 93 1638400 2400
42936055 black_native F Sept. 16, 2018, 11:38 a.m. OK GNU C++17 TESTS 83 93 1638400 2400
42970628 Medeowex F Sept. 17, 2018, 5:59 a.m. OK GNU C++17 TESTS 83 93 3993600 2400
42993893 ivan100sic F Sept. 17, 2018, 11:22 a.m. OK GNU C++17 TESTS 83 93 5529600 2400
42953212 DomiKo F Sept. 16, 2018, 3:01 p.m. OK GNU C++17 TESTS 83 93 15257600 2400
42941114 KrK F Sept. 16, 2018, 12:05 p.m. OK GNU C++17 TESTS 83 93 15564800 2400
69420417 SGHD F Jan. 23, 2020, 2:14 p.m. OK GNU C++17 TESTS 83 93 29696000 2400
45355348 donli F Nov. 6, 2018, 8:03 a.m. OK Java 8 TESTS 83 639 16691200 2400
44097127 xodiac F Oct. 11, 2018, 2:10 a.m. OK Java 8 TESTS 83 686 17817600 2400
43289432 dalt F Sept. 23, 2018, 9:59 a.m. OK Java 8 TESTS 83 701 32153600 2400
42952290 vadimmm F Sept. 16, 2018, 2:43 p.m. OK Java 8 TESTS 83 764 16588800 2400
42951774 vadimmm F Sept. 16, 2018, 2:37 p.m. OK Java 8 TESTS 83 842 16588800 2400
48930627 hongquanntct F Jan. 25, 2019, 12:22 p.m. OK Java 8 TESTS 83 888 19660800 2400
48930120 hongquanntct F Jan. 25, 2019, 12:12 p.m. OK Java 8 TESTS 83 935 18534400 2400
42956874 Shaykhutdinov-T-I F Sept. 16, 2018, 4:47 p.m. OK Java 8 TESTS 83 1075 17408000 2400
42968820 PrakharJain F Sept. 17, 2018, 4:11 a.m. OK Java 8 TESTS 83 1076 16076800 2400
43170049 aman28rwt F Sept. 21, 2018, 7:47 a.m. OK Java 8 TESTS 83 1107 16896000 2400
54426099 ImVeryBad F May 20, 2019, 6:33 p.m. OK MS C++ TESTS 83 249 1638400 2400
44564892 mr16note F Oct. 19, 2018, 10:12 p.m. OK MS C++ TESTS 83 655 3891200 2400
43093038 XDIMANX007 F Sept. 19, 2018, 8:12 p.m. OK MS C++ TESTS 83 857 11468800 2400
43048672 2fid F Sept. 18, 2018, 7:37 p.m. OK MS C++ TESTS 83 904 11571200 2400
43065907 absi2011 F Sept. 19, 2018, 5:25 a.m. OK MS C++ TESTS 83 1013 7577600 2400
43502063 shiyan12 F Sept. 27, 2018, 5:35 p.m. OK MS C++ TESTS 83 1404 137932800 2400
43087460 Djok216 F Sept. 19, 2018, 4:55 p.m. OK PyPy 2 TESTS 83 982 29593600 2400
43152803 sergovoy F Sept. 20, 2018, 6:14 p.m. OK PyPy 3 TESTS 83 826 34201600 2400
43152892 sergovoy F Sept. 20, 2018, 6:17 p.m. OK PyPy 3 TESTS 83 826 34304000 2400
43154970 Slamur F Sept. 20, 2018, 7:21 p.m. OK PyPy 3 TESTS 83 1045 22630400 2400
43154963 Slamur F Sept. 20, 2018, 7:21 p.m. OK PyPy 3 TESTS 83 1154 27852800 2400
43561352 qguaihudou F Sept. 29, 2018, 9:11 a.m. OK PyPy 3 TESTS 83 1356 45465600 2400
43116323 turmax F Sept. 20, 2018, 1:56 p.m. OK PyPy 3 TESTS 83 1840 48537600 2400
53011375 morejarphone F April 19, 2019, 12:16 p.m. OK PyPy 3 TESTS 83 1981 27136000 2400
43152365 sergovoy F Sept. 20, 2018, 6:01 p.m. OK PyPy 3 TESTS 83 1996 53862400 2400
42946584 nwi F Sept. 16, 2018, 12:33 p.m. OK Python 2 TESTS 83 1902 20992000 2400

remove filters

Back to search problems