s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s851580311
p03607
u853900545
1539656870
Python
Python (3.4.3)
py
Runtime Error
17
2940
81
n=int(input()) s=set() for i in range(n): s^=set(int(input())) print(len(s))
s434430409
p03607
u853900545
1539656702
Python
Python (3.4.3)
py
Runtime Error
17
2940
76
n=int(input()) s=set() for i in range(n): s^=int(input()) print(len(s))
s712768248
p03607
u853900545
1539656578
Python
Python (3.4.3)
py
Runtime Error
17
2940
66
n=int(input()) s=set() for i in range(n): s^=input() print(s)
s986808863
p03607
u853900545
1539656519
Python
Python (3.4.3)
py
Runtime Error
17
2940
70
n=int(input()) s=set() for i in range(n): s^=int(input()) print(s)
s791732672
p03607
u729133443
1538542973
Python
Python (3.4.3)
py
Runtime Error
17
2940
82
d={} for _ in[0]*int(input()): i=input() d[i]=!d.get(i,0) print(sum(d.values()))
s167220604
p03607
u729133443
1538542510
Python
Python (3.4.3)
py
Runtime Error
179
15464
59
d=set() for i in[0]*int(input()):d^={input()} print(len(p))
s647064176
p03607
u932465688
1538348218
Python
Python (3.4.3)
py
Runtime Error
175
7072
238
N = int(input()) A = [int(input()) for i in range(N)] L = [0 for i in range(10*9)] for j in range(N): L[A[j]] += 1 ans = 0 for k in range(len(L)): if (L[k] == 0): None elif (L[k]%2 == 0): None else: ans += 1 print(ans)
s774277467
p03607
u932465688
1537285404
Python
Python (3.4.3)
py
Runtime Error
230
7448
154
N = int(input()) L = [int(input()) for i in range(N)] L.sort() k = 1 for i in range(len(L)): if (L[i] == L[i+1]): k -= 1 else: k += 1 print(k)
s953060350
p03607
u073775598
1536639285
Python
Python (3.4.3)
py
Runtime Error
17
2940
235
#ABC073C N=int(input()) A=[int(input()) for i in range(N)] A_sorted=sorted(A) count=1 ans=0 for i in range(N-1): if A_sorted[i]==A_sorted[i+1]: count+=1 else ans+=count%2 count=1 ans+=count%2 print(ans)
s762826135
p03607
u598167418
1536562930
Python
PyPy2 (5.6.0)
py
Runtime Error
36
27884
171
from collection import defaultdict n = input() dic = defaultdict(int) for i in range(n): z = input() dic[z] += 1 ans = 0 for i in dic: if dic[i]&1: ans += 1 print ans
s254221227
p03607
u415905784
1534385086
Python
Python (3.4.3)
py
Runtime Error
17
3060
152
N = int(input()) A = [False] * 10 ** 9 cnt = 0 for i in range(N): a = int(input()) A[a - 1] = not A[a - 1] cnt += 1 if A[a - 1] else -1 print(cnt)
s114741444
p03607
u102902647
1533892631
Python
Python (3.4.3)
py
Runtime Error
194
16612
271
# -*- coding: utf-8 -*- """ Created on Fri Aug 10 05:13:17 2018 @author: Yuki """ import collections N = int(input()) A = [int(input()) for i in range(N)] A_dict = collections.Counter(A) cnt = 0 for val in A_dict.values: if val%2==1: cnt += 1 print(cnt)
s341604956
p03607
u599547273
1533355850
Python
Python (3.4.3)
py
Runtime Error
84
23592
221
import sys n = int(input()) a = map(int, sys.stdin.read().split("\n")) # a = map(int, [input() for i in range(n)]) d = dict() for a_i in a: if a_i not in d: d[a_i] = 0 d[a_i] = (d[a_i]+1) % 2 print(sum(d.values()))
s022182439
p03607
u599547273
1533355771
Python
Python (3.4.3)
py
Runtime Error
85
23592
175
import sys n = int(input()) a = map(int, sys.stdin.read().split("\n")) d = dict() for a_i in a: if a_i not in d: d[a_i] = 0 d[a_i] = (d[a_i]+1) % 2 print(sum(d.values))
s448547316
p03607
u492532572
1531277869
Python
Python (3.4.3)
py
Runtime Error
17
3060
159
N = int(input()) aset = set() for _ in range(N): a = int(input()) if a in aset(): aset.remove(a) else: aset.add(a) print(len(aset))
s184669406
p03607
u986269893
1530657223
Python
Python (3.4.3)
py
Runtime Error
2123
323080
588
n=int(input()) list=[] a=0 b=0 def search(a,b): def loop(x,a): if x<=len(a)-1: if b==a[x]: return x else: return loop(x+1,a) else: return None return loop(0,a) def out(a,b): k=search(a,b) return a[:k]+a[k+1:] def sor...
s056082016
p03607
u986269893
1530657001
Python
Python (3.4.3)
py
Runtime Error
17
3064
587
n=int(input()) list=[] a=1 b=0 def search(a,b): def loop(x,a): if x<=len(a)-1: if b==a[x]: return x else: return loop(x+1,a) else: return None return loop(0,a) def out(a,b): k=search(a,b) return a[:k]+a[k+1:] def sor...
s065363054
p03607
u986269893
1530656569
Python
Python (3.4.3)
py
Runtime Error
2123
323080
587
n=int(input()) list=[] a=1 b=0 def search(a,b): def loop(x,a): if x<=len(a)-1: if b==a[x]: return x else: return loop(x+1,a) else: return None return loop(0,a) def out(a,b): k=search(a,b) return a[:k]+a[k+1:] def sor...
s229852224
p03607
u158635223
1529722826
Python
Python (3.4.3)
py
Runtime Error
17
3060
132
n=int(input()) a={} for i in range(n): b=int(input()) if b in a[b]: del a[b] else: a[b]=1 print(len(a))
s884615182
p03607
u624475441
1528778846
Python
Python (3.4.3)
py
Runtime Error
18
3828
157
numbers = set() for _ in [0] * int(input()): A = int(input()) if A in numbers: arr.remove(A) else: arr.add(A) print(len(numbers))
s079184954
p03607
u591295155
1525378331
Python
Python (3.4.3)
py
Runtime Error
175
7072
185
N = int(input()) A = [int(input()) for i in range(N)] b = [0]*1000000001 cnt = 0 for i in range (N): b[A[i]] += 1 for i in range (N): if b[i]%2 == 1: cnt += 1 print(cnt)
s086004496
p03607
u503901534
1524586169
Python
Python (3.4.3)
py
Runtime Error
18
3060
215
n = int(input()) nlll = {} for i in range(n): aaa = int(input()) if nlll in aaa: del aaa else: nlll.update({aaa:1}) sums = 0 for i in nlll.values(): sums = sums + i print(sums)
s559782279
p03607
u503901534
1524192493
Python
Python (3.4.3)
py
Runtime Error
17
2940
204
n = int(input()) a = [] for i in range(n): a.append(int(input())) b = list(set(a)) for i in b: if a.count(i) % 2 == 0: b.remove(i) else: None print(len(list(b))
s029281408
p03607
u597436499
1521950042
Python
Python (3.4.3)
py
Runtime Error
17
3060
607
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() a = [ni() for _ in range(n)] if n == 1: print(1) else: a.sort() count = 1 ans = 0 for i in range(1,n): if i == n-1: if a[i-...
s870590475
p03607
u867069435
1520372991
Python
Python (3.4.3)
py
Runtime Error
150
16404
85
print(len(set(list(lambda x: not x%2, set([input() for i in range(int(input()))])))))
s381135799
p03607
u813098295
1520199077
Python
Python (2.7.6)
py
Runtime Error
141
8580
161
N = int(raw_input()) A = [0] * 100001 for i in range(N): a = int(raw_input()) A[a] += 1 print sum([ 0 if A[i] % 2 == 0 else 1 for i in range(100001)])
s321736654
p03607
u557171945
1517241818
Python
Python (3.4.3)
py
Runtime Error
17
2940
153
n = int(input()) ans = [] for i in range(n): a = int(input()) if a in ans: ans.remove(a) else: ans.add(a) print(len(ans))
s341075191
p03607
u403355272
1515546074
Python
Python (3.4.3)
py
Runtime Error
18
3060
165
list = [] number = int(input()) for n in range(0, number): if number in list: list.remove(number) else : list.append(number) pass print(Len(list))
s135336958
p03607
u403355272
1515545868
Python
Python (3.4.3)
py
Runtime Error
19
3060
154
list = [] number = int(input()) for n in range(0,number): if number in list: list.remove(number) else : list.append(number) pass print(Len(list))
s558252802
p03607
u403355272
1515545619
Python
Python (3.4.3)
py
Runtime Error
20
3064
157
list = [] number = int(input()) for n in range(0,number): if number in list: list.append(number) else : list.remove(number) pass print(Len(list))
s029959667
p03607
u412116291
1515107629
Python
Python (3.4.3)
py
Runtime Error
31
3884
136
n = int(input()) di = {} for x in range(n): i = int(input()) if (i in di.keys()): di.pop() else: di[i] = i print(len(di))
s098472326
p03607
u821262411
1506945029
Python
Python (3.4.3)
py
Runtime Error
17
2940
193
n=int(input()) buff=set() for i in range(n): a=int(input()) if a in buff: buff.remove(a) else: buff.add(a) print(len(buff))
s583249946
p03607
u863076295
1506928863
Python
Python (3.4.3)
py
Runtime Error
715
12488
172
import numpy as np N = int(input()) a = np.zeros([100000]) for i in range(N): idx = int(input()) a[idx] += 1 a[idx] = a[idx]%2 ans = int(np.sum(a)) print(ans)
s472999612
p03607
u293267652
1505855179
Python
Python (3.4.3)
py
Runtime Error
17
2940
149
n = int(input()) l = set() for _ in range(n): a = int(input()) if a in l: l.remove(a) else: l.append(a) print(len(l))
s951949134
p03607
u965230804
1505680218
Python
Python (3.4.3)
py
Runtime Error
17
2940
166
n = int(input()) paper = [] for _ in range(n): p = input() if p not in paper: paper.append(p) else: paper.remove(p)] print(len(paper) - 1)
s254012002
p03607
u301823349
1505678395
Python
Python (3.4.3)
py
Runtime Error
19
3060
196
paper = [0,0,0,0,0,0,0,0,0,0] N = int(input()) for _ in range(N): number = int(input()) paper[number] += 1 sum = 0 for x in range(10): if paper[x] % 2 == 1: sum += 1 print(sum)
s696986508
p03607
u301823349
1505678260
Python
Python (3.4.3)
py
Runtime Error
17
2940
195
paper = [0,0,0,0,0,0,0,0,0,0] N = int(input()) for _ in range(N): number = int(input()) paper[number] += 1 sum = 0 for x in range(10): if paper[x] % 2 == 1 sum += 1 print(sum)
s937553924
p03607
u301823349
1505678229
Python
Python (3.4.3)
py
Runtime Error
17
2940
194
paper = [0,0,0,0,0,0,0,0,0,0] N = int(input()) for _ in range(N): number = int(input()) paper[number] += 1 sum = 0 for x in range(10) if paper[x] % 2 == 1 sum += 1 print(sum)
s375476896
p03607
u306938754
1505668768
Python
Python (2.7.6)
py
Runtime Error
13
5764
175
N = raw_input() N = int(N) a = {} for i in range(N): s_input = raw_input() s_input = int(s_input) if s_input in a: del a[s_input] else: a[s_input] += 1 print(len(a))
s562975316
p03607
u306938754
1505659619
Python
Python (2.7.6)
py
Runtime Error
10
2568
193
N = raw_input() N = int(N) a = [] for i in range(N): s_input = raw_input() s_input = int(s_input) if s_input in a: a.remove(s_input) else: a.append(s_input) a.sort() print(len(a))
s108322232
p03607
u965230804
1505602433
Python
Python (3.4.3)
py
Runtime Error
192
3864
163
TorF = [False for i in range(100000)] n = int(input()) final_writing = 0 for _ in range(n): p = int(input()) TorF[p] = not(TorF[p]) print(TorF.count(True))
s092547276
p03607
u965230804
1505602208
Python
Python (3.4.3)
py
Runtime Error
198
3864
238
TorF = [False for i in range(100000)] n = int(input()) final_writing = 0 for _ in range(n): p = int(input()) TorF[p] = not(TorF[p]) for i in range(100000): if TorF[i] == True: final_writing += 1 print(final_writing)
s217442804
p03607
u965230804
1505601782
Python
Python (3.4.3)
py
Runtime Error
197
3864
182
TorF = [False for i in range(100000)] n = int(input()) for _ in range(n): p = int(input()) TorF[p] = not(TorF[p]) for i in range(n): if TorF[i] == True: print(i)
s854936788
p03607
u841222846
1505600339
Python
Python (3.4.3)
py
Runtime Error
2139
1960284
192
import numpy as np n = int(input()) num = np.zeros(10 ** 9, dtype = bool) for i in range(n): a = int(input()) num[a] = not(num[a]) sum = np.where(num == True) print(len(sum[0]))
s150870656
p03607
u098572984
1505261005
Python
Python (3.4.3)
py
Runtime Error
1822
1011868
573
import numpy as np def getInput(): """ :return: list of list of str. 1st dim: row, 2nd dim: column. """ separator = ' ' ret_array = [] while True: try: row = input().split(sep=separator) ret_array.append(row) except EOFError: break retur...
s507094461
p03607
u679250765
1505158765
Python
Python (3.4.3)
py
Runtime Error
17
3060
157
n = int(input()) list = [] for i in range(n): a = bay(input()) if a in list: list.remove(a) else: list.append(a) print(len(list))
s903001510
p03607
u231552419
1505138863
Python
Python (3.4.3)
py
Runtime Error
32
3828
195
N = int(input()) ans = 0 nums = set([]) for _ in range(N): A = int(input()) if A in nums: ans -= 1 nums.clear(A) else: ans += 1 nums.add(A) print(ans)
s147909719
p03607
u791838908
1505078369
Python
Python (3.4.3)
py
Runtime Error
172
7072
196
n = int(input()) A = [int(input()) for i in range(n)] B = set() lenB = 0 for a in A: if a in B: B.remove(a) lenB -= 1 else: b.add(a) lenB += 1 print(lenB)
s158901974
p03607
u536222831
1505065570
Python
Python (3.4.3)
py
Runtime Error
2104
11040
442
# coding: utf-8 import sys def main(): a = [] b = [] countNum = 0 N = input() for i in range(int(N)): a.append(input()) b=a[:] for j,num in enumerate(a): for k in range(j+1,int(N)): if k<int(N): if a[k]==num: b.pop(j) ...
s202082463
p03607
u536222831
1505065376
Python
Python (3.4.3)
py
Runtime Error
1448
145868
517
# coding: utf-8 import sys def main(): a = [] b = [] countNum = 0 N = input() for i in range(int(N)): a.append(input()) print(a) b=a[:] for j,num in enumerate(a): for k in range(j+1,int(N)): if k<int(N): print(k) print(a) ...
s015338880
p03607
u108617242
1505011109
Python
Python (3.4.3)
py
Runtime Error
191
3888
181
N = int(input()) Ex = [False for i in range(100001)] for i in range(N): A = int(input()) Ex[A] = not Ex[A] count = 0 for tf in range(100001): if Ex[tf]: count += 1 print(count)
s112803520
p03607
u865646085
1505011045
Python
Python (3.4.3)
py
Runtime Error
17
3060
169
list = [] n = int(input()) for i in xrange(n): add = int(input()) if(add in list): list.remove(add) else: list.append(add) print(len(list))
s105697500
p03607
u238696407
1505010813
Python
Python (3.4.3)
py
Runtime Error
2104
6292
479
li = [] for i in range(int(input())): num = int(input()) if len(li) == 0: li.append(num) else: lo, hi = 0, len(li)-1 while lo <= hi: mid = int((lo+hi)/2) if num == li[mid]: li.remove(num) lo = hi+1000 elif num > li[mid]: lo = mid+1 a = True else:...
s918644758
p03607
u741323288
1505010765
Python
Python (3.4.3)
py
Runtime Error
17
3064
688
import math def BS(array, TARGET): low = 0 high = len(array) isFound = False while (low != high): # 検索したい値が存在しない場合は終了 center = math.floor((low + high) / 2) if (array[center] < TARGET): low = center + 1 elif (TARGET < array[center]): high = center else: #print(array[center], center) isFound =...
s994323094
p03607
u865646085
1505010204
Python
Python (3.4.3)
py
Runtime Error
17
2940
150
list = [] n = input() for i range n: add = input() if(add in list): del list(add) else: list.append(add) print(len(list))
s183041210
p03607
u816428863
1505010197
Python
Python (3.4.3)
py
Runtime Error
185
3060
242
# coding: utf-8 # Here your code ! list = [] for i in range(1000): list.append(0) N = int(input()) for i in range(N): a = int(input()) if list[a - 1] == 0: list[a-1] = 1 else: list[a-1] = 0 print(list.count(1))
s397816679
p03607
u665415433
1505010105
Python
Python (3.4.3)
py
Runtime Error
2104
3700
186
N = int(input()) ans = [] for i in range(N): num = int(input()) check = ans.count(num) if check == 0: ans.append(num) else: ans.pop(check) print(len(ans))
s999299028
p03607
u662514021
1505009919
Python
Python (3.4.3)
py
Runtime Error
2104
3188
260
N = int(input()) x=int(input()) y=[x] for i in range(1,N): x=int(input()) a=0 flag=1 while a < i: if y[a]==x: del y[a] flag=-1 break a+=1 if flag==1: y.append(x) print(len(y))
s978381947
p03607
u803848678
1505009879
Python
Python (3.4.3)
py
Runtime Error
16
2940
136
n = int(input()) a = [] for i in range(n): a.append(int(input()) ans = 0 for i in set(a): if i in a: ans += 1 print(ans)
s648284883
p03607
u791838908
1505009876
Python
Python (3.4.3)
py
Runtime Error
170
7072
178
n = int(input()) A = [int(input()) for i in range(n)] b = list() for a in A: b.add(a) if len(set(b)) != len(b): b.pop(-1) b.remove(a) print(len(b))
s726026988
p03607
u665415433
1505009841
Python
Python (3.4.3)
py
Runtime Error
2104
3188
304
N = int(input()) ans = [] check = 0 for i in range(N): num = int(input()) for n in range(len(ans)): if ans[n] == num: check = -1 break else: check = n if check == -1: ans.remove(num) else: ans.append(num) print(len(ans))
s861728577
p03607
u493221626
1505009261
Python
Python (3.4.3)
py
Runtime Error
180
17888
220
# coding;utf-8 n=int(input()) ans_dict={} for i in range(0, n): a=input() if not a in ans_dict: ans_dict[a]=1 else: ans_dict[a]+=1 sum=0 for thing in ans_dict: if thing%2: sum+=0
s276577755
p03607
u791838908
1505009260
Python
Python (3.4.3)
py
Runtime Error
2111
7072
193
n = int(input()) A = [int(input()) for i in range(n)] counter = [0]*max(A) cnt = 0 for a in A: counter[a-1] += 1 for c in counter: if c % 2 == 0 & c != 0: cnt += 1 print(cnt)
s547792671
p03607
u791838908
1505008962
Python
Python (3.4.3)
py
Runtime Error
174
7072
196
n = int(input()) A = [int(input()) for i in range(n)] counter = [0]*1000000000 cnt = 0 for a in A: counter[a-1] += 1 for c in counter: if c % 2 == 0 & c != 0: cnt += 1 print(cnt)
s935483330
p03607
u471797506
1505008662
Python
Python (2.7.6)
py
Runtime Error
10
2568
200
import defaultdict from collections N = int(raw_input()) d = defaultdict(int) for i in xrange(N): A = int(raw_input()) d[A] = (d[A] + 1) % 2 ans = 0 for v in d.values(): ans += v print ans
s477068774
p03607
u794543767
1505008533
Python
Python (3.4.3)
py
Runtime Error
147
12488
268
import numpy as np hoge = input() N = int(hoge) paper = set([]) for i in range(N): hoge = input() hoge = hoge.strip() if paper.issuperset(hoge): paper = paper - set([hoge]) else: paper = paper + set([hoge]) print(len(paper))
s511131627
p03607
u174028570
1505008423
Python
Python (3.4.3)
py
Runtime Error
17
3060
301
n=int(input()) A=[] count=0 for i in range(n): number=int(input()) j=0 while not j<len(A): if not A[j]==number: j+=1 else: break if j<n: del A[j] count-=1 else: A.append(number) count+=1 print(count,end='')
s304386134
p03607
u136090046
1505008416
Python
Python (3.4.3)
py
Runtime Error
18
3060
384
def duplicate_check(value, value_list): if value_list.count(value) == 2: while value in value_list: value_list.remove(value) return ()value_list value_list = [] result_list = [] while True: try: number_of_test = int(input()) value = int(input() value_list.append(value) result_list = duplicate_check(value,...
s909177374
p03607
u867069435
1505008345
Python
Python (3.4.3)
py
Runtime Error
16
2940
155
ans = [] i = 0 for i in range(int(input()): now = input() if now in ans: ans.remove(now) else: ans.append(now) print(len(ans))
s507438740
p03607
u174028570
1505008333
Python
Python (3.4.3)
py
Runtime Error
17
3060
253
n=int(input()) A=[] count=0 for i in range(n): number=int(input()) j=0 while not j<len(A) and A[j]==number: j+=1 if j<n: del A[j] count-=1 else: A.append(number) count+=1 print(count,end='')
s697276872
p03607
u174028570
1505008229
Python
Python (3.4.3)
py
Runtime Error
17
3060
253
n=int(input()) A=[] count=0 for i in range(n): number=int(input()) j=0 while not A[j]==number and j<len(A): j+=1 if j<n: del A[j] count-=1 else: A.append(number) count+=1 print(count,end='')
s799081273
p03607
u318073603
1505007504
Python
Python (3.4.3)
py
Runtime Error
17
3060
178
N = int(input()) list = [] for i in range(N): number = int(input()) if number in list: list.append(number) else: list.remove(number) print(len(list))
s732715466
p03607
u791664126
1505007235
Python
Python (3.4.3)
py
Runtime Error
17
3060
155
l=int(input()) list=[0]*1000000000 for i in range(l): a=input() if list[a]==1: list[a]=0 else: list[a]=1 print(list.count(1))
s550226922
p03607
u731291894
1505007222
Python
Python (3.4.3)
py
Runtime Error
187
3864
198
# coding: utf-8 A = [False for i in range(100000+1)] N = int(input()) for i in range(N): a = int(input()) if A[a]: A[a] = False else: A[a] = True print(A.count(True))
s922267619
p03607
u946386741
1505007210
Python
Python (3.4.3)
py
Runtime Error
2124
498968
136
N = int(input()) A = [int(input()) for n in range(N)] L = [False for i in range(max(A))] for a in A: L[a] = not L[a] print(sum(L))
s962063622
p03607
u741323288
1505007041
Python
Python (3.4.3)
py
Runtime Error
2112
139672
748
def quicksort(seq): if len(seq) < 1: return seq pivot = seq[0] left = [] right = [] for x in range(1, len(seq)): if seq[x] <= pivot: left.append(seq[x]) else: right.append(seq[x]) left = quicksort(left) right = quicksort(right) foo = [pivot] return left + foo + right N = int(input()) array = [] f...
s006945019
p03607
u662514021
1505006311
Python
Python (3.4.3)
py
Runtime Error
194
7840
200
N = int(input()) x = [int(input()) for i in range(N)] y=[0]*(100000+1) for i in range(N): if y[x[i]]==0: y[x[i]]=1 else: y[x[i]]=0 sum=0 for i in y: sum+=i print(sum)
s185840823
p03607
u216954900
1505006295
Python
Python (3.4.3)
py
Runtime Error
2106
413572
251
# -*- coding: utf-8 -*- import os import sys import math import numpy as np N = int(input()) A = np.array([int(input()) for i in range(N)]) counter = np.zeros(np.max(A)+1) for a in A: counter[a] += 1 counter %= 2 print(int(np.sum(counter)))
s047730167
p03607
u946386741
1505006161
Python
Python (3.4.3)
py
Runtime Error
180
7840
138
N = int(input()) L = [False for i in range(100001)] A = [int(input()) for n in range(N)] for a in A: L[a] = not L[a] print(sum(L))
s074491560
p03607
u946386741
1505006128
Python
Python (3.4.3)
py
Runtime Error
181
7880
138
N = int(input()) L = [False for i in range(100000)] A = [int(input()) for n in range(N)] for a in A: L[a] = not L[a] print(sum(L))
s158359519
p03607
u346222974
1505005972
Python
Python (3.4.3)
py
Runtime Error
210
11884
133
n = int(input()) m = set() while n: x = int(input()) if x in m: m.remove(x) else: m.add(x) print(len(m))
s621481867
p03607
u539953365
1505005959
Python
Python (3.4.3)
py
Runtime Error
135
3060
157
N = int(input()) writing = [0 for i in range(1 << 9)] for n in range(N): A = int(input()) - 1 writing[A] += 1 writing[A] %= 2 print(sum(writing))
s853008390
p03607
u768951609
1505005860
Python
Python (2.7.6)
py
Runtime Error
10
2568
109
N=int(raw_input()) n=[0]*(10**9+1) for i in range(N): a=int(raw_input()) n[a]^=1 print n.count(1)
s161257244
p03607
u906129425
1505005833
Python
Python (3.4.3)
py
Runtime Error
207
11884
133
s = set() n = int(input()) for _ in range(n): x = int(input()) if x in s: s.remove(x) else: s.add(x) print(len(x))
s706530923
p03607
u050708958
1505005595
Python
Python (3.4.3)
py
Runtime Error
18
3060
121
n = int(input()) a = [] for _ in n: i = int(input()) if i in n: a.remove(i) else: a.append(i) print(len(a))
s598806229
p03608
u587589241
1600278475
Python
Python (3.8.2)
py
Runtime Error
2206
9668
551
n,m,r=map(int,input().split()) road=list(map(int,input().split())) cost=[[float("inf")]*n for i in range(n)] for i in range(m): cost[i][i]=0 a,b,c=map(int,input().split()) a,b=a-1,b-1 cost[a][b]=c cost[b][a]=c for k in range(n): for i in range(n): for j in range(n): cost[i][j...
s489102548
p03608
u587589241
1600278284
Python
Python (3.8.2)
py
Runtime Error
2206
9764
551
n,m,r=map(int,input().split()) road=list(map(int,input().split())) cost=[[float("inf")]*n for i in range(n)] for i in range(n): cost[i][i]=0 a,b,c=map(int,input().split()) a,b=a-1,b-1 cost[a][b]=c cost[b][a]=c for k in range(n): for i in range(n): for j in range(n): cost[i][j...
s353604705
p03608
u423624748
1598649740
Python
PyPy3 (7.3.0)
py
Runtime Error
242
80628
800
from collections import deque INF = 10**12+7 N,M,R = map(int,input().split()) r = list(map(str,input().split())) d = [[INF]*(N+1) for _ in range(N+1)] for _ in range(M): A,B,C = map(int,input().split()) d[A][B] = C d[B][A] = C for i in range(1,N+1): d[i][i] = 0 for k in range(1,N+1): for i in range(...
s888475850
p03608
u192154323
1598451324
Python
Python (3.8.2)
py
Runtime Error
2206
41336
753
from itertools import permutations n_node, n_edge, R = map(int,input().split()) r_ls = list(map(int,input().split())) for i in range(R): r_ls[i] -= 1 ad_mat = [[float('inf')]*n_edge for _ in range(n_node)] for i in range(n_node): ad_mat[i][i] = 0 for i in range(n_edge): a,b,c = map(int,input().split()) ...
s850581452
p03608
u888337853
1597516840
Python
Python (3.8.2)
py
Runtime Error
22
8968
7
asergae
s281930072
p03608
u935558307
1597284496
Python
PyPy3 (7.3.0)
py
Runtime Error
369
144152
644
from itertools import permutations N,M,R = map(int,input().split()) RList = list(map(int,input().split())) dp = [[[float("INF")]*(N+1) for _ in range(N+1)]for _ in range(N+1)] for i in range(N+1): dp[i][i] = 0 for _ in range(M): a,b,c = map(int,input().split()) dp[a][b] = c dp[b][a] = c for i in range(...
s565065652
p03608
u790710233
1597021624
Python
PyPy3 (7.3.0)
py
Runtime Error
170
68564
944
import heapq from itertools import permutations n, m, r = map(int, input().split()) R = list(map(lambda x: int(x)-1, input().split())) edges = [[]for _ in range(n)] for _ in range(m): a, b, c = map(int, input().split()) edges[a].append((c, b-1)) edges[b].append((c, a-1)) def dijkstra(init_v): next_v =...
s136035229
p03608
u644907318
1595420413
Python
PyPy3 (7.3.0)
py
Runtime Error
233
77980
1069
from itertools import permutations INFTY = 10**8 N,M,R = map(int,input().split()) r = list(map(int,input().split())) G = {i:[] for i in range(1,N+1)} for _ in range(M): a,b,c = map(int,input().split()) G[a].append((b,c)) G[b].append((a,c)) dist = [[INFTY for _ in range(N+1)] for _ in range(N+1)] for i in ra...
s329459517
p03608
u644907318
1595420257
Python
PyPy3 (7.3.0)
py
Runtime Error
236
78160
969
from itertools import permutations INFTY = 10**8 N,M,R = map(int,input().split()) r = list(map(int,input().split())) G = {i:[] for i in range(1,N+1)} for _ in range(M): a,b,c = map(int,input().split()) G[a].append((b,c)) G[b].append((a,c)) dist = [[INFTY for _ in range(N+1)] for _ in range(N+1)] for i in ra...
s428228829
p03608
u127499732
1593023110
Python
PyPy2 (7.3.0)
py
Runtime Error
402
85184
896
import sys read = sys.stdin.read from itertools import permutations def main(): def warshall_floyd(d): for k in range(n): for i in range(n): for j in range(n): d[i][j] = min(d[i][j], d[i][k] + d[k][j]) return d n, m, r = map(int, input().split())...
s098909296
p03608
u127499732
1593020066
Python
Python (3.8.2)
py
Runtime Error
2195
14540
824
def main(): from itertools import permutations n, m, r, *x = map(int, open(0).read().split()) to = x[:r] dis = [[float("Inf")] * (n + 1) for _ in range(n + 1)] for i in range(1, n + 1): dis[i][i] = 0 for a, b, c in zip(*[iter(x[r:])] * 3): dis[a][b] = c dis[b][a] = c ...
s388169908
p03608
u912599273
1591733373
Python
Python (3.4.3)
py
Runtime Error
17
2940
1153
import java.util.*; public class Main { static boolean[] used; static int[] r; static int[][] d; static int INF = Integer.MAX_VALUE/2, R; static long ans = INF; static void dfs(int now, long cost, int cnt) { if(cnt == R) { ans = Math.min(ans, cost); return; } for(int i : r) if(!used[i]) { u...
s842075435
p03608
u580107740
1591409277
Python
PyPy3 (2.4.0)
py
Runtime Error
525
68316
873
from sys import stdin import collections import math n,m,r = [int(x) for x in stdin.readline().rstrip().split()] r_arr = [int(x) for x in stdin.readline().rstrip().split()] ways = [[int(c) for c in stdin.readline().rstrip().split()] for _ in range(m)] cost = [[float("inf") for j in range(n)] for i in range(n)] fo...
s302505780
p03608
u858742833
1590810856
Python
Python (3.4.3)
py
Runtime Error
140
6736
967
from itertools import permutations import heapq def dijkstra(N, G, s): INF = 10**40 d = [INF] * N d[s] = 0 q = [(0, s)] while q: c, v = heapq.heappop(q) if d[v] < c: continue for t, co in G[v]: if d[v] + co < d[t]: d[t] = d[v] + co ...
s910769388
p03608
u858742833
1590810728
Python
Python (3.4.3)
py
Runtime Error
140
6864
960
from itertools import permutations import heapq def dijkstra(N, G, s): INF = 10**40 d = [INF] * N d[s] = 0 q = [(0, s)] while q: c, v = heapq.heappop(q) if d[v] < c: continue for t, co in G[v]: if d[v] + co < d[t]: d[t] = d[v] + co ...