QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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))
詳細信息
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'