Submission #3764889


Source Code Expand

def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
import math
import bisect
n=i1()
a=i2()
b=i2()
if max(max(a),max(b)):
 K=18
 j=0
 for k in range(K+1):
  bb=[]
  for i in range(len(b)):
   bb.append(b[i]%(2**(k+1)))
  bb.sort()
  jj=0
  for i in a:
   x=i%(2**(k+1))
   jj+=(bisect.bisect_left(bb, 2**(k+1)-x)-bisect.bisect_left(bb, 2**k-x))
   jj+=(bisect.bisect_left(bb, (2**k)*4-x)-bisect.bisect_left(bb, (2**k)*3-x))
  
  j+=(jj%2)*(2**k)
 print(j)
else:
 print(0)

Submission Info

Submission Time
Task D - Two Sequences
User tacloth
Language PyPy3 (2.4.0)
Score 0
Code Size 528 Byte
Status WA
Exec Time 3161 ms
Memory 127004 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 500
Status
AC × 4
AC × 6
WA × 2
TLE × 8
Set Name Test Cases
Sample example_0, example_1, example_2, example_3
All N100000_0, N100000_1, N150000_0, N150000_1, N200000_0, N200000_1, N200000_ex_0, N200000_ex_1, example_0, example_1, example_2, example_3, rand_0, rand_1, smallrand_0, smallrand_1
Case Name Status Exec Time Memory
N100000_0 TLE 3161 ms 100368 KB
N100000_1 TLE 3160 ms 107116 KB
N150000_0 TLE 3160 ms 119680 KB
N150000_1 TLE 3160 ms 120272 KB
N200000_0 TLE 3160 ms 127004 KB
N200000_1 TLE 3161 ms 126212 KB
N200000_ex_0 TLE 3161 ms 126212 KB
N200000_ex_1 TLE 3161 ms 126212 KB
example_0 AC 159 ms 38256 KB
example_1 AC 161 ms 38256 KB
example_2 AC 161 ms 38256 KB
example_3 AC 157 ms 38256 KB
rand_0 WA 479 ms 52952 KB
rand_1 WA 682 ms 54008 KB
smallrand_0 AC 162 ms 38256 KB
smallrand_1 AC 167 ms 38256 KB