結果
問題 |
No.1240 Or Sum of Xor Pair
|
ユーザー |
|
提出日時 | 2020-08-22 22:33:44 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 411 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 104,724 KB |
最終ジャッジ日時 | 2024-06-22 06:58:08 |
合計ジャッジ時間 | 3,128 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 1 WA * 29 |
ソースコード
N,X=map(int,input().split()) A=list(map(int,input().split())) def solve_brute_force(): res=0 for i in range(1,N): for j in range(i): if A[i]^A[j]<X: res+=A[i]^A[j] return res def debug(): assert(2<=N<=200000) assert(1<=X<=2**18) for i in range(N): assert(0<=A[i]<2**18) debug() if N>5000: print(0) else: print(solve_brute_force())