Codeforces Round 496 (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
1005 Codeforces Round 496 (Div. 3) FINISHED False 7200 200672699 July 9, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11739 ) C Summarize to the Power of Two PROGRAMMING brute force greedy implementation 1400

B'A sequence a_1, a_2, ... , a_n is called good if, for each element a_i , there exists an element a_j ( i ne j ) such that a_i+a_j is a power of two (that is, 2^d for some non-negative integer d ). For example, the following sequences are good: Note that, by definition, an empty sequence (with a length of 0 ) is good. For example, the following sequences are not good: You are given a sequence a_1, a_2, ... , a_n . What is the minimum number of elements you need to remove to make it good? You can delete an arbitrary set of elements. The first line contains the integer n ( 1 <= n <= 120000 ) -- the length of the given sequence. The second line contains the sequence of integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ). Print the minimum number of elements needed to be removed from the given sequence in order to make it good. It is possible that you need to delete all n elements, make it empty, and thus get a good sequence. In the first example, it is enough to delete one element a_4=5 . The remaining elements form the sequence [4, 7, 1, 4, 9] , which is good. '...

Tutorials

Codeforces Round 496 (Div. 3): Problem Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44586978 chaorenhaha C Oct. 20, 2018, 9:51 a.m. OK FPC TESTS 28 1216 2867200 1400
40168658 WAWAtece C July 10, 2018, 11:22 a.m. OK GNU C++ TESTS 28 62 307200 1400
40168414 blackjack001 C July 10, 2018, 11:15 a.m. OK GNU C++ TESTS 28 62 512000 1400
40404316 vjudge4 C July 16, 2018, 9:01 a.m. OK GNU C++ TESTS 28 62 614400 1400
40539741 vjudge3 C July 19, 2018, 8 a.m. OK GNU C++ TESTS 28 62 921600 1400
40908964 Scut82 C July 29, 2018, 7:36 a.m. OK GNU C++ TESTS 28 62 1024000 1400
40239414 rl2100 C July 12, 2018, 5:24 p.m. OK GNU C++ TESTS 28 62 1126400 1400
40192037 bfffsdw C July 11, 2018, 7:10 a.m. OK GNU C++ TESTS 28 62 1228800 1400
40197384 serotonin C July 11, 2018, 10:06 a.m. OK GNU C++ TESTS 28 62 1843200 1400
41310210 sayo_szzx C Aug. 7, 2018, 3:31 p.m. OK GNU C++ TESTS 28 62 1945600 1400
40256015 310817479 C July 13, 2018, 9:05 a.m. OK GNU C++ TESTS 28 77 512000 1400
64525442 rubber_duckieOwOwO C Nov. 8, 2019, 1:39 p.m. OK GNU C11 TESTS 28 46 7884800 1400
40724945 code-man C July 25, 2018, 4:13 a.m. OK GNU C11 TESTS 28 280 1945600 1400
41608318 qeatzy C Aug. 15, 2018, 4:44 a.m. OK GNU C++11 TESTS 28 31 1433600 1400
41608266 qeatzy C Aug. 15, 2018, 4:41 a.m. OK GNU C++11 TESTS 28 31 144281600 1400
55289118 vjudge3 C June 8, 2019, 6:45 a.m. OK GNU C++11 TESTS 28 46 307200 1400
40634508 _DSy C July 22, 2018, 11:47 a.m. OK GNU C++11 TESTS 28 62 614400 1400
41541961 gunss C Aug. 13, 2018, 12:57 a.m. OK GNU C++11 TESTS 28 62 819200 1400
61898315 luogu_bot3 C Oct. 5, 2019, 7:53 a.m. OK GNU C++11 TESTS 28 62 921600 1400
61898281 Heartbeat666 C Oct. 5, 2019, 7:52 a.m. OK GNU C++11 TESTS 28 62 921600 1400
40602692 C1ariS C July 21, 2018, 9:30 a.m. OK GNU C++11 TESTS 28 62 1433600 1400
61499506 luogu_bot1 C Sept. 29, 2019, 2:29 p.m. OK GNU C++11 TESTS 28 62 1433600 1400
40176353 vjudge5 C July 10, 2018, 3:27 p.m. OK GNU C++11 TESTS 28 62 5017600 1400
40172074 vjudge3 C July 10, 2018, 12:59 p.m. OK GNU C++14 TESTS 28 62 512000 1400
40227159 fszgyc C July 12, 2018, 9:35 a.m. OK GNU C++14 TESTS 28 62 512000 1400
62099400 vjudge3 C Oct. 8, 2019, 8:38 a.m. OK GNU C++14 TESTS 28 62 512000 1400
40232287 cryingrain C July 12, 2018, 12:45 p.m. OK GNU C++14 TESTS 28 62 614400 1400
40195304 YoussefMagdy C July 11, 2018, 8:50 a.m. OK GNU C++14 TESTS 28 62 819200 1400
52247934 papabless C April 2, 2019, 8:24 p.m. OK GNU C++14 TESTS 28 62 1126400 1400
61868930 stl C Oct. 4, 2019, 5:27 p.m. OK GNU C++14 TESTS 28 62 1638400 1400
40169997 kbs3247 C July 10, 2018, 11:58 a.m. OK GNU C++14 TESTS 28 62 2457600 1400
40227843 Autoratch C July 12, 2018, 9:59 a.m. OK GNU C++14 TESTS 28 77 512000 1400
40542912 arnold518 C July 19, 2018, 9:45 a.m. OK GNU C++14 TESTS 28 77 512000 1400
68587444 yiwangzhifeng C Jan. 11, 2020, 11:41 a.m. OK GNU C++17 TESTS 28 62 921600 1400
42127557 leoniduvk C Aug. 26, 2018, 4:15 p.m. OK GNU C++17 TESTS 28 62 4096000 1400
42127538 leoniduvk C Aug. 26, 2018, 4:15 p.m. OK GNU C++17 TESTS 28 62 4096000 1400
50389880 hdsingharora99 C Feb. 23, 2019, 1:35 p.m. OK GNU C++17 TESTS 28 77 512000 1400
54622010 NarutoElMatria C May 25, 2019, 12:43 p.m. OK GNU C++17 TESTS 28 77 614400 1400
44259416 vjudge2 C Oct. 13, 2018, 1:48 p.m. OK GNU C++17 TESTS 28 77 716800 1400
40300979 chen_yongzu C July 14, 2018, 2 a.m. OK GNU C++17 TESTS 28 77 1024000 1400
49223642 Ghotfall C Jan. 30, 2019, 8:44 p.m. OK GNU C++17 TESTS 28 77 1331200 1400
40170083 KlzX C July 10, 2018, 12:01 p.m. OK GNU C++17 TESTS 28 77 1638400 1400
55641740 vjudge1 C June 16, 2019, 11:22 a.m. OK GNU C++17 TESTS 28 77 1945600 1400
40371704 Recoder C July 15, 2018, 8:32 a.m. OK Go TESTS 28 2620 11468800 1400
40175968 Deemo C July 10, 2018, 3:11 p.m. OK Go TESTS 28 2838 4710400 1400
40230879 LCM C July 12, 2018, 11:59 a.m. OK Haskell TESTS 28 1263 37990400 1400
67769120 arsh1598 C Dec. 28, 2019, 5:56 a.m. OK Java 8 TESTS 28 202 8601600 1400
40205123 hack1nt0 C July 11, 2018, 2:59 p.m. OK Java 8 TESTS 28 217 2150400 1400
40188474 yashk C July 11, 2018, 4:26 a.m. OK Java 8 TESTS 28 217 3072000 1400
58539406 Ikari_stream C Aug. 10, 2019, 1:26 p.m. OK Java 8 TESTS 28 218 4608000 1400
40233028 MaxHeap C July 12, 2018, 1:08 p.m. OK Java 8 TESTS 28 218 5120000 1400
40369391 CrafterKolyan C July 15, 2018, 7:28 a.m. OK Java 8 TESTS 28 233 0 1400
40316407 apurvaj C July 14, 2018, 11:01 a.m. OK Java 8 TESTS 28 233 3481600 1400
40234958 hms1523 C July 12, 2018, 2:14 p.m. OK Java 8 TESTS 28 233 4915200 1400
40383049 thachlp C July 15, 2018, 3:42 p.m. OK Java 8 TESTS 28 233 5427200 1400
40756395 rzero C July 25, 2018, 11:22 p.m. OK Java 8 TESTS 28 234 5632000 1400
40298925 NourAlhadi C July 13, 2018, 11:48 p.m. OK Kotlin TESTS 28 561 7270400 1400
63027755 david_varela C Oct. 20, 2019, 5 p.m. OK Kotlin TESTS 28 561 22425600 1400
40212989 fpdrot C July 11, 2018, 10:54 p.m. OK Kotlin TESTS 28 670 11980800 1400
40212032 Rushan C July 11, 2018, 9:12 p.m. OK Kotlin TESTS 28 717 15052800 1400
55548904 og.kostya C June 14, 2019, 5:40 a.m. OK Mono C# TESTS 28 93 12288000 1400
40205764 n.a.borisov C July 11, 2018, 3:24 p.m. OK Mono C# TESTS 28 124 12390400 1400
40371769 Jarazorg C July 15, 2018, 8:34 a.m. OK Mono C# TESTS 28 124 18534400 1400
40244650 Mosyagin C July 12, 2018, 10:43 p.m. OK Mono C# TESTS 28 124 18534400 1400
40522999 YYOne C July 18, 2018, 5:52 p.m. OK Mono C# TESTS 28 389 29388800 1400
51165461 nemars C March 11, 2019, 2:06 p.m. OK Mono C# TESTS 28 499 33484800 1400
40547848 vjudge3 C July 19, 2018, 12:44 p.m. OK MS C++ TESTS 28 77 512000 1400
40252514 Ccccccccccc C July 13, 2018, 7:04 a.m. OK MS C++ TESTS 28 77 1638400 1400
62392117 vjudge4 C Oct. 12, 2019, 3:01 a.m. OK MS C++ TESTS 28 77 16076800 1400
49345317 vjudge5 C Feb. 2, 2019, 5:07 a.m. OK MS C++ TESTS 28 139 512000 1400
49319700 vjudge2 C Feb. 1, 2019, 11:45 a.m. OK MS C++ TESTS 28 140 921600 1400
62448962 vjudge1 C Oct. 13, 2019, 2:28 a.m. OK MS C++ TESTS 28 155 165376000 1400
40560060 _mactep C July 19, 2018, 10:39 p.m. OK MS C++ TESTS 28 156 512000 1400
68963192 vjudge4 C Jan. 17, 2020, 2:55 a.m. OK MS C++ TESTS 28 187 4812800 1400
41823887 vjudge3 C Aug. 19, 2018, 11:01 a.m. OK MS C++ TESTS 28 187 12492800 1400
68584926 vjudge2 C Jan. 11, 2020, 11:01 a.m. OK MS C++ TESTS 28 202 6758400 1400
49390081 work_hard. C Feb. 3, 2019, 9:22 a.m. OK MS C++ 2017 TESTS 28 358 3891200 1400
58323547 vjudge2 C Aug. 5, 2019, 6:53 a.m. OK MS C++ 2017 TESTS 28 405 22732800 1400
54513766 zkq111 C May 23, 2019, 8:38 a.m. OK MS C++ 2017 TESTS 28 514 18739200 1400
57018284 sladkayaKlubnichka C July 14, 2019, 12:42 p.m. OK MS C++ 2017 TESTS 28 748 8192000 1400
53795797 buyolitsez C May 5, 2019, 3:14 p.m. OK MS C++ 2017 TESTS 28 826 4403200 1400
54372642 Astronomax C May 19, 2019, 7:19 a.m. OK MS C++ 2017 TESTS 28 1699 165376000 1400
63282628 vjudge4 C Oct. 24, 2019, 9:12 a.m. OK MS C++ 2017 TESTS 28 2215 123494400 1400
67770593 Mad112233 C Dec. 28, 2019, 6:36 a.m. OK MS C++ 2017 TESTS 28 2354 133632000 1400
51060468 NPUlzh C March 9, 2019, 2:35 a.m. OK MS C++ 2017 TESTS 28 2574 127385600 1400
49363968 work_hard. C Feb. 2, 2019, 2:10 p.m. OK MS C++ 2017 TESTS 28 2620 127180800 1400
49382093 vjudge4 C Feb. 3, 2019, 3:06 a.m. OK Node.js TESTS 28 264 26931200 1400
40233842 sk0 C July 12, 2018, 1:36 p.m. OK Ocaml TESTS 28 935 9318400 1400
40199731 tusooa C July 11, 2018, 11:45 a.m. OK Perl TESTS 28 2776 29286400 1400
54806469 pein_7 C May 29, 2019, 2:26 p.m. OK PyPy 2 TESTS 28 202 13516800 1400
54806495 kaif_7 C May 29, 2019, 2:27 p.m. OK PyPy 2 TESTS 28 249 13414400 1400
62400582 raj1307 C Oct. 12, 2019, 7:14 a.m. OK PyPy 2 TESTS 28 265 15462400 1400
40211813 sasasagagaga C July 11, 2018, 8:50 p.m. OK PyPy 2 TESTS 28 358 15769600 1400
47685561 c1729 C Dec. 29, 2018, 2:37 p.m. OK PyPy 2 TESTS 28 373 15872000 1400
54825477 Mukundan314 C May 30, 2019, 6:12 a.m. OK PyPy 2 TESTS 28 608 105472000 1400
40501901 fortmax120 C July 18, 2018, 6:39 a.m. OK PyPy 2 TESTS 28 872 49868800 1400
40549913 Jota C July 19, 2018, 1:45 p.m. OK PyPy 2 TESTS 28 1060 13004800 1400
60480978 marina311 C Sept. 13, 2019, 10:26 a.m. OK PyPy 3 TESTS 28 280 18022400 1400
53498945 yfo C April 29, 2019, 1:18 p.m. OK PyPy 3 TESTS 28 280 22323200 1400
40174372 bhuwanchandra.it C July 10, 2018, 2:10 p.m. OK PyPy 3 TESTS 28 295 17203200 1400
40311089 Marii C July 14, 2018, 8:04 a.m. OK PyPy 3 TESTS 28 342 22016000 1400
40208650 FunnyGoblin C July 11, 2018, 5:22 p.m. OK PyPy 3 TESTS 28 343 21299200 1400
40200162 USYD_Yemengchen C July 11, 2018, 12:03 p.m. OK PyPy 3 TESTS 28 343 22937600 1400
69725522 roman_kruger C Jan. 29, 2020, 12:08 p.m. OK PyPy 3 TESTS 28 358 18944000 1400
40221479 sanket C July 12, 2018, 6:42 a.m. OK PyPy 3 TESTS 28 358 21606400 1400
40409020 Jarik C July 16, 2018, 11:28 a.m. OK PyPy 3 TESTS 28 374 19148800 1400
57062797 Sfaah C July 14, 2019, 7:10 p.m. OK PyPy 3 TESTS 28 390 14848000 1400
54738574 soumyasarkar1998 C May 28, 2019, 6:30 a.m. OK Python 2 TESTS 28 436 10342400 1400
40174064 wangkan2001 C July 10, 2018, 2:01 p.m. OK Python 2 TESTS 28 841 33996800 1400
40173931 sallyyao2001 C July 10, 2018, 1:57 p.m. OK Python 2 TESTS 28 841 33996800 1400
41139241 codercody C Aug. 3, 2018, 1:17 a.m. OK Python 2 TESTS 28 1153 8192000 1400
40352718 dvatsav98 C July 14, 2018, 5:59 p.m. OK Python 2 TESTS 28 1262 15667200 1400
47441652 Nure C Dec. 24, 2018, 2:02 a.m. OK Python 2 TESTS 28 1340 9523200 1400
54805708 pein_7 C May 29, 2019, 2 p.m. OK Python 2 TESTS 28 1356 6860800 1400
40191631 brian C July 11, 2018, 6:56 a.m. OK Python 2 TESTS 28 1543 6758400 1400
41548752 shnamacedev C Aug. 13, 2018, 7:02 a.m. OK Python 2 TESTS 28 1653 7475200 1400
40499399 porgyturtle C July 18, 2018, 5:02 a.m. OK Python 2 TESTS 28 2838 8294400 1400
40233690 orailly C July 12, 2018, 1:30 p.m. OK Python 3 TESTS 28 499 13516800 1400
40366668 the_white_devil C July 15, 2018, 6:15 a.m. OK Python 3 TESTS 28 670 10035200 1400
40168373 almasip C July 10, 2018, 11:14 a.m. OK Python 3 TESTS 28 701 9728000 1400
58356410 leilynour C Aug. 5, 2019, 7:51 p.m. OK Python 3 TESTS 28 716 10240000 1400
40202076 coldlearn C July 11, 2018, 1:11 p.m. OK Python 3 TESTS 28 764 10137600 1400
41145966 treasuryonly C Aug. 3, 2018, 6:35 a.m. OK Python 3 TESTS 28 795 9728000 1400
49321031 vjudge3 C Feb. 1, 2019, 12:20 p.m. OK Python 3 TESTS 28 810 12595200 1400
40390344 cabaleirog C July 15, 2018, 11:37 p.m. OK Python 3 TESTS 28 841 10137600 1400
40216777 kmyiu C July 12, 2018, 3:11 a.m. OK Python 3 TESTS 28 982 9932800 1400
40211351 thiagohfl C July 11, 2018, 8 p.m. OK Python 3 TESTS 28 997 10137600 1400
40218884 kobae964 C July 12, 2018, 5:06 a.m. OK Rust TESTS 28 421 113971200 1400
47490071 yakamoto C Dec. 25, 2018, 11:33 a.m. OK Scala TESTS 28 748 13414400 1400
43037861 chinying C Sept. 18, 2018, 2:20 p.m. OK Scala TESTS 28 1512 14131200 1400

remove filters

Back to search problems