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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s504829309 | p04033 | u602677143 | 1584581348 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 255 | a,b,c = map(int,input().split())
if (a > 0 and b > 0) or (a > b and a > 0) or (b > a and b > 0):
print("Positive")
elif (a-b) == 0 or (b-a) == 0:
print("Zero")
elif (a < 0 and b < 0) or (a > b and a < 0) or (b > a and b < 0):
print("Negative") |
s075681489 | p04033 | u685983477 | 1584383664 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 215 | a, b=map(int, input().split())
if a==0 or b==0:
print("Zero")
exit()
if(a=<0 and b>=0):
print("Zero")
exit()
if a>0:
print("Positive")
elif abs(b-a)%2==0:
print("Negative")
else:
print("Positive")
|
s959171390 | p04033 | u672898046 | 1583813024 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 275 | a, b = map(int,input().split())
num = (b-a)+1
if a > 0:
print("Positive")
elif b < 0:
if num%2 != 0:
print("Positive")
else:
print("Negative")
elif a < 0 and b > 0:
if len(abs(a))%2 == 0:
print("Positive")
else:
print("Negative")
else:
print("Zero") |
s463504911 | p04033 | u672898046 | 1583812337 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 211 | a, b = map(int,input().split())
num = (b-a)+1
if min(a,b) > 0 or:
print("Positive")
elif max(a,b) < 0 and num%2!=0:
print("Positive")
elif max(a,b) < 0 and num%2==0:
print("Negative")
else:
print("Zero") |
s160633345 | p04033 | u672898046 | 1583811256 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | a, b = int(input())
if min(a,b) > 0:
print("Positive")
elif max(a,b) < 0:
print("Negative")
else:
print("Zero") |
s157112867 | p04033 | u672898046 | 1583811229 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | a, b = int(input())
if min(a,b) > 0:
print("Positive")
elif max(a,b) < 0:
print("Negative")
else:
print("Zero") |
s695609774 | p04033 | u112317104 | 1582421865 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 191 | N, M = map(int, input().split())
if N > 0:
print('Positive')
elif N <= 0 =< M:
print('Zero')
elif M < 0:
if N-M % 2:
print('Negative')
else:
print('Positive') |
s420700148 | p04033 | u097163034 | 1577689164 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 638 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
//int numberofPaths(int h,int w,int a,int b);
int main()
{
ll n,i,len1,h,t,cnt=0,cnt1=0,x=1,m,flag=0,k=10,b,h1=0,h2=0,od=0,ev=0;
double w;
/* freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);*/
cin>>n>>k;
if(n>0&&k>0)
{
cout<<"Positive"<<endl;
}
else if((n>=0&&k<=0)||(n<=0&&k>=0))
{
cout<<"Zero"<<endl;
}
else{
t=abs(n-k);
if(t%2==0)
{
cout<<"Negative"<<endl;
}
else{
cout<<"Positive"<<endl;
}
}
return 0;
}
|
s880568109 | p04033 | u377989038 | 1576828668 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 288 | import sys
input = sys.stdin.buffer.readline
n, m = map(int, input().split())
b = [False] * (n + 1)
c = [1] * (n + 1)
for i in range(m):
x, y = map(int, input().split())
c[x] -= 1
c[y] += 1
if b[x]:
b[y] = True
if c[x] == 0:
b[x] = False
print(sum(b)) |
s473850560 | p04033 | u209619667 | 1576779308 | Python | Python (3.4.3) | py | Runtime Error | 2160 | 820376 | 270 | A,B = map(int,input().split())
b = []
Zeroflag = False
count = 0
for i in range(A,B+1,1):
b.append(i)
if 0 in b:
zeroflag = True
for i in b:
if i < 0:
count += 1
if zeroflag:
print('Zero')
elif count %2 == 0:
print('Positive')
else:
print('Negative')
|
s441999991 | p04033 | u209619667 | 1576779208 | Python | Python (3.4.3) | py | Runtime Error | 2158 | 820888 | 270 | A,B = map(int,input().split())
b = []
Zeroflag = False
count = 0
for i in range(A,B+1,1):
b.append(i)
if 0 in b:
zeroflag = True
for i in b:
if i < 0:
count += 1
if zeroflag:
print('Zero')
elif count %2 == 0:
print('Positive')
else:
print('Negative')
|
s455961267 | p04033 | u113971909 | 1576117645 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 196 | a,b=map(int,input().split())
a=min(1,a)
b=min(1,b)
z=aa.count(0)
if b==1 and a<=0:
print('Zero')
elif b==0:
print('Zero')
elif (b-a)%2==0 and b<0:
print("Negative")
else:
print("Positive") |
s550395644 | p04033 | u113971909 | 1576115810 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 197 | a,b=map(int,input().split())
aa=[a,b]
if a<b:
aa+=list(range(a+1,b))
z=aa.count(0)
n=sum([1 for i in aa if i<0])%2
if z>0:
print('Zero')
elif n==0:
print("Positive")
else:
print("Negative") |
s055252475 | p04033 | u113971909 | 1576107636 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 187 | a=list(map(int,input().split()))
aa=list(range(a[0],a[1]+1))
z=aa.count(0)
n=sum([1 for i in aa if i<0])%2
if z>0:
print('Zero')
elif n==0:
print("Positive")
else:
print("Negative") |
s807455549 | p04033 | u995109095 | 1574666282 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 345 | import sys
# import numpy as np
def main():
a, b = map(int, sys.stdin.read().split())
if 0 < a:
ans = 'Positive'
elif 0 <= b:
ans = 'Zero'
else:
if (b - a + 1) % 2 == 0:
ans = 'Positive'
else:
ans = 'Negative'
print(ans)
if __name__ == '__main__':
main( |
s803389012 | p04033 | u995109095 | 1574665923 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 237 | I=lambda:list(map(int,input().split()))
a=I()
if a[0]>=0:
print("Positive")
else:
d=list(range(a[0],a[1]+1))
if 0 in d:
print("Zero")
elif len(d)%2==0:
print("Positive")
else:
print("Negative") |
s170053602 | p04033 | u276115223 | 1574282974 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 331 | # AGC 002: A – Range Product
a, b = [int(s) for s in input().split()]
numbers = list(range(a, b + 1))
if 0 in numbers:
print('Zero')
else:
number_of_negatives = 0
for n in numbers:
if n < 0:
number_of_negatives += 1
print('Positive' if number_of_negatives % 2 == 0 else 'Negative') |
s107642954 | p04033 | u373958718 | 1573461655 | Python | Python (3.4.3) | py | Runtime Error | 149 | 13684 | 307 | import numpy as np
n,l=map(int,input().split())
a=list(map(int,input().split()))
flag=False;idx=0
for i in range(n-1):
if a[i]+a[i+1]>=l:
flag=True
idx=i
if not flag:
print("Impossible")
exit(0)
print("Possible")
for x in range(idx):
print(x+1)
for x in reversed(range(idx+1)):
print(x+1)
|
s451867393 | p04033 | u556371693 | 1570732133 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 124 | a,b=map(int,input().split())
if a>0 and b>0:
print('Positive')
elif a<0 ans b<0:
print('Negative')
else:
print('Zero') |
s334678653 | p04033 | u102461423 | 1569889805 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38384 | 2204 | import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# 「番号 n以下 の辺だけを貼ったときの連結成分の大きさが z 以上」を満たす最小のn
# 並列二分探索
N,M = map(int,readline().split())
def find_root(root,x):
y = root[x]
if x == y:
return
find_root(root,y)
root[x] = root[y]
def merge(root,size,x,y):
find_root(root,x)
find_root(root,y)
rx = root[x]
ry = root[y]
if rx == ry:
return 0,0
return (ry,rx) if size[rx] < size[ry] else (rx,ry)
def test(root,size,x,y,z):
find_root(root,x)
find_root(root,y)
rx = root[x]
ry = root[y]
if rx == ry:
return size[rx] >= z
else:
return size[rx] + size[ry] >= z
root = list(range(N+1))
size = [1] * (N+1)
merge_1 = [0] * (M+1)
merge_2 = [0] * (M+1)
for t in range(1,M+1):
a,b = map(int,readline().split())
x,y = merge(root,size,a,b)
if x == 0:
continue
merge_1[t] = x
merge_2[t] = y
root[y] = x
size[x] += size[y]
Q = int(readline())
X = []
Y = []
Z = []
for line in readlines():
x,y,z = map(int,line.split())
X.append(x)
Y.append(y)
Z.append(z)
left = [0] * Q # 連結成分は z 未満
right = [M] * Q # 連結成分は z 以上
q = tuple([] for _ in range(M+1))# 調べる時刻、番号
done = [False] * (M+1)
for i in range(Q):
q[M//2].append(i)
rest = Q
while rest:
root = list(range(N+1))
size = [1] * (N+1)
for t in range(1,M+1):
x = merge_1[t]
y = merge_2[t]
if x != 0:
root[y] = x
size[x] += size[y]
if done[t] or not q[t]:
continue
done[t] = True
L = left[q[t][0]]
R = right[q[t][0]]
ML = (t+L)//2
MR = (t+R)//2
for i in q[t]:
x = X[i]
y = Y[i]
z = Z[i]
if test(root,size,x,y,z):
right[i] = t
mid = ML
else:
left[i] = t
mid = MR
if left[i] < mid:
q[mid].append(i)
else:
rest -= 1
for x in right:
print(x)
|
s582726928 | p04033 | u623687794 | 1567913927 | Python | PyPy3 (2.4.0) | py | Runtime Error | 192 | 38640 | 303 | n,l=map(int,input().split())
r=list(map(int,input().split()))
last=0;tiepoint=0
for i in range(n-1):
if r[i]+r[i+1]>last:
last=r[i]+r[i+1]
tiepoint=i
if last>=l:
print("Possible")
for i in range(n-1):
if i==tiepoint:continue
print(i+1)
print(tiepoint+1)
else:print("Impossible")
|
s848166565 | p04033 | u131634965 | 1567580796 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 227 | a,b=map(int, input().split())
num_list=list(range(a,b+1))
if a>0:
print("Positive")
else:
if b>=0:
print("Zero")
elif (a-b-1)%2==0:
print("Positive")
elif (a-b-1)%2==1:
print("Negative") |
s476727404 | p04033 | u753803401 | 1567443958 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2108 | 89308 | 437 | def slove():
import sys
input = sys.stdin.readline
n, m = list(map(int, input().rstrip('\n').split()))
lr = [list(map(int, input().rstrip('\n').split())) for _ in range(m)]
a = [0] * (n + 2)
for l, r in lr:
a[l] += 1
a[r + 1] -= 1
t = 0
cnt = 0
for i in range(1, n + 1):
t += a[i]
if t == m:
cnt += 1
print(cnt)
if __name__ == '__main__':
slove()
|
s002981743 | p04033 | u571969099 | 1565801644 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 165 | a,b=[int(i) fro i in input().split()]
if 0<a and 0<b:
print("Positive")
elif a*b<=0:
print("Zero")
elif (b-a)%2==1:
print("Positive")
else:
print("Negative") |
s843402956 | p04033 | u196697332 | 1564000355 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 234 | a, b = map(int, input().split())
if a <= 0 and b => 0:
print("Zero")
elif a > 0 and b > 0:
print('Positive')
elif a < 0 and b < 0:
if (b - a + 1) % 2:
print('Negative')
else:
print('Positive')
|
s639440019 | p04033 | u196697332 | 1564000326 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 229 | a, b = map(int, input().split())
if a <= 0 and b => 0:
print(0)
elif a > 0 and b > 0:
print('Positive')
elif a < 0 and b < 0:
if (b - a + 1) % 2:
print('Negative')
else:
print('Positive')
|
s124342374 | p04033 | u623659526 | 1563681672 | Python | Python (3.4.3) | py | Runtime Error | 32 | 4212 | 450 | import logging
logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)
def main():
a, b = map(int, input().split())
logging.info("Hello!")
if a * b < 0:
print(zero)
elif a > 0:
print("Positive")
else:
if (b - a + 1) % 2 == 1:
print("Negative")
else:
print("Positive")
if __name__ == "__main__":
main()
|
s544842266 | p04033 | u623659526 | 1563681578 | Python | Python (3.4.3) | py | Runtime Error | 29 | 4212 | 450 | import logging
logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)
def main():
a, b = map(int, input().split())
logging.info("Hello!")
if a * b < 0:
print(zero)
elif a > 0:
print("Positive")
else:
if (b - a + 1) % 2 == 1:
print("Negative")
else:
print("Positive")
if __name__ == "__main__":
main()
|
s570309303 | p04033 | u148781101 | 1563164709 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 267 | a, b = map(int, input().split())
if a <= 0 and b >= 0:
print("Zero")
elif a > 0 and b > 0:
print("Positive")
elif a < 0 and b > 0 and abs(0-a) % 2 == 0:
print("Positive")
elif a < 0 and b < 0 and abs(0-a) % 2 == 0::
print("Positive")
else:
print("Negative") |
s928279995 | p04033 | u996542290 | 1562851742 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 203 | a = input()
b = input()
a=int(a)
b=int(b)
if a>0:
print("positive")
elif a ==0 or b==0:
print(0)
elif a <0 and b>0:
print(0)
elif (b-a)%2==0:
print('negative')
else:
print("positibe") |
s975720870 | p04033 | u691018832 | 1562289816 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 216 | import sys
input = sys.stdin.readline
a, b = map(int, input().split())
if a <= 0:
if b >= 0:
ans = 'Zero'
elif b < 0 and (b-a+1)%2 == 1:
ans = 'Negative'
else:
ans = 'Positive'
print(ans) |
s778419528 | p04033 | u691018832 | 1562289611 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 214 | import sys
input = sys.stdin.readline
a, b = map(int, input().split())
if a <= 0:
if b >= 0:
ans = 'Zero'
elif b < 0 and (b-a)%2 == 0:
ans = 'Negative'
else:
ans = 'Positive'
print(ans) |
s554774434 | p04033 | u556589653 | 1560363151 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3608 | 161 | a,b = map(int,input().split())
num = 1
for i in range(a,b+1):
num = num * i
if num>0:
print("Positive")
elif num<0:
pirnt("Negative")
else:
print("Zero") |
s456190354 | p04033 | u733774002 | 1559877784 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 191 | a, b = map(int, input().split())
if 0 <= a:
print("Positive")
elif b < 0:
if (b - a + 1) % 2 == 0:
print("Positive")
else:
print("Negative")
else:
print(Zero)
|
s706767815 | p04033 | u148781101 | 1559871037 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 136 | a,b = map(int, input().split())
if a*b > 0:
print("Positive")
else:
if any(a,b) > 0:
print("Zero")
else:
print("Negative") |
s403172638 | p04033 | u148781101 | 1559870951 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 136 | a,b = map(int, input().split())
if a*b > 1:
print("Positive")
else:
if any(a,b) > 0:
print("Zero")
else:
print("Negative") |
s589674834 | p04033 | u957872856 | 1559347560 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 173 | a, b = map(int,input().split())
c = list(range(a,b+1))
num = 1
for i in c:
num *= i
if num > 0:
print("Positive")
elif num < 0:
print("Negative")
else:
print("Zero") |
s716653219 | p04033 | u169639579 | 1557890352 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 254 | #include<stdio.h>
int main(){
int a,b,mul,i;
scanf("%d %d",&a,&b);
mul = 1;
for(i=0;i<b-a+1;i++){
mul = mul*(a+i);
}
if(mul==0)
printf("Zero");
else if(mul>0)
printf("Positive");
else
printf("Negative");
return 0;
} |
s845757826 | p04033 | u169639579 | 1557889540 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 168 | #include<stdio.h>
int main(){
int a,b,c;
char s[101];
scanf("%d",&a);
scanf("%d %d",&b,&c);
scanf("%s",&s);
printf("%d %s",a+b+c,s);
return 0;
} |
s535695052 | p04033 | u252773293 | 1557450171 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 219 | a, b = map(int,input().split())
if b < 0:
if (b-a+1) % 2 == 0:
ans = 'Positive'
elif (b-a+1) % 2 == 1:
ans = 'Negative'
elif a > 0:
ans='Positive'
else
ans='Zero'
print(ans) |
s845029235 | p04033 | u252773293 | 1557450028 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 199 | a,b=map(int,input().split())
if b < 0:
if (b-a+1) % 2 == 0:
ans = 'Positive'
elif (b-a+1) % 2 == 1:
ans = 'Negative'
elif a > 0:
ans='Positive'
else
ans='Zero'
print(ans) |
s599558952 | p04033 | u252773293 | 1557449961 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 201 | a,b=map(int, input().split())
if b < 0:
if (b-a+1) % 2 == 0:
ans = 'Positive'
elif (b-a+1) % 2 == 1:
ans = 'Negative'
elif a > 0:
ans='Positive'
else
ans='Zeros'
print(ans) |
s114351110 | p04033 | u252773293 | 1557449909 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 196 | a,b=int(input().split())
if b < 0:
if (b-a+1) % 2 == 0:
ans = 'Positive'
elif (b-a+1) % 2 == 1:
ans = 'Negative'
elif a > 0:
ans='Positive'
else
ans='Zeros'
print(ans) |
s456443304 | p04033 | u252773293 | 1557449069 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 129 | a,b=int(input().split())
if a*(a+1)*b==0:
print('Zero')
if a*(a+1)*b<0:
print('Negative')
if a*(a+1)*b>0:
print('Positive') |
s612213923 | p04033 | u252773293 | 1557448966 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 111 | a,b=int(input().split())
if a*b==0:
print('Zero')
if a*b<0:
print('Negative')
if a*b>0:
print('Positive') |
s042963294 | p04033 | u282228874 | 1556808130 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38384 | 142 | a,b = map(int(input().split()))
if a <= 0 <= b:
print('Zero')
elif b < 0 and b%2 == a%2:
print('Negative')
else:
print("Positive") |
s750406369 | p04033 | u859897687 | 1554552501 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 137 | a,b=map(int,input().split())
if a*b<=0::
print("Zero")
else:
if a>0 or (b-a)%2>0:
print("Positive")
else:
print("Negative") |
s297094039 | p04033 | u227082700 | 1553832665 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 140 | a,b=map(int,input().split())
if a*b=0:print("Zero")
elif 0<a:print("Positive")
else:
if -a%2==0:print("Positive")
else:print("Negative") |
s867063820 | p04033 | u118642796 | 1552822605 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 178 | a,b = map(int,input())
if a<=0 and 0<=b:
print("Zero")
elif 0<a:
print("Positive")
elif (b-a+1)%2:
print("Negative")
else:
print("Positive")
|
s386799538 | p04033 | u977389981 | 1552423402 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 252 | a, b = map(int, input().split())
if a =< 0 and b >= 0:
ans = 'Zero'
elif a < 0 and b < 0:
if (abs(a) - abs(b) + 1) % 2 == 0:
ans = 'Positive'
else:
ans = 'Negative'
elif a > 0 and b > 0:
ans = 'Positive'
print(ans) |
s229945540 | p04033 | u175034939 | 1551397778 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 197 | a,b = map(int,input().split())
l = list(range(a,b+1))
ans = 1
for i in range(len(l)):
ans *= l[i]
if ans > 0:
print('Positive')
elif ans < 0:
print('Negative')
else:
print('Zero') |
s375709063 | p04033 | u175034939 | 1551397688 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 192 | a,b = map(int,input().split())
l = list(range(a,b+1))
ans = 1
for i in range(len(l)):
ans *= l[i]
if ans > 0:
print('Positive')
elif ans < 0:
print('Negative')
else:
print(0)
|
s822416535 | p04033 | u729133443 | 1551260816 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 87 | a,b=map(int,input().split());print('NPeogsaittiivvee'[a>0or(b-a)%2::2]*(a*b>0)or'Zero') |
s235741673 | p04033 | u794173881 | 1551239713 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 152 | a,b = map(int,input().split())
if a<=0 or 0<=b:
print("Zero)
elif a<0:
print("Positive" if abs(a-b)%2==1 else "Negative")
else:
print("Positive") |
s283770597 | p04033 | u303059352 | 1550298666 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1839 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<vvll> vvvll;
typedef vector<string> vstr;
typedef pair<ll, ll> pll;
typedef vector<pll> vp;
typedef map<ll, ll> mll;
typedef map<string, ll> mstrll;
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(ll i = ll(a); i < ll(b); i++)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep,)(__VA_ARGS__)
#define each(i, n) for(auto&& i: n)
#define out(x) cout << (x)
#define indent() cout << '\n'
#define print(x) cout << (x) << '\n'
#define debug(x) cerr << #x << ": " << (x) << '\n'
ll gcd(ll a, ll b){return b != 0 ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}
ll factorial(ll a){return a < 2 ? 1 : factorial(a - 1) * a;}
ll summation(ll a){return a < 1 ? 0 : (a * a + a) / 2;}
const ll INF = 1e16;
const ll MOD = 1e9 + 7;
const string ALPHABETS = "abcdefghijklmnopqrstuvwxyz";
ll dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
//ll dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1};
ll n, m, x, y, z, w, h;
string s, t;
signed main(){
cin.tie(0);
ios::sync_with_stdio(false);
while(cin >> n >> m){
ll ans = 0, tmp = 0, cnt = 0, mx = -INF, mn = INF;
ll a[] = {}, b[] = {}, c[] = {};
vll v;
if(n * m <= 0){
print("Zero");
}else{
if(n < 0){
print(abs(n - m) % 2 ? "Positive" : "Negative");
}else{
print("Positive");
}
}
}
}
|
s600555074 | p04033 | u540065900 | 1550182057 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 219 | G, B = map(int,input().split())
if G>0 and B>0:
print('Positive')
elif G<=0 and B>=0:
print('Zero')
elif a < 0 and b < 0:
if (b - a) % 2 == 0:
print("Negative")
else:
print("Positive") |
s845654596 | p04033 | u540065900 | 1550179455 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | G, B = map(int,input().split())
if G*B <= 0:
print('Zero')
elif G > 0:
print('Positive')
elif (b - a) % 2 == 0:
print('Negative') |
s806685868 | p04033 | u052347048 | 1549915725 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 169 | A, B = map(int, input().split())
if A > 0 and B > 0:
print("Positive")
elif A <= 0 <= B:
pritn("Zero")
else:
print("Positive" if (A-B)%2== 0 else "Negative") |
s585144020 | p04033 | u759434129 | 1546422796 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 389 | n, k = map(int, raw_input().split())
l = map(int, raw_input().split())
totallen = sum(l)
h = []
i = 0
j = n - 2
ans = []
while i <= j:
if totallen < k:
break
else:
if l[i] < l[j]:
ans.append(i + 1)
totallen -= l[i]
i += 1
else:
ans.append(j + 1)
totallen -= l[j+1]
j -= 1
if len(ans) == n - 1:
print "Possible"
for i in ans:
print i
else:
print "Impossible" |
s546405620 | p04033 | u459233539 | 1546319256 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 98 | a,b=map(int,input().split())
l=range(a,b+1)
ans=1
for i in rang(len(l)):
ans=ans*l[i]
print(ans) |
s706600334 | p04033 | u928784113 | 1545112462 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 172 | a,b = str(int,input().split())#整数を文字列として入力
S = a+b
P = S.count("-")
if P == 1:
print("0")
elif P == 2:
print("Negative")
else:
print("Positive") |
s324734804 | p04033 | u729133443 | 1539494762 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 87 | a,b=map(int,input().split());print('NPeogsaittiivvee'[a>0or(b-a)%2::2]*(a*b>0)or'Zero') |
s140893680 | p04033 | u729133443 | 1539494270 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 89 | a,b=map(int,input().split());print('Zero'*(a*b<=0)or'NPeogsaittiivvee'[b>=0or(b-a)%2::2]) |
s729437326 | p04033 | u729133443 | 1539492356 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | a,b=map(int,input().split());print('Zero'*(a+b==0or abs(a+b)<abs(a)+abs(b))or'NPeogsaittiivvee'[a>0or(b-a)%2::2]) |
s119041803 | p04033 | u111421568 | 1538180206 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 173 | a, b = map(int, input().split())
if a > 0:
print('Positive')
else if b >= 0:
print('Zero')
else if (b-a) % 2 == 1:
print('Positive')
else:
print('Negative') |
s917986751 | p04033 | u005260772 | 1533962061 | Python | Python (2.7.6) | py | Runtime Error | 12 | 2820 | 156 | a, b = map(int, raw_input().split())
if a * b < 0:
print 'Zero'
elif n + m < 0 and abs(a - b) & 1 == 0:
print 'Negative'
else:
print 'Positive'
|
s207384797 | p04033 | u005260772 | 1533961937 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 156 | a, b = map(int, raw_input().split())
s = 1
for i in range(a, b + 1):
s *= i
if s == 0:
print 'Zero'
else:
print ['Negative', 'Positive'][s > 0]
|
s402411214 | p04033 | u574050882 | 1533354955 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 238 | def main():
t = input().split(" ")
A = int(t[0])
B = int(t[1])
if B < 0:
if (B - A) % 2 == 1
print("Positive")
else :
print("Negative")
elif 0 < A:
print("Positive")
else:
print("Zero")
main() |
s225803863 | p04033 | u574050882 | 1533354742 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 179 | def main():
t = input().split(" ")
A = int(t[0])
B = int(t[1])
if b < 0:
print("Negative")
elif 0 < a:
print("Positive")
else:
print("Zero")
main() |
s269836936 | p04033 | u627417051 | 1531459821 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 209 | a, b = list(map(int, input().split()))
if a = 0:
print("Zero")
elif a > 0:
print("Positive")
else:
if b >= 0:
print("Zero")
else:
if (b - a) % 2 == 0:
print("Negative")
else:
print("Positive")
|
s028747470 | p04033 | u306142032 | 1529067307 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 1303 | a, b = map(int, input().split())
nega_cnt = 0
is_zero = False
for x in range(a, b+1):
if x < 0:
nega_cnt += 1
elif x == 0:
print("Zero")
is_zero = True
if not is_zero:
if nega_cnt % 2 == 1:
print("Negative")
else:
print("Positive")
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
s508976362 | p04033 | u952708174 | 1526913509 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 207 | a,b = [int(i) for i in input().split()]
if a > 0:
print('Positive')
elif a = 0:
print('Zero')
else:
if b >= 0:
print('Zero')
elif b-a % 2 == 0:
print('Negative')
else:
print('Positive') |
s844023453 | p04033 | u304608668 | 1526079555 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 221 | a, b = input().split()
a, b = int(a), int(b)
if a < 0 < b:
print("Zero")
else 0 < a < b:
print("Positive")
if a < b < 0:
if (b - a + 1) % 2 == 0:
print("Positive")
else:
print("Negative")
|
s718574067 | p04033 | u304608668 | 1526079515 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 265 | a, b = input().split()
a, b = int(a), int(b)
n = 1
for i in range(a, b + 1):
n *= i
if a < 0 < b:
print("Zero")
else 0 < a < b:
print("Positive")
if a < b < 0:
if (b - a + 1) % 2 == 0:
print("Positive")
else:
print("Negative")
|
s017517286 | p04033 | u192442087 | 1524664032 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 254 | a,b = list(map(int,input().split()))
if( a > b ):
a,b = b,a
if a > 0 and b > 0:
print("Positive")
elif a <= 0 and b >= 0:
print("Zero")
else:
if (abs(a) - abs(b)) % 2 == 0:
print("Negative")
else:
print("Pisitive")-1 1 |
s683172787 | p04033 | u047668580 | 1522520996 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 340 | N,M = map(int,input().split())
a = []
for i in range(M):
a.append(input())
b = [0 for i in range(N)]
b[0] = 1
c = [1 for i in range(N)]
for d in a:
fr,to = map(int,d.split())
fr -=1
to -=1
c[fr ] -= 1
c[to ] += 1
if b[fr] > 0:
b[to] = 1
b[fr] = 1 if c[fr] > 0 else 0
ans = b.count(1)
print(ans) |
s387281927 | p04033 | u030726788 | 1521596139 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 176 | a,b=map(int,input())
if(a>0):print("Positive")
elif(a==0):print("Zero")
else:
if(b>=0):print("Zero")
else:
if((b-a+1)%2==0):print("Positive")
else:print("Negative") |
s774259931 | p04033 | u033407970 | 1497652103 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 320 | n,m = [int(x) for x in input().split(' ')]
prob = [1] + [0 for x in range(n-1)]
ball = [1 for x in range(n)]
for i in range(m):
x,y = [int(x) for x in input().split(' ')]
ball[x-1] -= 1
ball[y-1] += 1
if prob[x-1] == 1:
prob[y-1] = 1
if ball[x-1] == 0:
prob[x-1] = 0
print(sum(prob)) |
s441668241 | p04033 | u058240079 | 1491498571 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 374 | n,m = map(int, raw_input().split())
rl = [0.0 for _ in range(n)]
wl = [1.0 for _ in range(n)]
rl[0] = 1.0
wl[0] = 0.0
for _ in range(m):
x,y = map(int, raw_input().split())
p = rl[x-1] + wl[x-1]
rl[y-1] += rl[x-1] / p
wl[y-1] += wl[x-1] / p
rl[x-1] -= rl[x-1] / p
wl[x-1] -= wl[x-1] / p
cnt = 0
for p in rl:
if p != 0:
cnt += 1
print cnt
|
s071384065 | p04033 | u043805613 | 1486096182 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 252 | a,b = map(int,raw_input().split())
sum=1
if((a<0 and b>0) or a==0 or b==0):
print("Zero")
elif(a>0):
print("Positive")
else:
for i in range(a,b+1):
sum*=i
if(sum>0):
print("Positive")
else:
print("Negative")
|
s484926148 | p04033 | u043805613 | 1486096114 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 219 | a,b = map(int,raw_input().split())
sum=1
if((a<0 and b>0) or a==0 or b==0):
print("Zero")
else:
for i in range(a,b+1):
sum*=i
if(sum>0):
print("Positive")
else:
print("Negative")
|
s080347534 | p04033 | u043805613 | 1486095783 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 168 | a,b = map(int,raw_input().split())
sum=1
for i in range(a,b+1):
sum*=i
if(sum>0):
print("Positive")
elif(sum==0):
print("Zero")
else:
print("Negative")
|
s468342102 | p04033 | u637175065 | 1474570643 | Python | Python (3.4.3) | py | Runtime Error | 37 | 3064 | 355 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7
def f():
a,b = list(map(int, input().split()))
if a * b == 0 or (a < 0 && b > 0):
return 'Zero'
if b < 0 and (a+b) % 2 == 0:
return 'Negative'
return 'Positive'
print(f())
|
s189097887 | p04033 | u637175065 | 1474570603 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3064 | 354 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7
def f():
a,b = list(map(int, input().split()))
if a * b == 0 or (a < 0 && b > 0):
return 'Zero'
if b < 0 and (a+b) % 2 == 0
return 'Negative'
return 'Positive'
print(f())
|
s782043735 | p04033 | u284188208 | 1474304263 | Python | Python (2.7.6) | py | Runtime Error | 25 | 2568 | 156 | a,b = map(int, raw_input().split())
c = 1
for i in range(a,b+1):
c = c * i
if c < 0:
print "Negative"
elif c == 0:
print "Zero"
else:
print "Positive" |
s836317232 | p04033 | u365128102 | 1471562598 | Python | Python (3.4.3) | py | Runtime Error | 42 | 3064 | 154 | a=input()
b=input()
a=int(a)
b=int(b)
p=1
for i in range(a, b):
p=p*i
if p>0:
print ('Positive')
elif p<0:
print ('Negative')
else:
print ('Zero') |
s769870430 | p04033 | u365128102 | 1471562506 | Python | Python (2.7.6) | py | Runtime Error | 28 | 2688 | 154 | a=input()
b=input()
a=int(a)
b=int(b)
p=1
for i in range(a, b):
p=p*i
if p>0:
print ('Positive')
elif p<0:
print ('Negative')
else:
print ('Zero') |
s504909724 | p04033 | u365128102 | 1471562092 | Python | Python (2.7.6) | py | Runtime Error | 27 | 2568 | 132 | a=input()
b=input()
p=1
for i in range(a, b):
p=p*i
if i>0:
print 'Positive'
elif i<0:
print 'Negative'
else:
print 'Zero'
|
s316389742 | p04033 | u163073599 | 1470942558 | Python | Python (3.4.3) | py | Runtime Error | 38 | 3064 | 415 | n, l = (int(s) for s in input().strip().split(' '))
an = []
for a in range(0,l):
an.append(input().strip().split())
box=[[1,0] for i in range(n)]
box[0][1] = 1
for move in an:
box[int(move[0])-1][0] -= 1
box[int(move[1])-1][0]+=1
if box[int(move[0])-1][1] == 1:
box[int(move[1])-1][1]= 1
if box[int(move[0])-1][0]==0:
box[int(move[0])-1][1]=0
print(str(sum([s[1] for s in box]))) |
s461369534 | p04033 | u163073599 | 1470942504 | Python | Python (3.4.3) | py | Runtime Error | 39 | 2940 | 472 | n, l = (int(s) for s in input().strip().split(' '))
an = []
for a in range(0,l):
an.append(input().strip().split())
box=[[1,0] for i in range(n)]
box[0][1] = 1
for move in an:
box[int(move[0])-1][0] -= 1
box[int(move[1])-1][0]+=1
if box[int(move[0])-1][1] == 1:
box[int(move[1])-1][1]= 1
if box[int(move[0])-1][0]==0:
box[int(move[0])-1][1]=0
print(str(sum([s[1] for s in box]))) |
s947751100 | p04033 | u825624694 | 1470343598 | Python | Python (3.4.3) | py | Runtime Error | 42 | 3064 | 128 | a,b = map(int,input().split())
if a*b<=0:
print(Zero)
elif a<0 and (b-a)%2==0:
print(Positive)
else:
print(Negative) |
s181655786 | p04033 | u825624694 | 1470343531 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3188 | 130 | a,b = map(int,input().split())
if(a*b<=0):
print(Zero)
elif(a<0 and (b-a)%2==0):
print(Positive)
else:
print(Negative) |
s162799977 | p04033 | u825624694 | 1470343478 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3064 | 127 | a,b = map(int,input().split())
if(a*b<=0)
print(Zero)
elif(a<0 and (b-a)%2==0)
print(Positive)
else
print(Negative) |
s478263757 | p04033 | u825624694 | 1470343420 | Python | Python (3.4.3) | py | Runtime Error | 40 | 3064 | 118 | a,b = map(int,input().split())
if(a*b<=0)
print(Zero)
elif(a<0 and (b-a)%2==0)
print(Positive)
else
print(Negative) |
s300454518 | p04033 | u825624694 | 1470343371 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3064 | 116 | a,b = map(int,input().split())
if(a*b<=0)print(Zero)
elif(a<0 and (b-a)%2==0)
print(Positive)
else
print(Negative) |
s852638892 | p04033 | u825624694 | 1470343330 | Python | Python (3.4.3) | py | Runtime Error | 38 | 3064 | 116 | a,b = map(int,input().split())
if(a*b<=0)print(Zero)
elif(a<0 and (b-a)%2==0)
print(Positive)
else
print(Negative) |
s482892087 | p04033 | u825624694 | 1470343278 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3064 | 114 | a,b = map(int,input().split())
if(a*b<=0)print(Zero)
elif(a<0 and b-a%2==0)
print(Positive)
else
print(Negative) |
s507032020 | p04033 | u825624694 | 1470343248 | Python | Python (3.4.3) | py | Runtime Error | 38 | 3064 | 114 | a,b = map(int,inout().split())
if(a*b<=0)print(Zero)
elif(a<0 and b-a%2==0)
print(Positive)
else
print(Negative) |
s247762567 | p04033 | u299869545 | 1470056123 | Python | Python (2.7.6) | py | Runtime Error | 26 | 2568 | 164 | a,b = map(int, raw_input().split())
cnt = b - a + 1
if a > 0:print 'Positive'
elif b < 0:print ['Positive', 'Negative'][cnt%2]
else:print 'Zero' |
s344202759 | p04033 | u133038626 | 1470019170 | Python | Python (3.4.3) | py | Runtime Error | 108 | 6220 | 1066 | # coding: utf-8
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
def eat_all(al):
for i in range(len(al)):
al[i] -= 1
while True:
if al[0] == 0:
al.pop(0)
else:
break
return al
def step(turn, a_list):
if len(a_list) == 1:
if a_list[0] % 2 == 0:
return turn
else:
return (not turn)
if a_list[-1] % 2 != 0:
a_list.pop()
return step(not turn, a_list)
else:
a_list = eat_all(a_list)
a_list.pop()
if len(a_list) == 0:
return turn
return step(turn, a_list)
n = int(input())
a_list = [None] * n
inputs = input().split(" ")
for i in range(n):
a_list[i] = int(inputs[i])
a_list.sort()
win = step(1, a_list)
if win == 1:
print("First")
else:
print("Second")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.