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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s771625099 | p03631 | u582618615 | 1506356675 | Python | PyPy2 (5.6.0) | py | Runtime Error | 35 | 28524 | 735 | import sys
#sys.stdin = open('Transit_Tree_Path.txt', 'r')
def dfs(g, start):
dist = [-1 for i in xrange(len(g))]
dist[start] = 0
q = [start]
while len(q) > 0:
u = q.pop()
for v, l in g[u].iteritems():
if dist[v] == -1 or dist[u] + l < dist[v]:
dist[v] = dis... |
s259163748 | p03631 | u582618615 | 1506356395 | Python | PyPy2 (5.6.0) | py | Runtime Error | 42 | 28524 | 723 | import sys
#sys.stdin = open('Transit_Tree_Path.txt', 'r')
def spfa(g, start):
dist = [1e15 for i in xrange(len(g))]
dist[start] = 0
q = [start]
while len(q) > 0:
u = q.pop(0)
for v, l in g[u].iteritems():
if dist[u] + l < dist[v]:
dist[v] = dist[u] + l
... |
s751793452 | p03631 | u813450984 | 1506263173 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3060 | 161 | s = input().split()
A = int(s[0])
B = int(s[1])
C = int(s[2])
D = int(s[3])
a_c = max(A, C)
b_d = min(B, D)
if a_c - b_d:
print(a_c - b_d)
else:
print("0") |
s074630097 | p03631 | u813450984 | 1506262533 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 175 | s = map(int, input().split())
A, B, C, D = [i for i in s]
greater = max(A, C)
less = min(B, D)
if min(0, greater - less):
print(min(0, greater- less)
else:
print("0") |
s373777157 | p03631 | u482969053 | 1506202910 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 82 | # coding: utf-8
# Here your code !
N = int(input())
A = int(input())
print(N*N-A) |
s676382273 | p03631 | u112465297 | 1505268675 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3436 | 585 | import sys;sys.setrecursionlimit(int(1e7))
from sys import stdin
from collections import deque
input = stdin.readline
N = int(input())
tree = [[] for _ in range(N+1)]
for _ in range(N-1):
a, b, c = map(int,input().split())
tree[a].append((b,c))
tree[b].append((a,c))
Qn,K = map(int,input().split())
XY = ... |
s959011785 | p03631 | u301823349 | 1505151377 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 270 | N = int(input())
T = []
for _ in range(N):
T.append(int(input()))
def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(a, b):
return a * b // gcd (a, b)
result = lcm(T[0],T[1])
for x in range(2,N):
result = lcm(result, T[x])
print(result)
|
s841996518 | p03631 | u112465297 | 1505071506 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 248 | def gcd(a,b):
#a=min(a,b)
#b=max(a,b)
while b:
a,b= b, a%b
return a
def lcm(a,b):
return a*b//gcd(a,b)
T=[]
N=int(input())
for i in range(N):
T.append(int(input()))
ans=1
for t in T:
ans=lcm(ans, t)
print(ans) |
s988961772 | p03631 | u449998745 | 1504425872 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38768 | 211 | a,b,c,d=map(int,input().split())
alice=[x for x in range(a,b+1)]
bob=[x for x in range(c,d+1)]
kaburi=list(set(alice) & set(bob))
if len(kaburi)<=1:
print(0)
else:
ans=kaburi[-1]-kaburi[0]
print(ans) |
s845712564 | p03631 | u449998745 | 1504425734 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38640 | 211 | a,b,c,d=map(int,input().split())
alice=[x for x in range(a,b+1)]
bob=[x for x in range(c,d+1)]
kaburi=list(set(alice) & set(bob))
if len(kaburi)<=1:
print(0)
else:
ans=kaburi[-1]-kaburi[0]
print(ans) |
s703087095 | p03631 | u041297389 | 1504062331 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 286 | a,b,c,d = map(int, input().split())
if a==c:
print(abs(b-d))
elif a>c:
if a>d:
print(0)
elif a<d<b:
print(abs(a-d))
else:
print(abs(a-b))
else:
if c>b:
print(0)
elif c<b<d:
print(abs(c-b))
else:
print(abs(c-d)) |
s039833280 | p03631 | u041297389 | 1504062292 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 286 | a,b,c,d = map(int, input().split())
if a==c:
print(abs(b-d))
elif a>c:
if a>d:
print(0)
elif a<d<b:
print(abs(a-d))
else:
print(abs(a-b))
else:
if c>b:
print(0)
elif c<b<d:
print(abs(c-b))
else:
print(abs(c-d)) |
s835305171 | p03631 | u041297389 | 1504062118 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 286 | a,b,c,d = map(int, input().split())
if a==c:
print(abs(b-d))
elif a>c:
if a>d:
print(0)
elif a<d<b:
print(abs(a-d))
else:
print(abs(a-b))
else:
if c>b:
print(0)
elif c<b<d:
print(abs(c-b))
else:
print(abs(c-d)) |
s196348585 | p03631 | u041297389 | 1504036949 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 82 | x = input()↲
if x[0] == x[2]:↲
print('Yes')↲
else:↲
print('No')↲ |
s459767882 | p03631 | u425351967 | 1503956932 | Python | Python (3.4.3) | py | Runtime Error | 40 | 5308 | 161 | from fractions import gcd
N = int(input())
T = []
for i in range(N):
T.append(int(input()))
res = 1
for t in T:
res = int(res/(gcd(res, t))) * t
print(res) |
s301125749 | p03631 | u916637712 | 1503539840 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 109 | tmp=map(int, raw_input().split(" "))
if tmp[1]<tmp[2]:
print 0
else:
print min(tmp[1],tmp[3])-tmp[2]
|
s040745461 | p03631 | u174404613 | 1503361216 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | l=list(map(int,input().split()))
ans=min(l[1],l[3])-max(l[0],l[2])
print(ans if ans>0 else 0) |
s887367261 | p03631 | u182601079 | 1503360578 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 111 | A,B,C,D = map(int,input().split())
if (B < C or D < A):
print("0")
else:
print(abs(max(A,C)-min(B,D))) |
s679624457 | p03631 | u333339520 | 1503276342 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 152 | N = input( )
N_100 = N // 100
N = N - 100 * N_100
N_10 = N // 10
N = N - 10 * N_10
N_1 = N
if N_100 == N_1:
print ('Yes')
else :
print ('No') |
s023124285 | p03631 | u463836923 | 1503276030 | Python | Python (3.4.3) | py | Runtime Error | 209 | 5944 | 189 | #coding=UTF-8
#import math math.gcd was added in ver 3.5
import fractions
N=int(input())
ans=1
for idx in range(0,N,1):
T=int(input())
ans=ans*T// fractions.gcd(ans,T)
print(ans)
|
s139811794 | p03631 | u677320550 | 1503251110 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 79 | N=int(input())
if (N[0]==N[-1]):
print('Yes')
else:
print('No') |
s991635484 | p03631 | u677320550 | 1503251068 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | N=input()
if (N[0]==N[-1]):
print('Yes')
else:
print('No') |
s730482341 | p03631 | u677320550 | 1503251004 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 72 | N=input()
if N[0]==N[-1]:
print('Yes')
else:
print('No') |
s116412853 | p03631 | u677320550 | 1503250931 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 88 | N=int (input())
if N[0]==N[-1]:
print('Yes')
else:
print('No')
|
s203728425 | p03631 | u319984556 | 1503224941 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 169 | s = input()
a = len(s)
for i in s:
if s[i] == s[a - 1 -i] :
b = 1
else:
b = 0
break
if b == 1:
print('Yes')
else:
print('No')
|
s032731544 | p03631 | u409483795 | 1503040656 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 349 | sec = input().split(' ')
#sec = ['0','75','25','100']
#sec = ['0','33','66','99']
#print(sec[0],sec[1],sec[2],sec[3])
#開始時間選定
start = max(sec[0],sec[2])
#print('開始:' + start)
#終了時間選定
end = min(sec[1],sec[3])
#print('終了:' + end)
kekka =(int(end) - int(start))
if kekka < 1:
kekka = 0
print(kekka)
else:
print(kekka) |
s122412369 | p03631 | u735154525 | 1502985671 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 157 | a, b, c, d = map(int, raw_input().split())
print a, b, c, d
if a >= c:
ans = b - c
else:
ans = d - a
if ans < 0:
print 0
else:
print ans
|
s172054460 | p03631 | u725500654 | 1502937863 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 115 | a=input()
b=input()
c=input()
d=input()
fast=max(int(a),int(c))
last=min(int(b),int(d))
print max(0,int(last-fast)) |
s279380657 | p03631 | u725500654 | 1502936558 | Python | Python (3.4.3) | py | Runtime Error | 16 | 3060 | 162 | a=input()
b=input()
c=input()
d=input()
if a<c:
fast=c
else:
fast=a
if b<d:
last=b
else:
last=d
if b<c:
print("0")
else:
print(last-fast) |
s722665025 | p03631 | u642905089 | 1502933283 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 213 | def gcd(a,b):
if b == 0:
return a
else:
return gcd(b, a % b)
N = int(input())
a = int(input())
b = 0
for i in range(N-1):
b = int(input())
a = (a*b) // gcd(a,b)
print(a) |
s758944937 | p03631 | u642905089 | 1502933144 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 242 | def gcd(a,b):
if b == 0:
return a
else:
return gcd(b, a % b)
N = int(input())
Ts = [None for i in range(N)]
a = int(input())
b = 0
for i in range(N-1):
b = int(input())
a = (a*b) // gcd(a,b)
print(a) |
s541190817 | p03631 | u563648702 | 1502915986 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 195 |
a,b,c,d = map(int,input().split())
if(b<c):print (0)
elif(b==c):
if(b == 0):print(0)
else:print(1)
else:
start = a if a>c else c
end = b if b<d else d
print(end - start)
|
s091204260 | p03631 | u518455500 | 1502914430 | Python | Python (3.4.3) | py | Runtime Error | 37 | 5048 | 184 | import fractions
def lcm(a,b):
g = fractions.gcd(a,b)
return (a/g) * b
n = int(input())
ans = 1
for i in range(n):
t = int(input())
ans = lcm(ans,t)
print(int(ans)) |
s948747318 | p03631 | u280667879 | 1502829531 | Python | Python (2.7.6) | py | Runtime Error | 109 | 11860 | 228 | import sys
from scipy.sparse import*
f=lambda*z:map(int,sys.stdin.readline().split())
n,=f();a,b,c=zip(*map(f,[0]*~-n));q,k=f()
z=csgraph.dijkstra(csr_matrix((c,(a,b)),[n+1]*2),0,k)
for _ in range(q):x,y=f();print int(z[x]+z[y]) |
s506297588 | p03631 | u216289806 | 1502821464 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 327 | def gcd(a,b):
if a<b:
c=a
a=b
b=c
c=a%b
if c==0:
return a
else:
return b
def lcm(a,b):
c=gcd(a,b)
return a/c*b
n=int(input())
t=[0]*n
for lop2 in range(n):
t[lop2]=int(input())
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t[lop])
print(int... |
s857115606 | p03631 | u216289806 | 1502821408 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 284 | def gcd(a,b):
if a<b:
c=a
a=b
b=c
c=a%b
return b
def lcm(a,b):
c=gcd(a,b)
return a/c*b
n=int(input())
t=[0]*n
for lop2 in range(n):
t[lop2]=int(input())
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t[lop])
print(int(ans))
|
s890233650 | p03631 | u216289806 | 1502821161 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 330 |
def gcd(a,b):
if a<b:
d=a
a=b
b=d
c=a%b
if c==0:
return b
else:
return gcd(b,c)
def lcm(a,b):
c=gcd(a,b)
return a/c*b
n=int(input())
t=[0]*n
for lop2 in range(n):
t[lop2]=int(input())
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t[lop])
print... |
s077179589 | p03631 | u216289806 | 1502821120 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 226 |
def gcd(a,b):
return b
def lcm(a,b):
c=gcd(a,b);
return a/c*b
n=int(input())
t=[0]*n
for lop2 in range(n):
t[lop2]=int(input())
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t[lop])
print(int(ans)) |
s842313089 | p03631 | u216289806 | 1502821068 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 230 |
def gcd(a,b):
return b
def lcm(a,b):
c=gcd(a,b);
return a/c*b
n=int(input())
t=[0]*n
for lop2 in range(n):
t[lop2]=int(input())
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t[lop])
print(int(ans)) |
s659652386 | p03631 | u216289806 | 1502821048 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 334 |
def gcd(a,b):
if a<b:
d=a;
a=b;
b=d;
c=a%b
if c==0:
return b
else:
return gcd(b,c)
def lcm(a,b):
c=gcd(a,b);
return a/c*b
n=int(input())
t=[0]*n
for lop2 in range(n):
t[lop2]=int(input())
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t[lop])
p... |
s106408897 | p03631 | u155337518 | 1502782110 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 60 | n=input()
if n[0]==n[-1]:
return 'Yes'
else:
return 'No' |
s199840284 | p03631 | u364386647 | 1502736726 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 311 | N = int(input())
T = [int(input()) for i in range(N)]
import fractions
def lcm(a, b):
if gcd != 0:
return (a * b) // gcd
else:
return 0
gcd = 1
x = 0
for i in range(N):
for j in range(N):
gcd = int(fractions.gcd(T[i] , T[j]))
x = max(lcm(T[i], T[j]), x)
print(x)
|
s835949078 | p03631 | u047535298 | 1502736332 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 251 | n = int(input())
lcm = 0
gcd = 0
for i in range(n):
t = int(input())
if(i == 0):
lcm, gcd = t, t
continue
lcm = t
r = gcd % t
while(r!=0):
lcm = r
r = t % r
gcd *= t
gcd //= lcm
print(gcd)
|
s134822421 | p03631 | u793383875 | 1502668193 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 76 | a=input()
b=.join(reversed(a));
if(a==b):
print('Yes')
else:
print('No') |
s719692040 | p03631 | u793383875 | 1502667841 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 65 | a=input()
b=reverse(a);
if a==b:
print('Yes')
else:
print('No') |
s304599220 | p03631 | u160414758 | 1502662234 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 677 | class edge():
def __init__(self,_to,_cost):
self.to = _to;
self.cost = _cost;
N = int(input())
tree = [[] for i in range(N)]
for i in range(N-1):
a,b,c = list(map(int,input().split()))
a = a - 1
b = b - 1
tree[a].append(edge(b,c))
tree[b].append(edge(a,c))
Q,K = list(map(int,in... |
s263829134 | p03631 | u160414758 | 1502660420 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 630 |
class edge():
def __init__(self,_to,_cost):
self.to = _to;
self.cost = _cost;
N = int(input())
tree = [[] for i in range(N)]
for i in range(N-1):
a,b,c = list(map(int,input().split()))
a = a - 1
b = b - 1
tree[a].append(edge(b,c))
tree[b].append(edge(a,c))
Q,K = list(map(int,i... |
s705833037 | p03631 | u160414758 | 1502657591 | Python | PyPy3 (2.4.0) | py | Runtime Error | 160 | 38256 | 627 | class edge():
def __init__(self,_to,_cost):
self.to = _to;
self.cost = _cost;
N = int(input())
tree = [[] for i in range(N)]
for i in range(N-1):
a,b,c = list(map(int, input().split()))
a = a - 1
b = b - 1
tree[a].append(edge(b,c))
tree[b].append(edge(a,c))
Q, K = list(map(int,... |
s352971505 | p03631 | u160414758 | 1502656889 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 628 | N = int(input())
class edge:
def __init__(self,_to,_cost):
self.to = _to;
self.cost = _cost;
tree = [[] for i in range(N)]
for i in range(N-1):
a,b,c = list(map(int, input().split()))
a = a - 1
b = b - 1
tree[a].append(edge(b,c))
tree[b].append(edge(a,c))
Q, K = list(map(int,... |
s359606077 | p03631 | u220854328 | 1502641111 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2820 | 877 | import sys
x = input()
d = {}
dist = {}
for i in range(1, x+1):
d[i] = []
dist[i] = 0
for i in range(x-1):
num1, num2, num3 = map(int, sys.stdin.readline().split())
d[num1].append((num2, num3))
d[num2].append((num1, num3))
q, k = map(int, raw_input().split())
vis = set()
vis.add(k)
current = [k]
ne... |
s402302362 | p03631 | u080990738 | 1502632330 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | a=[int(d) for d in str(n)];
if b==a[-1:];
return True
else:
return False |
s370014101 | p03631 | u163703551 | 1502602669 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 948 | import sys
# sys.stdin = open('d1.in')
def read_int_list():
return list(map(int, input().split()))
def read_str_list():
return input().split()
def read_int():
return int(input())
def read_str():
return input()
def main():
inf = 10 ** 20
n = read_int()
adj = [[] for u in range(n)]... |
s477118433 | p03631 | u870965055 | 1502600485 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 372 | #include <bits/stdc++.h>
#define rep(i,n) for(li i=0;i<(n);i++)
#define red(i,n) for(li i=(n)-1;i>=0;i--)
#define all(a) begin(a),end(a)
#define pb(a) push_back(a)
using namespace std;
using li = long long;
using vi = vector<li>;
using vs = vector<string>;
int main()
{
char a,b;
cin>>a>>b>>b;
co... |
s100233935 | p03631 | u172190653 | 1502596221 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 67 | n = list(input())
if n[0]==n[2]:
print("Yes")
else:
print("No") |
s733978919 | p03631 | u172190653 | 1502596097 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 71 | n = list(input())
if n[0]==n[2]:
print("Yes")
else:
print("No") |
s795495491 | p03631 | u172190653 | 1502596055 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 71 | n = list(input())
if n[0]==n[2]:
print("Yes")
else:
print("No") |
s487426591 | p03631 | u875361824 | 1502595852 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 467 | def main():
N = int(input().strip())
res = int(input().strip())
if N == 1:
print(res)
return
for _ in range(1, N):
t = int(input().strip())
res = lcm(res, t)
print(res)
def lcm(a, b):
return (a * b) / gcd(a, b)
def gcd(a, b):
if b == 0:
return a
... |
s767399587 | p03631 | u690342431 | 1502594785 | Python | Python (3.4.3) | py | Runtime Error | 47 | 5588 | 191 | from fractions import gcd
from functools import reduce
def lcm(a, b):
return a*b // gcd(a, b)
N = int(input())
T = []
for _ in range(N):
T.append(int(input()))
print(reduce(lcm, T)) |
s417913445 | p03631 | u690342431 | 1502594526 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 192 | from math import gcd
from functools import reduce
def lcm(a, b):
return int(a*b / gcd(a, b))
N = int(input())
T = []
for _ in range(N):
T.append(int(input()))
print(reduce(lcm, T))
|
s456687697 | p03631 | u451017206 | 1502594484 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3188 | 665 | N = int(input())
g = {i: []for i in range(1, N+1)}
cache = {}
def dfs(g,start,end):
stack = [(start, [start], 0)]
while stack:
(v, path, length) = stack.pop()
for next,l in g[v]:
if next in path: continue
if next == end:
return length + l
... |
s959384481 | p03631 | u473999868 | 1502593808 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3572 | 172 | import math as m
from functools import reduce
n=int(input())
l=[]
def f(a,b):
return int(a*b/m.gcd(a,b))
for i in range(n):
l.add(int(input()))
print(reduce(f,l)) |
s524120491 | p03631 | u868040597 | 1502591573 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 439 | # coding: utf-8
n = int(input())
t = sorted([int(input()) for i in range(n)])
def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(a, b):
return a * b // gcd(a, b)
def nlcm(list):
if len(list) > 2:
lcm_num = lcm(list[0], list[1])
for i in range(2, len(list)):
lcm_num = lcm(lcm_num, l... |
s291678496 | p03631 | u268210555 | 1502591461 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 56 | a,_b=input()
if a==b:
print("YES")
else:
print("No") |
s759915466 | p03631 | u268210555 | 1502591334 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 56 | a,_b=input()
if a==b:
print("YES")
else:
print("No") |
s067913579 | p03631 | u653807637 | 1502591312 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3184 | 1294 | # encoding:utf-8
import sys
def main():
n = int(input())
vers = [list(map(int, input().split())) for _ in range(n - 1)]
q, k = list(map(int, input().split()))
queries = [list(map(int, input().split())) for _ in range(q)]
#n = 10 ** 5
#vers = [[i + 1, i + 2, 10 ** 9] for i in range(n - 1)]
new_vers = mappin... |
s580385320 | p03631 | u521902517 | 1502589625 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 187 | start = 0
end = len(N) - 1
result = True
while start < end:
if N[start] == N[end]:
start += 1
end -= 1
else:
result = False
break
return result |
s263377002 | p03631 | u521902517 | 1502589571 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 186 | start = 0
end = len(N) - 1
result = True
while start < end:
if N[start] == N[end]:
start += 1
end -= 1
else:
result = False
break
return resul |
s273727662 | p03631 | u521902517 | 1502589512 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 187 | start = 0
end = len(N) - 1
result = True
while start < end:
if N[start] == N[end]:
start += 1
end -= 1
else:
result = False
break
return result |
s702697745 | p03631 | u867069435 | 1502588769 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 611 | a = input().split()
ast = int(a[0])
aen = int(a[1])
bst = int(a[2])
ben = int(a[3])
if ast > ben or bst > aen:
print("0")
elif ast < bst and aen < ben:
print(aen - bst)
elif ast < bst and aen > ben:
print(ben - bst)
elif bst < ast and ben < aen:
print(ben -ast)
elif bst < ast and ben > aen:
print(ae... |
s686818962 | p03631 | u584459098 | 1502588708 | Python | Python (3.4.3) | py | Runtime Error | 54 | 5588 | 217 | from fractions import gcd
def lcm(a, b):
return a*b/gcd(a, b)
N = int(input())
T = list(int(input()) for i in range(N))
T = list(set(T))
T.sort()
a = lcm(T[0], T[1])
for i in T[2:]:
a = lcm(a, i)
print(int(a)) |
s500412224 | p03631 | u525117558 | 1502588123 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 66 | a=input().split()
if(a[0]==a[2]):
print("Yes")
else:
print("No") |
s506390130 | p03631 | u525117558 | 1502588004 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 64 | a=input().split
if(a[0]==a[2]):
print("Yes")
else:
print("No") |
s892284991 | p03631 | u868040597 | 1502587252 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 140 | # coding: utf-8
a, b, c, d = map(int, input().split())
if c <= b:
if b <= d:
print(b - c)
else:
print(d - c)
else:
print(0)
|
s664928445 | p03631 | u178509296 | 1502587009 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 163 | A,B,C,D = map(int, input().split())
if D<A or B<C: print("0")
elif A<C and D<B: print(D-C)
elif C<A and B<D: print(B-A)
elif D-A < B-C: print(D-A)
else: print(B-C) |
s204273509 | p03631 | u868040597 | 1502586771 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | # coding: utf-8
a, b, c, d = map(int, input().split())
if c <= b:
print(b - c)
else:
print(0)
|
s256436111 | p03631 | u178509296 | 1502586617 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 108 | A,B,C,D = map(int, input().split())
if D<A or B<C: print("0")
else if D-A < B-C: print(D-A)
else: print(B-C) |
s352234721 | p03631 | u178509296 | 1502586142 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 39 | N = input()
if N[0] == N[2]: print(Yes) |
s017410815 | p03632 | u751549333 | 1599875249 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8992 | 76 | a, b, c, d = map(int, input().split())
print(max(min(b, d) - max(a, c), 0)) |
s132632651 | p03632 | u095021077 | 1599567025 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8884 | 117 | A, B, C, D=map(int, input().split())
X=set([for i in range(A, B+1)])
print(sum([1 for i in range(C, D+1) if i in X])) |
s710124909 | p03632 | u384793271 | 1598357900 | Python | Python (3.8.2) | py | Runtime Error | 21 | 9028 | 75 | a, b, c, d = map(int, input().split())
print(max(min(b, d) - max(a, c), 0) |
s837846913 | p03632 | u826637752 | 1598307045 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9072 | 135 | l = list(map(int,input().split()))
if l[1] < l[2]:
print(0)
elif l[0] > l[4]:
print(0)
else:
l.sort()
print(l[2]-l[1]) |
s411062956 | p03632 | u826637752 | 1598306996 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9136 | 122 | l = list(map(int,input().split()))
if l[1] < l[2]:
print(0)
elif l[0] > l[4]:
print(0)
else:
print(l[2]-l[1]) |
s078334253 | p03632 | u826637752 | 1598306693 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9012 | 62 | l = list(map(int.input().split()))
l.sort()
print(l[2]-l[1]) |
s873573398 | p03632 | u357751375 | 1594066694 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9096 | 82 | a,b,c,d = map(int(input().split()))
if b > c:
print(b - c)
else:
print(0) |
s352924218 | p03632 | u029056424 | 1593983752 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8884 | 94 | a,b,c,d=map(int,input().split())
if b<=c or d<=a:
print(0)
else:
print(min(d,b)-max(a-c)) |
s191637099 | p03632 | u217303170 | 1592643777 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8924 | 76 | a,b,c,d=map(int,input().split())
if b>c:
print(b-c-a)
elif:
print(0) |
s696535084 | p03632 | u757274384 | 1591567270 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 189 | a,b,c,d = map(int, input(),split())
if b < c or d < a:
print("0")
elif a <= c:
if b <= d:
print(b-c)
else:
print(d-c)
else:
if c <= a:
print(d-a)
else:
print(d-c) |
s441155765 | p03632 | u730769327 | 1591257615 | Python | PyPy3 (2.4.0) | py | Runtime Error | 163 | 38384 | 184 | a,b,c,d=map(int,input().split())
if b<=c or a=>d:
t=0
else:
if a<=c:
if b<d:
t=b-c
else:
t=d-c
else:
if c<d:
t=b-a
else:
t=d-a
print(t)
|
s099667719 | p03632 | u519923151 | 1590676706 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 60 | a,b,c,d = input().split()
print(max((min(b,d)-max(a,c)),0)) |
s806396854 | p03632 | u806403461 | 1590288243 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 77 | a, b, c, d = map(int, input().split())
print(max(min(b, d) - max(a, c)), 0)
|
s957903550 | p03632 | u518958552 | 1589764776 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | a,b,c,d = map(int,input().split())
ans = min(b, d) - max(a, c)
if ans < 0:
print(0)
else:
print(ans) |
s386740222 | p03632 | u551109821 | 1589554586 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 83 | A,B,C,D = map(int,input().split())
s = min(B-C,D-C)
if s <= 0:
s = 0
print(s |
s108848495 | p03632 | u967822229 | 1589144716 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 82 | A, B, C, D = map(int, input().split())
if A<C:
A=C
if D<B
B=D
print(A-B) |
s758552931 | p03632 | u078349616 | 1587617427 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 73 | A, B, C, D = map(int, input().split())
print(max(min(B,D) - max(A,C) 0))
|
s482486533 | p03632 | u548545174 | 1587324297 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 77 | if max(A, C) < min(B, D):
print(min(B, D) - max(A, C))
else:
print(0) |
s676146913 | p03632 | u077127204 | 1587234890 | Python | Python (3.4.3) | py | Runtime Error | 152 | 14296 | 172 | import numpy as np
A, B, C, D = map(int, input().split())
x = zip(*sorted(zip([A, B, C, D], [1, -1, 1, -1])))
if x[1][1] == 1:
print(x[2][0] - x[1][0])
else:
print(0)
|
s914966354 | p03632 | u077127204 | 1587232164 | Python | Python (3.4.3) | py | Runtime Error | 148 | 12392 | 158 | import numpy as np
A, B, C, D = map(int, input().split())
x, y = zip(*sorted(zip([A, B, C, D], [1, -1, 1, -1])))
print(np.diff(x)[np.cumsum(y)[:-1] == 2][0]) |
s447932259 | p03632 | u486297080 | 1586760566 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 11 | 0 75 25 100 |
s822770121 | p03632 | u852790844 | 1586661878 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 86 | a, b, c, d = map(int, input().split())
ans = max(0, min(b, d)) - max(a, c))
print(ans) |
s734744350 | p03632 | u702786238 | 1585163433 | Python | PyPy3 (2.4.0) | py | Runtime Error | 182 | 38384 | 240 | A, B, C, D = map(int, input().split())
if A<C:
if B-C < 0:
print(0)
else:
if D-B < 0:
x = B-D
else:
x = 0
print(B-C-x)
else:
if D-A < 0:
print(0)
else:
if B-D < 0:
x = D-B
print(D-A-x)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.