Codeforces Round 672 (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
1420 Codeforces Round 672 (Div. 2) FINISHED False 7200 136221863 Sept. 24, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 27036 ) B Rock and Lever PROGRAMMING bitmasks math

B'You must block the canal. With a rock. I will not give the rock to you." Danik urgently needs rock and lever! Obviously, the easiest way to get these things is to ask Hermit Lizard for them. Hermit Lizard agreed to give Danik the lever. But to get a stone, Danik needs to solve the following task. You are given a positive integer n , and an array a of positive integers. The task is to calculate the number of such pairs (i,j) that i<j and a_i & a_j ge a_i oplus a_j , where & denotes the bitwise AND operation, and oplus denotes the bitwise XOR operation. Danik has solved this task. But can you solve it? Each test contains multiple test cases. The first line contains one positive integer t ( 1 <= t <= 10 ) denoting the number of test cases. Description of the test cases follows. The first line of each test case contains one positive integer n ( 1 <= n <= 10^5 ) -- length of the array. The second line contains n positive integers a_i ( 1 <= a_i <= 10^9 ) -- elements of the array. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For every test case print one non-negative integer -- the answer to the problem. In the first test case there is only one pair: (4,7) : for it 4 & 7 = 4 , and 4 oplus 7 = 3 . In the second test case all pairs are good. In the third test case there are two pairs: (6,5) and (2,3) . In the fourth test case there are no good pairs. '...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
93747380 Wenbo888 B Sept. 25, 2020, 4:02 a.m. OK GNU C11 TESTS 32 46 0
93748991 Edd1e0_0 B Sept. 25, 2020, 4:36 a.m. OK GNU C11 TESTS 32 46 0
93733884 guidanoli B Sept. 24, 2020, 8:55 p.m. OK GNU C11 TESTS 32 46 0
93747174 cychien B Sept. 25, 2020, 3:58 a.m. OK GNU C11 TESTS 32 46 0
93745677 Velscode B Sept. 25, 2020, 3:27 a.m. OK GNU C11 TESTS 32 46 409600
93748043 QAQ_hua B Sept. 25, 2020, 4:17 a.m. OK GNU C11 TESTS 32 46 819200
93724005 yucel B Sept. 24, 2020, 6:22 p.m. OK GNU C11 TESTS 32 46 819200
93728426 fruko_gazoz B Sept. 24, 2020, 7:13 p.m. OK GNU C11 TESTS 32 46 819200
93738501 kkakioi B Sept. 24, 2020, 11:53 p.m. OK GNU C++11 TESTS 32 31 0
93740955 STDquantum B Sept. 25, 2020, 1:27 a.m. OK GNU C++11 TESTS 32 31 0
93739873 SuperTNT B Sept. 25, 2020, 12:51 a.m. OK GNU C++11 TESTS 32 31 0
93742206 I_love_redpea B Sept. 25, 2020, 2:04 a.m. OK GNU C++11 TESTS 32 31 512000
93742510 Daniel-Y B Sept. 25, 2020, 2:11 a.m. OK GNU C++11 TESTS 32 31 819200
93741080 WaluntOvO B Sept. 25, 2020, 1:32 a.m. OK GNU C++11 TESTS 32 31 3993600
93750572 mynamemosta B Sept. 25, 2020, 5:05 a.m. OK GNU C++11 TESTS 32 46 0
93747817 HHHEN B Sept. 25, 2020, 4:12 a.m. OK GNU C++11 TESTS 32 46 0
93753612 div24ever B Sept. 25, 2020, 5:54 a.m. OK GNU C++11 TESTS 32 46 0
93753559 div24ever B Sept. 25, 2020, 5:53 a.m. OK GNU C++11 TESTS 32 46 0
93737343 siddhugzp B Sept. 24, 2020, 10:56 p.m. OK GNU C++14 TESTS 32 46 0
93753207 himanshu7524 B Sept. 25, 2020, 5:47 a.m. OK GNU C++14 TESTS 32 46 0
93738141 SuperJ6 B Sept. 24, 2020, 11:36 p.m. OK GNU C++14 TESTS 32 46 0
93738296 auddl0756 B Sept. 24, 2020, 11:44 p.m. OK GNU C++14 TESTS 32 46 0
93738299 Rebro B Sept. 24, 2020, 11:44 p.m. OK GNU C++14 TESTS 32 46 0
93745074 742949301 B Sept. 25, 2020, 3:15 a.m. OK GNU C++14 TESTS 32 46 0
93745599 ylycjh B Sept. 25, 2020, 3:25 a.m. OK GNU C++14 TESTS 32 46 0
93750155 gkftndlTek B Sept. 25, 2020, 4:57 a.m. OK GNU C++14 TESTS 32 46 0
93752364 dr123 B Sept. 25, 2020, 5:34 a.m. OK GNU C++14 TESTS 32 46 204800
93753932 kiloveice B Sept. 25, 2020, 5:58 a.m. OK GNU C++14 TESTS 32 46 204800
93751462 raghav_chadha B Sept. 25, 2020, 5:20 a.m. OK GNU C++17 TESTS 32 46 0
93751429 anup_coder B Sept. 25, 2020, 5:19 a.m. OK GNU C++17 TESTS 32 46 0
93746269 xyqkoala B Sept. 25, 2020, 3:39 a.m. OK GNU C++17 TESTS 32 46 0
93745125 Shineheart B Sept. 25, 2020, 3:16 a.m. OK GNU C++17 TESTS 32 46 0
93744184 vik_nash B Sept. 25, 2020, 2:54 a.m. OK GNU C++17 TESTS 32 46 0
93743829 rushi_patel11111 B Sept. 25, 2020, 2:46 a.m. OK GNU C++17 TESTS 32 46 0
93741542 ULTRON19 B Sept. 25, 2020, 1:45 a.m. OK GNU C++17 TESTS 32 46 0
93741174 soimportant B Sept. 25, 2020, 1:35 a.m. OK GNU C++17 TESTS 32 46 0
93740010 MIG29 B Sept. 25, 2020, 12:56 a.m. OK GNU C++17 TESTS 32 46 0
93738589 keyihuang13 B Sept. 24, 2020, 11:58 p.m. OK GNU C++17 TESTS 32 46 0
93744399 heyuhhh B Sept. 25, 2020, 2:59 a.m. OK GNU C++17 (64) TESTS 32 31 409600
93742029 m.hasan01 B Sept. 25, 2020, 1:59 a.m. OK GNU C++17 (64) TESTS 32 46 0
93744758 smax B Sept. 25, 2020, 3:08 a.m. OK GNU C++17 (64) TESTS 32 46 0
93746522 Jo3kerR B Sept. 25, 2020, 3:44 a.m. OK GNU C++17 (64) TESTS 32 46 0
93746636 kakaolala B Sept. 25, 2020, 3:46 a.m. OK GNU C++17 (64) TESTS 32 46 0
93747619 jaga__daku B Sept. 25, 2020, 4:08 a.m. OK GNU C++17 (64) TESTS 32 46 0
93747776 anishpathak121 B Sept. 25, 2020, 4:11 a.m. OK GNU C++17 (64) TESTS 32 46 0
93748139 roastedcoder B Sept. 25, 2020, 4:19 a.m. OK GNU C++17 (64) TESTS 32 46 0
93749646 R.Anwar B Sept. 25, 2020, 4:48 a.m. OK GNU C++17 (64) TESTS 32 46 0
93742927 Jame___boy B Sept. 25, 2020, 2:23 a.m. OK GNU C++17 (64) TESTS 32 46 0
93728112 Aidar.Babanov B Sept. 24, 2020, 7:09 p.m. OK Go TESTS 32 108 409600
93751622 kunalkatiyar9 B Sept. 25, 2020, 5:23 a.m. OK Java 11 TESTS 32 187 0
93745421 skittles1412 B Sept. 25, 2020, 3:22 a.m. OK Java 11 TESTS 32 187 0
93732062 master__yi B Sept. 24, 2020, 8:15 p.m. OK Java 11 TESTS 32 187 0
93741894 qlf9 B Sept. 25, 2020, 1:55 a.m. OK Java 11 TESTS 32 202 0
93739708 dakshkamboj B Sept. 25, 2020, 12:43 a.m. OK Java 11 TESTS 32 202 0
93729146 Elgeziry B Sept. 24, 2020, 7:23 p.m. OK Java 11 TESTS 32 202 0
93723405 gssakash B Sept. 24, 2020, 6:17 p.m. OK Java 11 TESTS 32 202 0
93714843 saumya221101 B Sept. 24, 2020, 4:27 p.m. OK Java 11 TESTS 32 202 0
93731404 dkcs B Sept. 24, 2020, 8:02 p.m. OK Java 11 TESTS 32 217 0
93735528 alimodassir B Sept. 24, 2020, 9:42 p.m. OK Java 11 TESTS 32 218 0
93752899 tirth9960 B Sept. 25, 2020, 5:42 a.m. OK Java 8 TESTS 32 124 0
93751111 zayn8917 B Sept. 25, 2020, 5:14 a.m. OK Java 8 TESTS 32 124 0
93745611 Pranay2516 B Sept. 25, 2020, 3:25 a.m. OK Java 8 TESTS 32 124 0
93743386 adarsh_goku B Sept. 25, 2020, 2:35 a.m. OK Java 8 TESTS 32 124 0
93743058 adarsh_goku B Sept. 25, 2020, 2:26 a.m. OK Java 8 TESTS 32 124 0
93752109 mayank_1846 B Sept. 25, 2020, 5:30 a.m. OK Java 8 TESTS 32 140 0
93744554 ravidbg28 B Sept. 25, 2020, 3:03 a.m. OK Java 8 TESTS 32 140 0
93741416 nuchenghao B Sept. 25, 2020, 1:42 a.m. OK Java 8 TESTS 32 140 0
93730735 kbadrinath B Sept. 24, 2020, 7:49 p.m. OK Java 8 TESTS 32 140 0
93730662 V---------V B Sept. 24, 2020, 7:48 p.m. OK Java 8 TESTS 32 140 0
93752497 Spheniscine B Sept. 25, 2020, 5:36 a.m. OK Kotlin TESTS 32 140 0
93711910 scka B Sept. 24, 2020, 4:19 p.m. OK MS C++ 2017 TESTS 32 62 819200
93731026 Wolf_Cub B Sept. 24, 2020, 7:55 p.m. OK MS C++ 2017 TESTS 32 93 409600
93714366 Master_Hleb B Sept. 24, 2020, 4:26 p.m. OK MS C++ 2017 TESTS 32 108 0
93712669 dbsthdud918 B Sept. 24, 2020, 4:21 p.m. OK MS C++ 2017 TESTS 32 109 0
93713251 MKSA0000 B Sept. 24, 2020, 4:22 p.m. OK MS C++ 2017 TESTS 32 124 0
93713786 544432 B Sept. 24, 2020, 4:24 p.m. OK MS C++ 2017 TESTS 32 124 819200
93728477 EvgeniusASPX B Sept. 24, 2020, 7:14 p.m. OK MS C++ 2017 TESTS 32 124 13619200
93748921 songjunwei B Sept. 25, 2020, 4:34 a.m. OK MS C++ 2017 TESTS 32 140 819200
93726034 explorer_sifat B Sept. 24, 2020, 6:42 p.m. OK Node.js TESTS 32 155 13209600
93721313 beethoven97 B Sept. 24, 2020, 6:04 p.m. OK PyPy 2 TESTS 32 124 6451200
93734325 sagarpandey7742 B Sept. 24, 2020, 9:06 p.m. OK PyPy 2 TESTS 32 155 6963200
93734381 sagarpandey7742 B Sept. 24, 2020, 9:08 p.m. OK PyPy 2 TESTS 32 171 6963200
93752064 kaleabasfaw2010 B Sept. 25, 2020, 5:30 a.m. OK PyPy 3 TESTS 32 186 8704000
93723312 manhar B Sept. 24, 2020, 6:16 p.m. OK PyPy 3 TESTS 32 187 8396800
93734855 sagarpandey7742 B Sept. 24, 2020, 9:20 p.m. OK PyPy 3 TESTS 32 202 9625600
93728049 Anuranjan_Pandey B Sept. 24, 2020, 7:08 p.m. OK PyPy 3 TESTS 32 217 8908800
93731209 1253rohit B Sept. 24, 2020, 7:58 p.m. OK PyPy 3 TESTS 32 218 10956800
93744931 Why_WA B Sept. 25, 2020, 3:12 a.m. OK PyPy 3 TESTS 32 233 10240000
93738795 thnkndblv B Sept. 25, 2020, 12:08 a.m. OK PyPy 3 TESTS 32 233 10547200
93733657 Diamantis B Sept. 24, 2020, 8:49 p.m. OK PyPy 3 TESTS 32 233 10854400
93739767 Code_Breaker B Sept. 25, 2020, 12:45 a.m. OK PyPy 3 TESTS 32 233 11161600
93716617 satyammishra37953 B Sept. 24, 2020, 4:32 p.m. OK PyPy 3 TESTS 32 233 11264000
93750554 Deependra_coder B Sept. 25, 2020, 5:05 a.m. OK Python 3 TESTS 32 155 8294400
93742577 mlycheetv B Sept. 25, 2020, 2:13 a.m. OK Python 3 TESTS 32 155 8806400
93722448 sh1194 B Sept. 24, 2020, 6:10 p.m. OK Python 3 TESTS 32 171 8396800
93733003 tamahom B Sept. 24, 2020, 8:34 p.m. OK Python 3 TESTS 32 171 8806400
93723414 arvind_241999 B Sept. 24, 2020, 6:17 p.m. OK Python 3 TESTS 32 187 8396800
93745929 _DON_ B Sept. 25, 2020, 3:32 a.m. OK Python 3 TESTS 32 187 8806400
93748048 noisegain B Sept. 25, 2020, 4:17 a.m. OK Python 3 TESTS 32 202 7372800
93723936 ukr2002 B Sept. 24, 2020, 6:21 p.m. OK Python 3 TESTS 32 202 7884800
93725007 aanchaltiwari__ B Sept. 24, 2020, 6:31 p.m. OK Python 3 TESTS 32 202 8396800
93724510 garg11 B Sept. 24, 2020, 6:26 p.m. OK Python 3 TESTS 32 202 8396800
93738191 o2c B Sept. 24, 2020, 11:38 p.m. OK Rust TESTS 32 31 3891200
93737917 sansen B Sept. 24, 2020, 11:25 p.m. OK Rust TESTS 32 46 2150400
93721582 IvanDyachenko B Sept. 24, 2020, 6:05 p.m. OK Scala TESTS 32 530 5939200

remove filters

Back to search problems