Codeforces Round 487 (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
989 Codeforces Round 487 (Div. 2) FINISHED False 7200 203099099 June 11, 2018, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 517 ) D A Shade of Moonlight PROGRAMMING binary search geometry math sortings two pointers 2500

B'"To curtain off the moonlight should be hardly possible; the shades present its mellow beauty and restful nature." Intonates Mino. "See? The clouds are coming." Kanno gazes into the distance. "That can 't be better," Mino turns to Kanno. The sky can be seen as a one-dimensional axis. The moon is at the origin whose coordinate is 0 . There are n clouds floating in the sky. Each cloud has the same length l . The i -th initially covers the range of (x_i, x_i + l) (endpoints excluded). Initially, it moves at a velocity of v_i , which equals either 1 or -1 . Furthermore, no pair of clouds intersect initially, that is, for all 1 <= q i lt j <= q n , lvert x_i - x_j rvert geq l . With a wind velocity of w , the velocity of the i -th cloud becomes v_i + w . That is, its coordinate increases by v_i + w during each unit of time. Note that the wind can be strong and clouds can change their direction. You are to help Mino count the number of pairs (i, j) ( i < j ), such that with a proper choice of wind velocity w not exceeding w_ mathrm{max} in absolute value (possibly negative and/or fractional), the i -th and j -th clouds both cover the moon at the same future moment. This w doesn 't need to be the same across different pairs. The first line contains three space-separated integers n , l , and w_ mathrm{max} ( 1 <= q n <= q 10^5 , 1 <= q l, w_ mathrm{max} <= q 10^8 ) -- the number of clouds, the length of each cloud and the maximum wind speed, respectively. The i -th of the following n lines contains two space-separated integers x_i and v_i ( -10^8 <= q x_i <= q 10^8 , v_i in {-1, 1 } ) -- the initial position and the velocity of the i -th cloud, respectively. The input guarantees that for all 1 <= q i lt j <= q n , lvert x_i - x_j rvert geq l . Output one integer -- the'...

Tutorials

Codeforces Round #487 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39205724 H2SH2SO4O4O4 D June 13, 2018, 4:06 a.m. OK GNU C++ TESTS 30 31 614400 2500
39182621 littleming D June 12, 2018, 6:48 a.m. OK GNU C++ TESTS 30 31 819200 2500
39179910 HugeGun D June 12, 2018, 4:15 a.m. OK GNU C++ TESTS 30 31 1638400 2500
39206034 Nokto D June 13, 2018, 4:31 a.m. OK GNU C++ TESTS 30 31 1945600 2500
39181480 littleming D June 12, 2018, 5:49 a.m. OK GNU C++ TESTS 30 31 1945600 2500
39181346 littleming D June 12, 2018, 5:41 a.m. OK GNU C++ TESTS 30 31 1945600 2500
39359449 ErkkiErkko D June 18, 2018, 3:19 p.m. OK GNU C++ TESTS 30 46 819200 2500
39351190 sheepp D June 18, 2018, 8:44 a.m. OK GNU C++ TESTS 30 46 819200 2500
39339109 npu_xhd D June 17, 2018, 3:36 p.m. OK GNU C++ TESTS 30 46 819200 2500
39188866 Efina D June 12, 2018, 10:53 a.m. OK GNU C++ TESTS 30 46 819200 2500
40931983 ReaLNero1 D July 30, 2018, 1:29 a.m. OK GNU C++11 TESTS 30 31 614400 2500
39177554 R_rank_Pyramid D June 12, 2018, 1:13 a.m. OK GNU C++11 TESTS 30 31 614400 2500
39242243 llgyc D June 14, 2018, 11:44 a.m. OK GNU C++11 TESTS 30 31 819200 2500
50145535 Scut82 D Feb. 19, 2019, 3:38 a.m. OK GNU C++11 TESTS 30 31 1024000 2500
39192007 newbiegcz D June 12, 2018, 12:57 p.m. OK GNU C++11 TESTS 30 31 1024000 2500
47710710 SkyWT D Dec. 30, 2018, 3:05 a.m. OK GNU C++11 TESTS 30 31 1945600 2500
39177730 R_rank_Pyramid D June 12, 2018, 1:27 a.m. OK GNU C++11 TESTS 30 46 614400 2500
39177280 R_rank_Pyramid D June 12, 2018, 12:46 a.m. OK GNU C++11 TESTS 30 46 614400 2500
39166692 emofunc D June 11, 2018, 3:26 p.m. OK GNU C++11 TESTS 30 46 614400 2500
43443493 Hachiroku D Sept. 26, 2018, 10:16 a.m. OK GNU C++11 TESTS 30 46 819200 2500
47711311 Amorphophallus D Dec. 30, 2018, 3:50 a.m. OK GNU C++14 TESTS 30 46 819200 2500
39354572 massimodong D June 18, 2018, 11:23 a.m. OK GNU C++14 TESTS 30 46 819200 2500
48488470 hank55663 D Jan. 17, 2019, 9:29 a.m. OK GNU C++14 TESTS 30 61 1024000 2500
58634573 the_compiler D Aug. 11, 2019, 10:51 p.m. OK GNU C++14 TESTS 30 62 819200 2500
47521239 vjudge3 D Dec. 26, 2018, 1:11 p.m. OK GNU C++14 TESTS 30 62 819200 2500
47521226 Liah D Dec. 26, 2018, 1:11 p.m. OK GNU C++14 TESTS 30 62 819200 2500
40687376 hongye123456 D July 24, 2018, 3:12 a.m. OK GNU C++14 TESTS 30 62 819200 2500
39604904 too_young_too_top1 D June 24, 2018, 2:08 p.m. OK GNU C++14 TESTS 30 62 819200 2500
39504888 Turkey D June 22, 2018, 3:49 a.m. OK GNU C++14 TESTS 30 62 819200 2500
39322296 OrangeDream D June 17, 2018, 1:40 a.m. OK GNU C++14 TESTS 30 62 819200 2500
48438984 Trisolaris D Jan. 16, 2019, 12:34 a.m. OK GNU C++17 TESTS 30 31 921600 2500
40389381 Doriath D July 15, 2018, 10:07 p.m. OK GNU C++17 TESTS 30 31 2048000 2500
64441081 yuiyh D Nov. 7, 2019, 4:22 a.m. OK GNU C++17 TESTS 30 61 819200 2500
40097434 vjudge4 D July 9, 2018, 1:15 a.m. OK GNU C++17 TESTS 30 61 12390400 2500
64099843 yuiyh D Nov. 2, 2019, 3:04 p.m. OK GNU C++17 TESTS 30 62 819200 2500
58854386 CMZ D Aug. 15, 2019, 8:43 a.m. OK GNU C++17 TESTS 30 62 819200 2500
39291008 3016218074 D June 16, 2018, 3:36 p.m. OK GNU C++17 TESTS 30 62 819200 2500
39260912 johnchen902 D June 15, 2018, 8:21 a.m. OK GNU C++17 TESTS 30 62 819200 2500
39192184 lXTobiXl D June 12, 2018, 1:04 p.m. OK GNU C++17 TESTS 30 62 819200 2500
39186526 IGVA D June 12, 2018, 9:29 a.m. OK GNU C++17 TESTS 30 62 819200 2500
39170183 stczhc D June 11, 2018, 5:12 p.m. OK Haskell TESTS 30 249 21504000 2500
39820186 megaspazz D July 1, 2018, 11:43 a.m. OK Java 8 TESTS 30 186 0 2500
39178497 dalt D June 12, 2018, 2:30 a.m. OK Java 8 TESTS 30 187 0 2500
40941858 donli D July 30, 2018, 8:22 a.m. OK Java 8 TESTS 30 202 0 2500
39528880 tri D June 22, 2018, 10:38 p.m. OK Java 8 TESTS 30 202 0 2500
39273248 hemant_dhanuka D June 15, 2018, 6:38 p.m. OK Java 8 TESTS 30 202 0 2500
39217457 uwi D June 13, 2018, 1:18 p.m. OK Java 8 TESTS 30 202 0 2500
39180715 Harpae D June 12, 2018, 5:05 a.m. OK Java 8 TESTS 30 202 0 2500
39180550 Harpae D June 12, 2018, 4:56 a.m. OK Java 8 TESTS 30 202 0 2500
39167568 Harpae D June 11, 2018, 3:33 p.m. OK Java 8 TESTS 30 202 0 2500
39728799 iamavalon D June 27, 2018, 10:37 p.m. OK Java 8 TESTS 30 218 0 2500
39167695 elizarov D June 11, 2018, 3:34 p.m. OK Kotlin TESTS 30 405 204800 2500
47711316 vjudge1 D Dec. 30, 2018, 3:50 a.m. OK MS C++ TESTS 30 46 1843200 2500
39237128 wRabbits_AlMag D June 14, 2018, 9:01 a.m. OK MS C++ TESTS 30 62 1945600 2500
39202312 kevinsogo D June 12, 2018, 10:46 p.m. OK PyPy 2 TESTS 30 452 7372800 2500
39228724 kevinsogo D June 14, 2018, 12:35 a.m. OK PyPy 2 TESTS 30 483 9523200 2500
39207715 Ali_Pi D June 13, 2018, 6:27 a.m. OK Python 2 TESTS 30 655 5836800 2500
39193022 bigcat111 D June 12, 2018, 1:40 p.m. OK Python 3 TESTS 30 841 6860800 2500
39244735 ilyas_ad D June 14, 2018, 1:01 p.m. OK Python 3 TESTS 30 1934 2764800 2500

remove filters

Back to search problems