QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#477963 | #1176. Binomial | kangkunma | WA | 13ms | 18520kb | Python3 | 447b | 2024-07-14 14:18:41 | 2024-07-14 14:18:42 |
Judging History
answer
def s(l):
B=[[]for _ in range(20)];A=0;N=[0]*1000001;p=set(l[::])
for i in l:
x=i;N[i]+=1
for j in range(20):B[j]+=[i]*(x%2<1);x//=2
for i in range(20): B[i]=set(B[i])
for i in l:
x=i;t=p
for j in range(20):
if x%2<1:t&=B[j]
x//=2
A+=sum([N[k] for k in t])
return A
for _ in range(int(input())):
input();l=[*map(int,input().split())];print(s(l))
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 13ms
memory: 18520kb
input:
2 3 1 5 6 3 1 1 1
output:
2 9
result:
wrong answer 1st numbers differ - expected: '4', found: '2'