Codeforces Round 486 (Div. 3)

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
988 Codeforces Round 486 (Div. 3) FINISHED False 7200 209316263 June 1, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7422 ) D Points and Powers of Two PROGRAMMING brute force math 1800

B"There are n distinct points on a coordinate line, the coordinate of i -th point equals to x_i . Choose a subset of the given set of points such that the distance between each pair of points in a subset is an integral power of two. It is necessary to consider each pair of points, not only adjacent. Note that any subset containing one element satisfies the condition above. Among all these subsets, choose a subset with maximum possible size. In other words, you have to choose the maximum possible number of points x_{i_1}, x_{i_2}, ... , x_{i_m} such that for each pair x_{i_j} , x_{i_k} it is true that |x_{i_j} - x_{i_k}| = 2^d where d is some non-negative integer number (not necessarily the same for each pair of points). The first line contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of points. The second line contains n pairwise distinct integers x_1, x_2, ... , x_n ( -10^9 <= x_i <= 10^9 ) -- the coordinates of points. In the first line print m -- the maximum possible number of points in a subset that satisfies the conditions described above. In the second line print m integers -- the coordinates of points in the subset you have chosen. If there are multiple answers, print any of them. In the first example the answer is [7, 3, 5] . Note, that |7-3|=4=2^2 , |7-5|=2=2^1 and |3-5|=2=2^1 . You can't find a subset having more points satisfying the required property. "...

Tutorials

59810

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39121408 rr_ D June 10, 2018, 1:03 p.m. OK D TESTS 99 686 36147200 1800
39121288 rr_ D June 10, 2018, 12:59 p.m. OK D TESTS 99 717 36147200 1800
39122986 rr_ D June 10, 2018, 1:54 p.m. OK D TESTS 99 748 36147200 1800
39123057 rr_ D June 10, 2018, 1:57 p.m. OK D TESTS 99 764 36147200 1800
39095765 Denor D June 10, 2018, 10:28 a.m. OK Delphi TESTS 99 358 819200 1800
39015736 darkus-_- D June 7, 2018, 10:19 a.m. OK FPC TESTS 99 468 819200 1800
39263024 falcon_9 D June 15, 2018, 10:17 a.m. OK GNU C TESTS 99 530 819200 1800
40932011 ReaLNero1 D July 30, 2018, 1:30 a.m. OK GNU C++ TESTS 99 109 819200 1800
39067333 nootwu D June 9, 2018, 11:06 a.m. OK GNU C++ TESTS 99 109 819200 1800
39688757 CQUzbx D June 27, 2018, 1:53 a.m. OK GNU C++ TESTS 99 343 1638400 1800
40696005 vjudge4 D July 24, 2018, 8:03 a.m. OK GNU C++ TESTS 99 358 3891200 1800
40695967 vjudge3 D July 24, 2018, 8:02 a.m. OK GNU C++ TESTS 99 405 3891200 1800
38926121 FduLiuXufei D June 3, 2018, 4:37 p.m. OK GNU C++ TESTS 99 436 7577600 1800
40698919 vjudge5 D July 24, 2018, 9:29 a.m. OK GNU C++ TESTS 99 436 17100800 1800
41244190 kecaj D Aug. 5, 2018, 12:10 p.m. OK GNU C++ TESTS 99 452 819200 1800
40310046 Tarjan D July 14, 2018, 7:38 a.m. OK GNU C++ TESTS 99 468 1433600 1800
38915373 cxk0707 D June 3, 2018, 8:49 a.m. OK GNU C++ TESTS 99 499 4915200 1800
63711115 rubber_duckieOwOwO D Oct. 29, 2019, 10:05 a.m. OK GNU C11 TESTS 99 920 921600 1800
39220316 A.Freeman D June 13, 2018, 3:18 p.m. OK GNU C++11 TESTS 99 124 1433600 1800
39967416 krijgertje D July 4, 2018, 9:37 p.m. OK GNU C++11 TESTS 99 156 1638400 1800
58174602 vjudge4 D Aug. 2, 2019, 12:35 p.m. OK GNU C++11 TESTS 99 280 819200 1800
38913081 Andres_Alumets D June 3, 2018, 7:26 a.m. OK GNU C++11 TESTS 99 280 5120000 1800
58166254 vjudge3 D Aug. 2, 2019, 9:09 a.m. OK GNU C++11 TESTS 99 295 819200 1800
39062938 GoodID D June 9, 2018, 7:34 a.m. OK GNU C++11 TESTS 99 296 819200 1800
47849231 abdalkader-s D Jan. 2, 2019, 4:39 p.m. OK GNU C++11 TESTS 99 327 819200 1800
66150363 shreyasbalakrishna19 D Dec. 1, 2019, 6:40 p.m. OK GNU C++11 TESTS 99 358 1638400 1800
38959302 Varun D June 5, 2018, 4:38 a.m. OK GNU C++11 TESTS 99 405 4300800 1800
38946753 SheepRanger D June 4, 2018, 1:55 p.m. OK GNU C++11 TESTS 99 421 5120000 1800
52661275 AMnu D April 12, 2019, 11:18 p.m. OK GNU C++14 TESTS 99 124 819200 1800
38998326 Gilgamesh_01 D June 6, 2018, 3:16 p.m. OK GNU C++14 TESTS 99 124 1638400 1800
39451039 imeimi D June 21, 2018, 4:30 a.m. OK GNU C++14 TESTS 99 171 819200 1800
38956997 Eliden D June 5, 2018, 1:08 a.m. OK GNU C++14 TESTS 99 202 5017600 1800
38965356 Malowniczy D June 5, 2018, 10:20 a.m. OK GNU C++14 TESTS 99 202 5324800 1800
40320791 lclpsoz D July 14, 2018, 1:50 p.m. OK GNU C++14 TESTS 99 218 4198400 1800
58167336 1470519347 D Aug. 2, 2019, 9:36 a.m. OK GNU C++14 TESTS 99 264 819200 1800
38938463 CrafterKolyan D June 4, 2018, 8:22 a.m. OK GNU C++14 TESTS 99 296 4198400 1800
39454785 fitybi D June 21, 2018, 7:53 a.m. OK GNU C++14 TESTS 99 327 819200 1800
39771252 Momentum D June 29, 2018, 2:47 p.m. OK GNU C++14 TESTS 99 358 819200 1800
57004871 rubix03 D July 14, 2019, 6:10 a.m. OK GNU C++17 TESTS 99 140 1638400 1800
38950834 Alex18mai D June 4, 2018, 4:47 p.m. OK GNU C++17 TESTS 99 156 5222400 1800
39028668 SpeedOfMagic D June 7, 2018, 5:58 p.m. OK GNU C++17 TESTS 99 233 52838400 1800
47784851 Matuha777 D Dec. 31, 2018, 10:06 a.m. OK GNU C++17 TESTS 99 249 1843200 1800
69721379 Not-Afraid D Jan. 29, 2020, 10:47 a.m. OK GNU C++17 TESTS 99 264 15155200 1800
44748583 ZeroAmbition D Oct. 23, 2018, 6:17 p.m. OK GNU C++17 TESTS 99 295 9523200 1800
39217668 Renyxa D June 13, 2018, 1:25 p.m. OK GNU C++17 TESTS 99 311 819200 1800
39958147 r19 D July 4, 2018, 2:18 p.m. OK GNU C++17 TESTS 99 311 819200 1800
38940192 Avatar21 D June 4, 2018, 9:36 a.m. OK GNU C++17 TESTS 99 311 16384000 1800
39815005 liyuchong2 D July 1, 2018, 7:39 a.m. OK GNU C++17 TESTS 99 327 819200 1800
42836503 Marii D Sept. 13, 2018, 3:55 p.m. OK Go TESTS 99 1170 16384000 1800
68945508 GiantTornado D Jan. 16, 2020, 4 p.m. OK Java 11 TESTS 99 1684 18944000 1800
38928280 Slamur D June 3, 2018, 6:36 p.m. OK Java 8 TESTS 99 436 36147200 1800
39202225 rzero D June 12, 2018, 10:33 p.m. OK Java 8 TESTS 99 561 16793600 1800
39009081 totallynotan D June 7, 2018, 5:05 a.m. OK Java 8 TESTS 99 686 8908800 1800
47176729 Ahmed_Diab D Dec. 17, 2018, 5:56 p.m. OK Java 8 TESTS 99 701 17305600 1800
63051928 AnandOza D Oct. 21, 2019, 3:16 a.m. OK Java 8 TESTS 99 701 18022400 1800
38933380 vikashkumarbissu D June 4, 2018, 3:11 a.m. OK Java 8 TESTS 99 748 43622400 1800
45322344 KulikAlex D Nov. 5, 2018, 11:14 a.m. OK Java 8 TESTS 99 764 21094400 1800
63051897 AnandOza D Oct. 21, 2019, 3:14 a.m. OK Java 8 TESTS 99 779 18022400 1800
38918021 ayushchaurasia2879 D June 3, 2018, 10:43 a.m. OK Java 8 TESTS 99 795 39731200 1800
39028291 Andreikkaa D June 7, 2018, 5:37 p.m. OK Java 8 TESTS 99 826 0 1800
40850768 user32 D July 27, 2018, 2:29 p.m. OK Kotlin TESTS 99 904 14131200 1800
38914699 0442A403 D June 3, 2018, 8:24 a.m. OK Kotlin TESTS 99 1294 37580800 1800
38909830 Lancern D June 3, 2018, 5:08 a.m. OK Kotlin TESTS 99 1340 41369600 1800
38914740 0442A403 D June 3, 2018, 8:26 a.m. OK Kotlin TESTS 99 1590 22937600 1800
40851225 user32 D July 27, 2018, 2:44 p.m. OK Kotlin TESTS 99 1840 26316800 1800
41413045 stepanovep D Aug. 9, 2018, 10:31 p.m. OK Kotlin TESTS 99 2323 15667200 1800
40850573 user32 D July 27, 2018, 2:24 p.m. OK Kotlin TESTS 99 3073 14950400 1800
52212963 hongquanntct D April 1, 2019, 9:24 p.m. OK Mono C# TESTS 99 342 35328000 1800
52213001 hongquanntct D April 1, 2019, 9:26 p.m. OK Mono C# TESTS 99 373 38195200 1800
41537589 treasuryonly D Aug. 12, 2018, 7:02 p.m. OK Mono C# TESTS 99 499 32972800 1800
52212480 hongquanntct D April 1, 2019, 8:56 p.m. OK Mono C# TESTS 99 623 31539200 1800
41655739 scorpiowf D Aug. 16, 2018, 2:30 p.m. OK MS C++ TESTS 99 529 3379200 1800
39070804 xyACACAC D June 9, 2018, 1:49 p.m. OK MS C++ TESTS 99 733 819200 1800
39256026 j4357j D June 15, 2018, 2:40 a.m. OK MS C++ TESTS 99 763 1638400 1800
64095548 vjudge3 D Nov. 2, 2019, 1:48 p.m. OK MS C++ TESTS 99 810 921600 1800
41265620 CrashMaster D Aug. 6, 2018, 6:54 a.m. OK MS C++ TESTS 99 982 1126400 1800
43456686 vjudge5 D Sept. 26, 2018, 3:19 p.m. OK MS C++ TESTS 99 1091 7577600 1800
38940784 henudhl D June 4, 2018, 9:59 a.m. OK MS C++ TESTS 99 1201 5120000 1800
38997844 hamed053 D June 6, 2018, 2:55 p.m. OK MS C++ TESTS 99 1372 7577600 1800
39221429 honeyMan D June 13, 2018, 4:11 p.m. OK MS C++ TESTS 99 1372 8089600 1800
60372151 vjudge2 D Sept. 11, 2019, 3:11 a.m. OK MS C++ TESTS 99 1387 8089600 1800
68664170 ftp_01 D Jan. 12, 2020, 2:34 p.m. OK MS C++ 2017 TESTS 99 936 819200 1800
50632171 work_hard. D March 1, 2019, 9:43 a.m. OK MS C++ 2017 TESTS 99 2402 6451200 1800
59229760 pmitkov D Aug. 21, 2019, 3 p.m. OK MS C++ 2017 TESTS 99 2760 7270400 1800
60372080 zhzhsan D Sept. 11, 2019, 3:06 a.m. OK MS C++ 2017 TESTS 99 2932 8089600 1800
60372010 zhzhsan D Sept. 11, 2019, 3:01 a.m. OK MS C++ 2017 TESTS 99 3119 14438400 1800
64743465 vjudge1 D Nov. 12, 2019, 12:45 p.m. OK MS C++ 2017 TESTS 99 3463 8294400 1800
66936949 vjudge4 D Dec. 15, 2019, 8:45 a.m. OK MS C++ 2017 TESTS 99 3837 8089600 1800
64202023 index_ D Nov. 4, 2019, 11:45 a.m. OK MS C++ 2017 TESTS 99 3899 8294400 1800
39457151 DerUbermensch D June 21, 2018, 9:29 a.m. OK Node.js TESTS 99 966 31027200 1800
41909185 tanghao D Aug. 20, 2018, 4:32 p.m. OK PyPy 2 TESTS 99 779 21094400 1800
41897698 tanghao D Aug. 20, 2018, 10:28 a.m. OK PyPy 2 TESTS 99 873 19353600 1800
38938753 CrafterKolyan D June 4, 2018, 8:32 a.m. OK PyPy 2 TESTS 99 935 41062400 1800
45237846 pavankatta D Nov. 3, 2018, 10:15 a.m. OK PyPy 2 TESTS 99 1029 18534400 1800
38998154 sasasagagaga D June 6, 2018, 3:09 p.m. OK PyPy 2 TESTS 99 1637 19353600 1800
39080902 nealzane D June 10, 2018, 1:01 a.m. OK PyPy 2 TESTS 99 1637 19353600 1800
38937608 FatherofBenoni D June 4, 2018, 7:44 a.m. OK PyPy 2 TESTS 99 1747 57856000 1800
39007605 Jota D June 7, 2018, 3:07 a.m. OK PyPy 2 TESTS 99 2417 14131200 1800
39007574 Jota D June 7, 2018, 3:04 a.m. OK PyPy 2 TESTS 99 2527 14028800 1800
39008080 Jota D June 7, 2018, 3:47 a.m. OK PyPy 2 TESTS 99 2635 14028800 1800
67856081 MehulJ D Dec. 29, 2019, 6:08 a.m. OK PyPy 3 TESTS 99 576 21504000 1800
66362437 konstokar D Dec. 5, 2019, 6:20 p.m. OK PyPy 3 TESTS 99 592 21708800 1800
44252771 megaspazz D Oct. 13, 2018, 11:09 a.m. OK PyPy 3 TESTS 99 654 16691200 1800
44252871 megaspazz D Oct. 13, 2018, 11:11 a.m. OK PyPy 3 TESTS 99 654 30822400 1800
52280754 aleonov drobucs D April 3, 2019, 4:54 p.m. OK PyPy 3 TESTS 99 701 27340800 1800
53589824 yfo D April 30, 2019, 9:48 p.m. OK PyPy 3 TESTS 99 717 27750400 1800
38958373 Yee_172 D June 5, 2018, 3:20 a.m. OK PyPy 3 TESTS 99 795 49971200 1800
58396482 shiv1470 D Aug. 6, 2019, 3:50 p.m. OK PyPy 3 TESTS 99 811 22937600 1800
38958379 Yee_172 D June 5, 2018, 3:20 a.m. OK PyPy 3 TESTS 99 811 50585600 1800
38914045 shmabulock D June 3, 2018, 8:01 a.m. OK PyPy 3 TESTS 99 826 49049600 1800
39080757 cjquines D June 10, 2018, 12:36 a.m. OK Python 2 TESTS 99 1528 11161600 1800
39015012 Student_of_Husayn D June 7, 2018, 9:46 a.m. OK Python 2 TESTS 99 2932 16793600 1800
39291880 tanghao D June 16, 2018, 4:24 p.m. OK Python 2 TESTS 99 2964 12083200 1800
39033347 wangkan2001 D June 8, 2018, 12:20 a.m. OK Python 2 TESTS 99 3353 11161600 1800
59585501 LintuStorm D Aug. 27, 2019, 5:49 p.m. OK Python 3 TESTS 99 1403 15872000 1800
39206586 orailly D June 13, 2018, 5:14 a.m. OK Python 3 TESTS 99 1481 16691200 1800
39206509 orailly D June 13, 2018, 5:09 a.m. OK Python 3 TESTS 99 1653 16691200 1800
38975161 ldt116 D June 5, 2018, 5:20 p.m. OK Python 3 TESTS 99 1653 23654400 1800
48461365 milosz D Jan. 16, 2019, 2:50 p.m. OK Python 3 TESTS 99 1684 16486400 1800
39206451 orailly D June 13, 2018, 5:06 a.m. OK Python 3 TESTS 99 1731 16486400 1800
39286204 yinxiaoyu D June 16, 2018, 11:37 a.m. OK Python 3 TESTS 99 1762 16691200 1800
39206228 orailly D June 13, 2018, 4:46 a.m. OK Python 3 TESTS 99 1887 19558400 1800
39205981 orailly D June 13, 2018, 4:27 a.m. OK Python 3 TESTS 99 1902 19558400 1800
39069878 Kartik_715 D June 9, 2018, 12:56 p.m. OK Python 3 TESTS 99 1918 19558400 1800
39283432 kobae964 D June 16, 2018, 9:23 a.m. OK Rust TESTS 99 1747 109875200 1800
39266731 jrodrigues D June 15, 2018, 12:57 p.m. OK Rust TESTS 99 1949 9113600 1800

remove filters

Back to search problems