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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s105577904 | p03848 | u923712635 | 1561564771 | Python | PyPy3 (2.4.0) | py | Runtime Error | 217 | 55532 | 422 | N = int(input())
A = [int(x) for x in input().split()]
mod = 10**9+7
c = 1-N%2
flag = True
di = {}
for i in A:
if(i not in di):
di[i]=1
else:
di[i]+=1
for i in range(N//2):
if(i+c==0):
flag &= (di[i]==1)
else:
flag &= (di[i*2+c]==2)
if(not flag):
if(N==1):
... |
s924951352 | p03848 | u854831509 | 1560833826 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1044 | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll mod=1e9+7;
int dy[]={1,-1,0,0};
int dx[]={0,0,1,-1};
int main(){
int N;
cin>>N;
vector<int> a(N);
for(int i=0;i<N;i++){
cin>>a[i];
}
//整合性チェック
int guki=N%2;
vector<int> num((N+1)/2,0);
bool flag=true;
for(int i=0;i<N;i++... |
s261151139 | p03848 | u551909378 | 1559334015 | Python | Python (3.4.3) | py | Runtime Error | 90 | 13880 | 453 | N = int(input())
A = sorted([int(x) for x in input().split()])
def check():
if N % 2 == 0:
for i in range(1,N)[::2]:
if A[i-1] != i or A[i] != i: return 0
return int(2**(N/2)) % (1e9+7)
else:
if A[0] != 0: return 0
else:
for i in range(2,N)[::2]:
... |
s260171310 | p03848 | u551909378 | 1559333439 | Python | Python (3.4.3) | py | Runtime Error | 90 | 13880 | 436 | N = int(input())
A = sorted([int(x) for x in input().split()])
def check():
if N % 2 == 0:
for i in range(1,N)[::2]:
if A[i-1] != i or A[i] != i: return 0
return (2**(N/2)) % (1e9+7)
else:
if A[0] != 0: return 0
else:
for i in range(2,N)[::2]:
... |
s180812811 | p03848 | u785578220 | 1559274102 | Python | Python (3.4.3) | py | Runtime Error | 92 | 14008 | 514 |
a = int(input())
x = list(map(int, input().split()))
x.sort()
t =[2]
x = x[::-1]
if a == 1:
if x[0] == 0:print(1)
else:print(0)
else:
if a %2 == 0:
for i in range(1,a,2):
if not i == x[-1] and i ==x[-2]:
print(0)
break
x.pop()
x.pop()
else:print(2**(a//2))
else:
if... |
s744688170 | p03848 | u785578220 | 1559273932 | Python | Python (3.4.3) | py | Runtime Error | 77 | 14008 | 536 | a = int(input())
x = list(map(int, input().split()))
x.sort()
t =[2]
x = x[::-1]
if a == 1:
if x[0] == 0:print(1)
else:print(0)
else:
if a %2 == 0:
print(t[3])
for i in range(1,a,2):
if not i == x[-1] and i ==x[-2]:
x.pop()
x.pop()
print(0)
break
else:print(2**(a/... |
s330111480 | p03848 | u785578220 | 1559273553 | Python | Python (3.4.3) | py | Runtime Error | 88 | 14008 | 388 | a = int(input())
x = list(map(int, input().split()))
x.sort()
x = x[::-1]
if a %2 == 0:
for i in range(1,a,2):
if not i == x[-1] and i ==x[-2]:
x.pop()
x.pop()
print(0)
break
else:print(2**(a//2))
else:
for i in range(0,a,2):
x.pop()
if not i == x[-1] and i ==x[-2]:
x.pop... |
s143982956 | p03848 | u785578220 | 1559273548 | Python | PyPy3 (2.4.0) | py | Runtime Error | 216 | 52204 | 388 | a = int(input())
x = list(map(int, input().split()))
x.sort()
x = x[::-1]
if a %2 == 0:
for i in range(1,a,2):
if not i == x[-1] and i ==x[-2]:
x.pop()
x.pop()
print(0)
break
else:print(2**(a//2))
else:
for i in range(0,a,2):
x.pop()
if not i == x[-1] and i ==x[-2]:
x.pop... |
s122901489 | p03848 | u497596438 | 1558039406 | Python | PyPy3 (2.4.0) | py | Runtime Error | 222 | 52332 | 418 | N=int(input())
A=list(map(int,input().split()))
A.sort()
INF=1e9+7
if N%2==1:
if A[0]!=0:
print(0)
quit()
for i in range((N-1)//2):
if A[2*i+1]!=2*(i+1) or A[2*i+2]!=2*(i+1):
print(0)
quit()
print(2**((N-1)//2)%INF)
else:
for i in range(N//2):
if A... |
s834071642 | p03848 | u802772880 | 1557442935 | Python | Python (3.4.3) | py | Runtime Error | 96 | 14008 | 417 | n=int(input())
a=list(map(int,input().split()))
a.sort()
if n%2==1:
if a[0]!=0:
print(0)
exit()
for i in range(n//2):
if a[2*i+1]!=2*(i+1) or a[2*(i+1)]!=2*(i+1):
print(0)
exit()
print((pow(2,n//2))%(1e9+7))
else:
for i in range(n//2):
if a[2*i]!=2... |
s030141432 | p03848 | u802772880 | 1557442864 | Python | Python (3.4.3) | py | Runtime Error | 97 | 14004 | 419 | n=int(input())
a=list(map(int,input().split()))
a.sort()
if n%2==1:
if a[0]!=0:
print(0)
exit()
for i in range(n//2):
if a[2*i+1]!=2*(i+1) or a[2*(i+1)]!=2*(i+1):
print(0)
exit()
print((pow(2,n//2))%(1e9+7))
else:
for i in range(n//2):
if a[2*i]!=2... |
s127028508 | p03848 | u802772880 | 1557442384 | Python | Python (3.4.3) | py | Runtime Error | 97 | 14008 | 423 | n=int(input())
a=list(map(int,input().split()))
a.sort()
if n%2==1:
if a[0]!=0:
print(0)
exit()
for i in range(n//2):
if a[2*i+1]!=2*(i+1) or a[2*(i+1)]!=2*(i+1):
print(0)
exit()
print(int(pow(2,n//2)%(1e9+7)))
else:
for i in range(n//2):
if a[2*i]... |
s676420063 | p03848 | u802772880 | 1557440903 | Python | Python (3.4.3) | py | Runtime Error | 99 | 14008 | 413 | n=int(input())
a=list(map(int,input().split()))
a.sort()
if n%2==1:
if a[0]!=0:
print(0)
exit()
for i in range(n//2):
if a[2*i+1]!=2*(i+1) or a[2*(i+1)]!=2*(i+1):
print(0)
exit()
print(pow(2,n//2)%(1e9+7))
else:
for i in range(n//2):
if a[2*i]!=2*i... |
s831863706 | p03848 | u802772880 | 1557438812 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 14008 | 497 | n=int(input())
a=list(map(int,input().split()))
ans=1
a.sort()
la=list(set(a))
if n%2==0:
for i in range(1,n,2):
if a.count(i)==2:
ans*=2
ans%=1e9+7
else:
ans=0
break
else:
if a[0]==0 and a[1]!=0:
a=a[1:]
for i in range(2,n,2):
... |
s079956378 | p03848 | u442581202 | 1557169165 | Python | Python (3.4.3) | py | Runtime Error | 74 | 14436 | 425 | n = int(input())
dat = list(map(int,input().split()))
cnt = dict()
for d in dat:
if cnt.__contains__(d):
cnt[d]+=1
else:
cnt[d]=1
if n%2:
if cnt[0] != 1:
print(0)
exit(0)
for i in range(2,n,2):
if cnt[i] != 2:
print(0)
exit(0)
else:
... |
s810358044 | p03848 | u063052907 | 1556245676 | Python | Python (3.4.3) | py | Runtime Error | 67 | 14820 | 371 | from collections import Counter
N = int(input())
lstA = list(map(int, input().split()))
mod = 10**9 + 7
countA = Counter(lstA)
if N % 2:
if countA[0] == 1 and all(countA[i] == 2 for i in range(2, N, 2)):
ans = pow(2, N//2, mod)
else:
ans = 0
else:
if all(countA[i] == 2 for i in range(1, ... |
s689058942 | p03848 | u063052907 | 1556245234 | Python | Python (3.4.3) | py | Runtime Error | 65 | 14820 | 375 | from collections import Counter
N = int(input())
lstA = list(map(int, input().split()))
mod = 10**9 + 7
countA = Counter(lstA)
if N % 2:
if countA[0] == 1 and all(countA[i] == 2 for i in range(2, N, 2)):
ans = 2 ** (N // 2) % mod
else:
ans = 0
else:
if all(countA[i] == 2 for i in range(1... |
s763255839 | p03848 | u063052907 | 1556244939 | Python | Python (3.4.3) | py | Runtime Error | 66 | 14820 | 373 | from collections import Counter
N = int(input())
lstA = list(map(int, input().split()))
mod = 10**9 + 7
countA = Counter(lstA)
if N % 2:
if countA[0] == 1 and all(countA[i] == 2 for i in range(2, N, 2)):
ans = pow(2, N//2) % mod
else:
ans = 0
else:
if all(countA[i] == 2 for i in range(1,... |
s872487942 | p03848 | u859897687 | 1556109031 | Python | Python (3.4.3) | py | Runtime Error | 52 | 10616 | 253 | n=int(input())
#ne,[7,5,3,1,1,3,5,7]8
#no,[8,6,4,2,0,2,4,6,8]9
m=[0]*n
for i in map(int,input().split()):
m[i]+=1
ans=1
for i in range(n-1,0,-2):
if d[i]!=2:
ans=0
if d[0]!=n%2:
ans=0
if ans:
print(2**(n//2)%1000000007)
else:
print(0)
|
s039549768 | p03848 | u859897687 | 1556108951 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 250 | n=int(input())
#ne,[7,5,3,1,1,3,5,7]8
#no,[8,6,4,2,0,2,4,6,8]9
m=[0]*n
for i in map(int,input().split()):
m[i]+=1
ans=1
for i in range(n-1,0,-2):
d[i]!=2:
ans=0
if d[0]!=n%2:
ans=0
if ans:
print(2**(n//2)%1000000007)
else:
print(0)
|
s301336839 | p03848 | u102960641 | 1555969875 | Python | Python (3.4.3) | py | Runtime Error | 103 | 13880 | 293 | n = int(input())
a = list(map(int, input().split()))
a.sort()
b = True
for i,j in enumerate(a):
if n % 2:
if j != ((i+1) // 2) * 2:
b = False
break
else:
if j != (i // 2) * 2 + 1:
b = False
break
if b == True:
print(((n // 2) ** 2) % mod)
else:
print(0) |
s652752198 | p03848 | u102960641 | 1555969726 | Python | Python (3.4.3) | py | Runtime Error | 103 | 13880 | 303 | n = int(input())
a = list(map(int, input().split()))
a.sort()
mod = 10 ** 9 + 7
b = True
for i,j in enumerate(a):
if n % 2:
if j != ((i+1) // 2) * 2:
b = False
break
else:
if j != (i // 2) * 2 + 1:
b = False
break
print((n // 2) ** 2) % mod if b == True else print(0) |
s616317816 | p03848 | u804358525 | 1555956906 | Python | Python (3.4.3) | py | Runtime Error | 100 | 13880 | 610 | # -*- coding: utf-8 -*-
people_num = int(input())
line_list = list(map(int, input().split()))
num_odd = True
bool_false = True
line_list.sort()
if(people_num%2 == 0):
num_odd = False
for i in range(people_num):
if(num_odd):
if(line_list[i] == 2*((i+1)//2)):
continue
else:
... |
s447930208 | p03848 | u434208140 | 1552247915 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 551 | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
#define pb push_back
#define fr(i,n) for(int i=0;i<n;i++)
#define Fr(i,n) for(int i=0;i++<n;)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
#define iFr(i,n) for(int i=n;i>0;i--)
ll pw(ll n,ll m){
if(m==0) return 1;
else if(m%2==0) ret... |
s779929400 | p03848 | u485137520 | 1549062240 | Python | Python (3.4.3) | py | Runtime Error | 88 | 13880 | 333 |
n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
if 0 in co:
co.remove(0)
co.sort()
if not len(co) % 2 == 0:
print(0)
quit()
for index in range(len(a_list))[:-1:2]:
if not co[index] == co[index + 1]:
print(0)
quit()
print(int(pow(2, floor(n / 2))) % (po... |
s401600112 | p03848 | u485137520 | 1549062126 | Python | Python (3.4.3) | py | Runtime Error | 86 | 13812 | 333 |
n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
if 0 in co:
co.remove(0)
co.sort()
if not len(co) % 2 == 0:
print(0)
quit()
for index in range(len(a_list))[:-2:2]:
if not co[index] == co[index + 1]:
print(0)
quit()
print(int(pow(2, floor(n / 2))) % (po... |
s189130759 | p03848 | u485137520 | 1549062000 | Python | Python (3.4.3) | py | Runtime Error | 88 | 13880 | 336 |
n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
if 0 in co:
co.remove(0)
co.sort()
if not len(co) % 2 == 0:
print(0)
quit()
for index in range(len(a_list))[:-1:2]:
if not co[index] == co[index + 1]:
print(0)
quit()
print(int(pow(2, floor(n / 2))) % ... |
s191471418 | p03848 | u485137520 | 1549061943 | Python | Python (3.4.3) | py | Runtime Error | 164 | 14008 | 380 |
n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
if 0 in co:
co.remove(0)
co.sort()
if not len(co) % 2 == 0:
print(0)
quit()
for index in range(len(a_list))[:-1:2]:
print(co[index])
print(co[index+1])
if not co[index] == co[index + 1]:
print(0)
q... |
s464258818 | p03848 | u485137520 | 1549061916 | Python | Python (3.4.3) | py | Runtime Error | 167 | 14008 | 376 | n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
if 0 in co:
co.remove(0)
co.sort()
if not len(co) % 2 == 0:
print(0)
quit()
for index in range(len(a_list))[::2]:
print(co[index])
print(co[index+1])
if not co[index] == co[index + 1]:
print(0)
quit(... |
s092607017 | p03848 | u485137520 | 1549061689 | Python | Python (3.4.3) | py | Runtime Error | 80 | 13880 | 344 |
n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
co.sort()
if 0 in co:
co.remove(0)
if not len(co) % 2 == 0:
print(0)
quit()
for index in range(len(a_list)[:-1:2]):
if not a_list[index] == a_list[index + 1]:
print(0)
quit()
print(int(pow(2, floor(n /... |
s145393213 | p03848 | u485137520 | 1549061439 | Python | Python (3.4.3) | py | Runtime Error | 81 | 14008 | 342 | n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
co.sort()
if 0 in co or len(co) % 2 == 1:
co.remove(0)
else:
print(0)
quit()
for index in range(len(a_list)[:-1:2]):
if not a_list[index] == a_list[index + 1]:
print(0)
quit()
print(int(pow(2, floor(n / 2... |
s510353646 | p03848 | u485137520 | 1549061395 | Python | Python (3.4.3) | py | Runtime Error | 83 | 14008 | 342 |
n = int(input())
a_list = list(map(int, input().split()))
co = a_list.copy()
co.sort()
if 0 in co or len(co) % 2 == 1:
co.remove(0)
else:
print(0)
quit()
for index in range(len(a_list)[::2]):
if not a_list[index] == a_list[index + 1]:
print(0)
quit()
print(int(pow(2, floor(n / 2... |
s806803455 | p03848 | u397531548 | 1544909578 | Python | Python (3.4.3) | py | Runtime Error | 70 | 16352 | 521 | import collections
N=int(input())
A=list(map(int,input().split()))
if N%2==1:
if 0 not in A:
print(0)
else:
B=A.remove(0)
Bc=dict(collections.Counter(B))
for i in Bc.keys():
if Bc[i]!=2:
print(0)
break
else:
print(2*... |
s075400817 | p03848 | u368780724 | 1543633310 | Python | Python (3.4.3) | py | Runtime Error | 79 | 14692 | 339 | def inpl(): return [int(i) for i in input().split()]
import sys
N = int(input())
A = inpl()
H = dict([])
if N%2:
H[0] = -1
for i in range(1, 1+N//2):
H[2*i] = -2
else:
for i in range(1, 1+N//2):
H[2*i-1] = -2
for i in A:
H[i] += 1
H = list(H.values())
if any(H):
print(0)
sys.exit... |
s560917485 | p03848 | u785989355 | 1541133122 | Python | Python (3.4.3) | py | Runtime Error | 26 | 10420 | 1132 |
def power(N):
ans=1
for i in range(N):
ans=(ans*2)%(10**9+7)
return ans
N=int(input())
A = map(int,input().split())
flag=True
if N%2==0:
n = [0 for i in range(N/2)]
for a in A:
if a%2==0:
print(0)
flag=False
break
if (a-1)/2 in range(N/2... |
s434999877 | p03848 | u667024514 | 1537571880 | Python | Python (3.4.3) | py | Runtime Error | 34 | 10740 | 350 | import math
n = int(input())
lis = list(map(str,input().split()))
li = [0 for _ in range(math.ceil(n / 2))]
for i in range(n):
li[math.floor(lis[i] / 2)] += 1
for i in range(len(li)):
if n % 2 == 1 and i == 0:
if li[i] != 1:
print("0")
exit()
else:
if li[i] != 2:
print("0")
exit()... |
s247060986 | p03848 | u536113865 | 1536612561 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 275 | mod = 10**9+7
n = int(input())
a = sorted(f())
if n&1:
if all([a[i] == i+i%2 for i in range(n)]):
print(1<<((n-1)//2)%mod)
else:
print(0)
else:
if all([a[i] == i+(i+1)%2 for i in range(n)]):
print(1<<(n//2)%mod)
else:
print(0) |
s163904873 | p03848 | u698479721 | 1531509072 | Python | Python (3.4.3) | py | Runtime Error | 164 | 14008 | 525 | import sys
def coun(n):
if n == 0:
return 1
else:
return (2*coun(n-1))%(10**9+7)
N = int(input())
A = list(map(int, input().split()))
A.sort()
if len(A)%2 == 1:
if A[0]!=0:
print(0)
sys.exit()
i = 1
while i <= len(A)//2:
if A[2*i-1]==2*i and A[2*i]==2*i:
i += 1
else:
print(... |
s337570381 | p03848 | u835482198 | 1500847533 | Python | Python (3.4.3) | py | Runtime Error | 57 | 16620 | 445 | from collections import Counter
N = int(input())
A = map(int, input().split())
# N = 5
# A = [2, 4, 4, 0, 2]
mod = 10 ** 9 + 7
cnt = Counter(A)
if N % 2 == 0:
if len(filter(lambda c: c == 2, cnt.values())) != 0:
print(0)
else:
print(2 ** (N // 2))
else:
if cnt[0] != 1:
print(0)
... |
s556352649 | p03848 | u667084803 | 1494794552 | Python | Python (3.4.3) | py | Runtime Error | 112 | 16612 | 448 | N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
for i in range(0,int(N/2)):
B+=[2*i,2*i]
C+=[2*i+1,2*i+1]
if A==B or A==C:
# ans=2**(N/2)
print(int(ans)%(10**9+7))
else:
print(0)
else:
B+=[0]
C+=[1]
for i in range(0,int(N/2)):
B+=[2*i+2,2*i+2]
... |
s635130620 | p03848 | u667084803 | 1494794522 | Python | Python (3.4.3) | py | Runtime Error | 111 | 16228 | 448 | N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
for i in range(0,int(N/2)):
B+=[2*i,2*i]
C+=[2*i+1,2*i+1]
if A==B or A==C:
ans=2**(N/2)
# print(int(ans)%(10**9+7))
else:
print(0)
else:
B+=[0]
C+=[1]
for i in range(0,int(N/2)):
B+=[2*i+2,2*i+2]
... |
s489981347 | p03848 | u667084803 | 1494794490 | Python | Python (3.4.3) | py | Runtime Error | 111 | 16228 | 446 | N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
for i in range(0,int(N/2)):
B+=[2*i,2*i]
C+=[2*i+1,2*i+1]
if A==B or A==C:
ans=2**(N/2)
print(int(ans)%(10**9+7))
else:
print(0)
else:
B+=[0]
C+=[1]
for i in range(0,int(N/2)):
B+=[2*i+2,2*i+2]
... |
s093776439 | p03848 | u667084803 | 1494794420 | Python | Python (3.4.3) | py | Runtime Error | 109 | 16228 | 446 | N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
for i in range(0,int(N/2)):
B+=[2*i,2*i]
C+=[2*i+1,2*i+1]
if A==B or A==C:
ans=2**(N/2)%(10**9+7)
print(int(ans))
else:
print(0)
else:
B+=[0]
C+=[1]
for i in range(0,int(N/2)):
B+=[2*i+2,2*i+2]
... |
s098185809 | p03848 | u667084803 | 1494794362 | Python | Python (3.4.3) | py | Runtime Error | 112 | 16228 | 434 | N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
for i in range(0,int(N/2)):
B+=[2*i,2*i]
C+=[2*i+1,2*i+1]
if A==B or A==C:
ans=int(2**(N/2))%(10**9+7)
print(ans)
else:
print(0)
else:
B+=[0]
C+=[1]
for i in range(0,int(N/2)):
B+=[2*i+2,2*i+2]
... |
s708172561 | p03848 | u667084803 | 1494794294 | Python | Python (3.4.3) | py | Runtime Error | 111 | 16612 | 246 | N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
for i in range(0,int(N/2)):
B+=[2*i,2*i]
C+=[2*i+1,2*i+1]
if A==B or A==C:
print(int(2**(N/2))%(10**9+7))
else:
print(0) |
s182967787 | p03848 | u667084803 | 1494792445 | Python | Python (3.4.3) | py | Runtime Error | 115 | 16228 | 422 | N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]#偶数だけ
C=[]#奇数だけ
if N%2==0:
for i in range(0,int(N/2)):
B+=[2*i,2*i]
C+=[2*i+1,2*i+1]
if A==B or A==C:
print(int(2**(N/2))%(10**9+7))
else:
print(0)
else:
B+=[0]
C+=[1]
for i in range(0,int(N/2)):
B+=[2*i+2,2*i+2]
C+=[2*i+3,... |
s116027006 | p03848 | u536658633 | 1490753944 | Python | Python (3.4.3) | py | Runtime Error | 54 | 13880 | 1380 | N = int(input())
report_list = [int(n) for n in input().split()]
M = len(set(report_list))
def how_many_num_in_list(list, num):
count = 0
for element in list:
if element == num:
count += 1
return count
# 同じ数字が2個ずつあるか
# def is_ready_for_solve(list):
# if N % 2 == 0:
# c ... |
s526673692 | p03848 | u422590714 | 1490749442 | Python | Python (3.4.3) | py | Runtime Error | 100 | 13880 | 589 | n = int(input())
lst = [int(e) for e in input().split(' ')]
lst = sorted(lst)
valid_list = []
if n % 2 == 1:
# 奇数
valid_list.append(0)
for i in range(1, int((n + 1) / 2)):
valid_list.append(i * 2)
valid_list.append(i * 2)
if lst == valid_list:
print(int(2 ** (((n - 1) / 2)) % 1... |
s004258361 | p03848 | u422590714 | 1490747525 | Python | Python (3.4.3) | py | Runtime Error | 100 | 13880 | 630 | n = int(input())
lst = [int(e) for e in input().split(' ')]
lst = sorted(lst)
valid_list = []
if n % 2 == 1:
# 奇数
valid_list.append(0)
for i in range(1, int((n + 1) / 2)):
valid_list.append(i * 2)
valid_list.append(i * 2)
if lst == valid_list:
print((2 ** (((n - 1) / 2) / 5) % ... |
s804251079 | p03848 | u422590714 | 1490746750 | Python | Python (3.4.3) | py | Runtime Error | 99 | 13880 | 589 | n = int(input())
lst = [int(e) for e in input().split(' ')]
lst = sorted(lst)
valid_list = []
if n % 2 == 1:
# 奇数
valid_list.append(0)
for i in range(1, int((n + 1) / 2)):
valid_list.append(i * 2)
valid_list.append(i * 2)
if lst == valid_list:
print(int(2 ** (((n - 1) / 2)) % 1... |
s562957845 | p03848 | u598167418 | 1484797602 | Python | Python (2.7.6) | py | Runtime Error | 152 | 11504 | 862 | from collections import Counter
n = input()
a = [int(x) for x in raw_input().split()]
a.sort()
c = 0
if n&1:
if a[0] == 0:
del a[0]
d = Counter(a)
for i in d.keys():
if i == 0:
print 0
exit(1)
if i&1:
print 0
... |
s940034262 | p03848 | u541568482 | 1483402587 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 386 | import sys
cin = sys.stdin
cin = open("in.txt", "r")
MODULO = int(10**9+7)
N = int(cin.readline())
A = list(map(int, cin.readline().split()))
pos = [0]*(N)
if (N%2==1):
pos[N//2+1]=1
for ai in A:
if (ai+N)%2==0:
print(0)
exit()
pos[ai]+=1
if pos[ai]>2:
print(0)
exit()
c... |
s272377985 | p03848 | u942033906 | 1483155555 | Python | Python (2.7.6) | py | Runtime Error | 23 | 4496 | 514 | N = int(input())
A = list(map(int,input().split()))
MOD = 10**9 + 7
def calc(a):
if 0 in a:
if a.count(0) != 1:
return 0
for i in [x*2 for x in range(1,int(N/2) + 1)]:
if a.count(i) != 2:
return 0
else:
for i in [x*2 - 1 for x in range(1,int(N/2) + 1)]:
if a.count(i) != 2:
return 0
return 2 **... |
s647695532 | p03848 | u942033906 | 1483155487 | Python | Python (3.4.3) | py | Runtime Error | 60 | 14008 | 514 | N = int(input())
A = list(map(int,input().split()))
MOD = 10**9 + 7
def calc(a):
if 0 in a:
if a.count(0) != 1:
return 0
for i in [x*2 for x in range(1,int(N/2) + 1)]:
if a.count(i) != 2:
return 0
else:
for i in [x*2 - 1 for x in range(1,int(N/2) + 1)]:
if a.count(i) != 2:
return 0
return 2 **... |
s092535558 | p03848 | u513091050 | 1482365168 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 735 | # -*- coding: utf-8 -*-
import sys
def maybe_check(n,A):
try:
if n <= 0 or n >= 10000:
raise
if len(A) <= 0 or len(A) > n:
raise
div = 10 ** 9 + 7
maybe_list = []
for i in range(1, n+1):
left = abs(i - n)
right = (n -1 )- lef... |
s365409258 | p03848 | u513091050 | 1482364873 | Python | Python (2.7.6) | py | Runtime Error | 18 | 2696 | 671 | # -*- coding: utf-8 -*-
import sys
def maybe_check(n,A):
if n <= 0 or n >= 10000:
return False
if len(A) <= 0 or len(A) > n:
print len(A),n-1
return False
div = 10 ** 9 + 7
maybe_list = []
for i in range(1, n+1):
left = abs(i - n)
right = (n -1 )- left
... |
s416410825 | p03848 | u513091050 | 1482364787 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 663 | # -*- coding: utf-8 -*-
import sys
def maybe_check(n,A):
if n <= 0 or n >= 10000:
return False
if len(A) <= 0 or len(A) > n:
print len(A),n-1
return False
maybe_list = []
for i in range(1, n+1):
left = abs(i - n)
right = (n -1 )- left
maybe_list.append(... |
s036910855 | p03848 | u513091050 | 1482364133 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2696 | 529 | # -*- coding: utf-8 -*-
import sys
def maybe_check(A,n):
maybe_list = []
for i in range(1, n+1):
left = abs(i - n)
right = (n -1 )- left
maybe_list.append(abs(left - right))
pattern = len(set([x for x in maybe_list if maybe_list.count(x) != 1]))
for i in A:
if i in ma... |
s756966186 | p03848 | u513091050 | 1482363916 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 506 | import sys
def maybe_check(A,n):
maybe_list = []
for i in range(1, n+1):
left = abs(i - n)
right = (n -1 )- left
maybe_list.append(abs(left - right))
pattern = len(set([x for x in maybe_list if maybe_list.count(x) != 1]))
for i in A:
if i in maybe_list:
ma... |
s846436020 | p03849 | u089230684 | 1585467398 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 821 | n,m,q = input().split(" ")
n1=int(n/2)
m1=(m/2)
for i in range(int(q)):
a,b,c,d = input().split(" ")
a = int(a)
b= int(b)
c = int(c)
d=int(d)
if(a==1 and c==2):
if((b<=n1 and d<=m1) or (b>n1 and d>m1)):
print("YES")
... |
s344245910 | p03849 | u388927326 | 1548586703 | Python | Python (3.4.3) | py | Runtime Error | 1741 | 6244 | 473 | #!/usr/bin/env python3
MOD = 10 ** 9 + 7
IMAX = 70
JMAX = 10 ** 5
def dp(n):
assert n <= JMAX
dp = [0 for j in range(JMAX + 1)]
dp[0] = 1
for i in reversed(range(IMAX + 1)):
d = 2 ** i
for j in reversed(range(JMAX + 1)):
if j - d >= 0:
dp[j] += dp[j - d]
... |
s440384736 | p03849 | u054106284 | 1546110163 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 332 | N= int(input())
bit = bin(N)[2:]
k = len(bit)
dp = [[0] * 2 for i in range(len(bit) + 1)]
for i in range(k):
j = int(bit[k-i+1])
a,b,c = [(1,0,0),(1,1,0)][j]
d,e,f = [(2, 1, 1),(1, 2, 2)][j]
dp[i+1][0] = a * dp[i][0] + b * dp[i][1] + c * 3**i
dp[i+1][1] = d * dp[i][0] + e * dp[i][1] + f * 3**i
print(dp[k][0])
... |
s817773713 | p03849 | u054106284 | 1546099401 | Python | Python (3.4.3) | py | Runtime Error | 78 | 3952 | 300 | N= int(input())
def b(N):
if N < 2:
res = N
else:
if N % 2 == 0:
res = b(N//2)
else:
res = b( (N-1)//2 ) + b( (N+1)//2 )
return res
def a(N):
if N > 0:
res = a(N-1)
else:
res = 0
return res + b(N+1)
print(a(N)) |
s410706974 | p03849 | u942033906 | 1483164402 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2572 | 197 | N = int(raw_input())
#N = 1422
MOD = 10**9 + 7
l = [(a^b,a+b) for a in range(0,N+1) for b in range(a,N+1) if a+b <= N]
for u in range(0,N+1):
for a in range(0,N+1):
s = set(l)
print(len(s) % MOD)
|
s168084430 | p03850 | u347057617 | 1600207377 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9008 | 7380 | #include<bits/stdc++.h>
//using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define rep(i,j,n) for(ll i=(ll)(j);i<(ll)(n);i++)
#define REP(i,j,n) for(ll i=(ll)(j);i<=(ll)(n);i++)
#d... |
s967943705 | p03850 | u368780724 | 1553312412 | Python | PyPy3 (2.4.0) | py | Runtime Error | 625 | 136896 | 278 | N = int(input())
M = list(input().split())
mini = 0
ans = 0
for s in M:
if s == '-':
mini += 1
elif s == '+':
pass
else:
s = int(s)
if mini == 1:
ans -= s
else:
ans += s
print(max(ans,eval(''.join(M)))) |
s490342278 | p03850 | u039623862 | 1482121465 | Python | Python (3.4.3) | py | Runtime Error | 71 | 16276 | 468 | n = int(input())
ipt = input().split()
a = [int(ipt[i]) for i in range(0, 2*n+1,2)] + [0]
opr = [''] + [ipt[i] for i in range(1, 2*n, 2)] + ['-']
max_v = a[0]
for i in range(1,n):
if opr[i] == '+':
max_v += a[i]
else:
max_v -= a[i]
s = sum(a)
cur = 0
for i in range(1,n+1):
if opr[i] == '-':... |
s893799713 | p03850 | u039623862 | 1482121389 | Python | Python (3.4.3) | py | Runtime Error | 69 | 16272 | 468 | n = int(input())
ipt = input().split()
a = [int(ipt[i]) for i in range(0, 2*n+1,2)] + [0]
opr = [''] + [ipt[i] for i in range(1, 2*n, 2)] + ['-']
max_v = a[0]
for i in range(1,n):
if opr[i] == '+':
max_v += a[i]
else:
max_v -= a[i]
s = sum(a)
cur = 0
for i in range(1,n+1):
if opr[i] == '-':... |
s402348232 | p03850 | u039623862 | 1482119084 | Python | Python (3.4.3) | py | Runtime Error | 45 | 14164 | 363 | n = int(input())
ipt = input().split()
node = [int(ipt[0])]
plus = n
while plus > 1 and ipt[2*plus-1] == '+':
node[0] += int(ipt[2*plus])
plus -= 1
for i in range(plus):
if ipt[2*i+1] == '+':
node[-1] += int(ipt[2*i+2])
else:
node.append(int(ipt[2*i+2]))
if len(node) == 1:
print(node... |
s252649941 | p03850 | u380653557 | 1482115134 | Python | Python (3.4.3) | py | Runtime Error | 301 | 44936 | 710 | import sys
n = int(next(sys.stdin).strip())
items = next(sys.stdin).strip().split()
cache = {(i, i + 1): (int(items[2 * i]), int(items[2 * i])) for i in range(n)}
def value(l, r):
if (l, r) in cache:
return cache[(l, r)]
lower, upper = float('inf'), float('-inf')
for c in range(l + 1, r):
... |
s357909908 | p03850 | u380653557 | 1482114347 | Python | Python (3.4.3) | py | Runtime Error | 291 | 44848 | 675 | import sys
n = int(next(sys.stdin).strip())
items = next(sys.stdin).strip().split()
cache = {(i, i + 1): (int(items[2 * i]), int(items[2 * i])) for i in range(n)}
def value(l, r):
if (l, r) in cache:
return cache[(l, r)]
lower, upper = float('inf'), float('-inf')
for c in range(l + 1, r):
... |
s075046398 | p03852 | u137226361 | 1600232799 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9056 | 666 | N, K, L = map(int, input().split())
par = [i for i in range(N)]
size = [1] * N
def find(x, P):
if P[x] == x:
return x
else:
return find(P[x], P)
def unite(x, y):
x = find(x, par)
y = find(y, par)
if x != y:
# xとyの属している集合が異なる時
pass
#par[x] = y
par2 = [i f... |
s489234322 | p03852 | u987988155 | 1600114592 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8840 | 71 | C = c
if c == a,e,i,o,u :
print("vowel")
else :
print("consonant") |
s868709729 | p03852 | u492910842 | 1599339236 | Python | PyPy3 (7.3.0) | py | Runtime Error | 93 | 74524 | 99 | a=input()
if a="a" or a="i" or a="u" or a="e" or a="o":
print("vowel")
else:
print("consonant") |
s746908021 | p03852 | u904995051 | 1599328779 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8960 | 74 | c = input()
if c in "aeiou":
print("vowel")
else:
print("consonant") |
s928360820 | p03852 | u620846115 | 1598698705 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8832 | 99 | n = str(input())
if n = "a" or "i" or "u" or "e" or "o":
print("vowe")
else:
print("consonant") |
s856975018 | p03852 | u309120194 | 1598671067 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8816 | 117 | c = int(input())
if c == 'a' or c == 'i' or c == 'u' or c == 'e' or c == 'o': print('vowel')
else: print('consonant') |
s807529364 | p03852 | u808569469 | 1598665852 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9044 | 64 | if c in "aiueo":
print("vowel")
else:
print("consonant") |
s011405155 | p03852 | u063596417 | 1597883752 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9160 | 178 | def main():
h, _ = map(int, input().split())
c = [input() for _ in range(h)]
for cn in c:
print(cn)
print(cn)
if __name__ == "__main__":
main()
|
s486296071 | p03852 | u798260206 | 1597751960 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8964 | 103 | a = input()
vowel = set("a","b","c","d","e")
if a in vowel:
print("vowel")
else:
print("consonant") |
s117105949 | p03852 | u070200692 | 1597608813 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9020 | 77 | x = 'aeiou'
i = input()
if i in x:
print("vowel")
else
print("consonant") |
s460100292 | p03852 | u068646483 | 1597596149 | Python | PyPy3 (7.3.0) | py | Runtime Error | 98 | 74776 | 106 | c = input()
if c == a or c == i or c == u or c == e or c == o:
print('vowel')
else:
print('consonant') |
s102525785 | p03852 | u539616549 | 1597585612 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8684 | 217 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s;
cin >> s;
if (s=='a' or s=='i' or s=='u' or s=='e' or s=='o') {
cout << "vowel" << endl;
} else {
cout << "consonant" << endl;
}
}
|
s892931942 | p03852 | u539616549 | 1597585489 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8944 | 215 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s;
cin >> s;
if s=='a' or s=='i' or s=='u' or s=='e' or s=='o' {
cout << "vowel" << endl;
} else {
cout << "consonant" << endl;
}
}
|
s688060820 | p03852 | u539616549 | 1597585364 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8944 | 214 | #include <bits/stdc++.h>
using nameplace std;
int main() {
char s;
cin >> s;
if s=='a' or s=='i' or s=='u' or s=='e' or s=='o' {
cout << "vowel" << endl;
} else {
cout << "consonant" << endl;
}
} |
s410727864 | p03852 | u250662864 | 1597509387 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8596 | 146 | letter = input()
if(letter == "a" or letter == "e" or letter = "i" or letter == "o" or letter == "u"):
print("vowel")
else:
print("consonant") |
s528845628 | p03852 | u921632705 | 1597265676 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8916 | 71 | N = input()
if N in "aiueo"
print("vowel")
else
print("consonant")
|
s569350085 | p03852 | u921632705 | 1597265640 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8988 | 83 | N = input()
if "a","e","i","o","u" in N
print("vowel")
else
print("consonant")
|
s000524336 | p03852 | u921632705 | 1597265612 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8956 | 73 | N = input()
if a,e,i,o,u in N
print("vowel")
else
print("consonant")
|
s366421695 | p03852 | u074220993 | 1597113177 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9028 | 116 | s = input()
if s == "a" or s == "i" or s == "u" or s == "e" or s == "o":
print(vowel)
else:
print(consonant) |
s811404112 | p03852 | u477696265 | 1597107887 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8912 | 217 | text = str(input())
if text == a
print(vowel)
elif text == i
print(vowel)
elif text == u
print(vowel)
elif text == e :
print(vowel)
elif text == o ::
print=(vowel)
else:
print=(consonant) |
s278129255 | p03852 | u477696265 | 1597107384 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8904 | 211 | text = input()
if text == 'a'
print(vowel)
elif text == i
print(vowel)
elif text == u
print(vowel)
elif text == e
print(vowel)
elif text == o
print=(vowel)
else:
print=(consonant) |
s365837591 | p03852 | u477696265 | 1597032274 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8884 | 232 | text = input()
if (text == a )
print('vowel')
elif (text == i )
print('vowel')
elif (text == u )
print('vowel')
elif (text == e )
print('vowel')
elif (text == o )
print=('vowel')
else:
print=('consonant') |
s283777921 | p03852 | u477696265 | 1597032045 | Python | Python (3.8.2) | py | Runtime Error | 31 | 8992 | 231 | text = input()
if (text == 'a')
print('vowel')
elif (text == 'i')
print('vowel')
elif (text == 'u')
print('vowel')
elif (text == 'e')
print('vowel')
elif (text == 'o')
print('vowel')
else:
print('consonant') |
s265296137 | p03852 | u442948527 | 1596684747 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8956 | 82 | s=input()
print(["vowel","consonant"][s="a" or s="i" or s="u" or s="e" or s="o"])
|
s634976152 | p03852 | u125269142 | 1596575688 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9008 | 127 | s = input()
if s == 'a' or s == 'i' or s == 'u' or s == 'e' or s == 'o':
ans = 'vowel'
else:
ans = 'consonant"
print(ans) |
s462058267 | p03852 | u891847179 | 1596259763 | Python | Python (3.8.2) | py | Runtime Error | 19 | 8884 | 89 | c = input()
if c in ['a', 'i', 'u', 'e', 'o']:
print('vowel')
else
print('consonant')
|
s879294849 | p03852 | u891847179 | 1596259718 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8868 | 90 | c = input()
if c in ['a', 'i', 'u', 'e', 'o']:
print('vowel')
else
print('consonant')
|
s362062659 | p03852 | u388297793 | 1596238725 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9028 | 82 | c=input()
x=[a,e,i,o,u]
if x in c:
print("vowel")
else:
print("consonant") |
s043712736 | p03852 | u099212858 | 1595979748 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8960 | 116 | x = str(input())
if x = "a" or x = "i" or x = "u" or x = "e" or x = "o":
print("vowel")
else:
print("consonant") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.