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
s949146690
p03457
u096983897
1557013484
Python
Python (3.4.3)
py
Runtime Error
17
2940
541
def main(): size = int(input()) array = [] for i in range(size): array.append(list(map(int, input().split())) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1])...
s841166579
p03457
u096983897
1557012955
Python
Python (3.4.3)
py
Runtime Error
17
2940
495
def main(): size = int(input()) array[0] = list(map(int, "3 1 2".split()) array[1] = list(map(int, "6 1 1".split()) flg = "Yes" now = [0, 0, 0] for i in range (size): time = array[i][0] - now[0] distance = abs(array[i][1]-now[1]) + abs(array[i][2]-now[2]) if ...
s710405712
p03457
u096983897
1557012418
Python
Python (3.4.3)
py
Runtime Error
17
2940
525
def main(): size = int(input()) for i in range(size): array[i] = list(map(int, input().split()) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]) if tim...
s425107041
p03457
u096983897
1557011973
Python
Python (3.4.3)
py
Runtime Error
17
2940
518
def main(): size = int(input()) for i in range(size): array[i] = list(map(int, input().split()) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]) if tim...
s881308701
p03457
u096983897
1557011800
Python
Python (3.4.3)
py
Runtime Error
18
2940
507
def main(): size = int(input()) for i in range(size): array[i] = list(map(int, input().split()) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0]- pre_time distance = array[i][1]-pos[0] + array[i][2]-pos[1] if time == distan...
s770423252
p03457
u979362546
1555951472
Python
Python (3.4.3)
py
Runtime Error
17
3060
142
n = int(input()) for i in range(n): t,x,y = map(int, input(),split()) if x+y>t or (x+y+t)%2 : print("No") break print("Yes")
s070803599
p03457
u979362546
1555951416
Python
Python (3.4.3)
py
Runtime Error
18
2940
141
n = int(input) for i in range(n): t,x,y = map(int, input(),split()) if x+y>t or (x+y+t)%2 : print("No") exit() print("Yes")
s241672211
p03457
u979362546
1555951374
Python
Python (3.4.3)
py
Runtime Error
17
2940
140
n = int(input) for i in range(n): t,x,y = map(int, input(),split()) if x+y>t or (x+y+t)%2 : print("No") break print("Yes")
s439764062
p03457
u118645446
1555374339
Python
Python (3.4.3)
py
Runtime Error
20
4596
346
N = int(input()) x = [0] * (N + 1) y = [0] * (N + 1) for i in range(1, N + 1): t[i], x[i], y[i] = map(int, input().split()) for i in range(1, N + 1): if t[i] - t[i - 1] < abs(x[i] - x[i - 1]) + abs(y[i] - y[i - 1]): print('No') exit() elif t[i] % 2 != (x[i] + y[i]) % 2: print('No') ...
s373085224
p03457
u118645446
1555374011
Python
Python (3.4.3)
py
Runtime Error
17
3064
329
x = [0] * (N + 1) y = [0] * (N + 1) for i in range(1, N + 1): t[i], x[i], y[i] = map(int, input().split()) for i in range(1, N + 1): if t[i] - t[i - 1] < abs(x[i] - x[i - 1]) + abs(y[i] - y[i - 1]): print('No') exit() elif t[i] % 2 != (x[i] + y[i]) % 2: print('No') exit() pri...
s806505296
p03457
u914330401
1555302353
Python
Python (3.4.3)
py
Runtime Error
18
3060
322
N = int(input()) for i in range(N): t[i], x[i], y[i] = map(int, input().split()) is_able = True for i in range(N-1): dt = t[i+1] - t[i] dist = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i]) if dt < dist: is_able = False if dt % 2 != dist % 2: is_able = False if is_able: print("YES") else: print("NO"...
s824529443
p03457
u652081898
1554983278
Python
Python (3.4.3)
py
Runtime Error
425
28352
444
n = int(input()) schd = [] for _ in range(n): schd.append(list(map(int, input().split()))) def travel(t, x, y, k): t1, x1, y1 = schd[k][0], schd[k][1], schd[k][2] dist = abs(x1-x) + abs(y1-y) time_dist = t1-t if dist <= time_dist and dist%2 == time_dist%2: if k+1 == n: ret...
s281278787
p03457
u013756322
1554667886
Python
Python (3.4.3)
py
Runtime Error
305
12388
411
n = int(input()) T = [0] + [None] * n X = [0] + [None] * n Y = [0] + [None] * n for i in range(1, n + 1): T[i], X[i], Y[i] = map(int, input().split()) for i in range(len(T) - 1): dt = abs(T[i + 1] - T[i]) dx = abs(X[i + 1] - X[i]) dy = abs(Y[i + 1] - Y[i]) if (dt % 2 == (dx + dy) % 2 and (dx + dy) <= dt): ...
s809819753
p03457
u013756322
1554666860
Python
Python (3.4.3)
py
Runtime Error
306
12388
396
n = int(input()) T = [0] + [None] * n X = [0] + [None] * n Y = [0] + [None] * n for i in range(1, n + 1): T[i], X[i], Y[i] = map(int, input().split()) for i in range(len(T) - 1): dt = T[i + 1] - T[i] dx = X[i + 1] - X[i] dy = Y[i + 1] - Y[i] if (dt % 2 == (dx + dy) % 2 and (dx + dy) <= dt): res = res and...
s584005078
p03457
u956866689
1554658256
Python
Python (3.4.3)
py
Runtime Error
2104
22144
543
# -*- coding:utf-8 -*- import sys N = int(input()) lis = [] for i in range(N): s_raw = input().split() s = [int(j) for j in s_raw] lis.append(s) def travel(t, x, y, count): if t > lis[N-1][0]: print("Yes") sys.exit() if t == lis[count][0]: if x == lis[count][1] and y == lis[...
s332288759
p03457
u956866689
1554658128
Python
Python (3.4.3)
py
Runtime Error
2104
22148
543
# -*- coding:utf-8 -*- import sys N = int(input()) lis = [] for i in range(N): s_raw = input().split() s = [int(j) for j in s_raw] lis.append(s) def travel(t, x, y, count): if t > lis[N-1][0]: print("YES") sys.exit() if t == lis[count][0]: if x == lis[count][1] and y == lis[...
s003970316
p03457
u052499405
1554400080
Python
Python (3.4.3)
py
Runtime Error
17
2940
15
2 5 1 1 100 1 1
s460944915
p03457
u738198479
1554163331
Python
Python (3.4.3)
py
Runtime Error
364
27304
360
n = int(input()) a = list(range(n)) for i in range(n): a[i] = list(map(int, input().split())) tmpx = 0 tmpy = 0 for s in range(n): tmpx = a[s][1] - tmpx tmpy = a[s][2] - tmpy if((dx+dy)>a[s][0]): print("NO") break if(((dx+dy)%2) == (a[s][0]%2)): print("YES") break ...
s365667754
p03457
u565204025
1554133186
Python
Python (3.4.3)
py
Runtime Error
2104
11636
676
# -*- coding: utf-8 -*- n = int(input()) t = [0] * n x = [0] * n y = [0] * n for i in range(n): t[i],x[i],y[i] = map(int,input().split()) def travel(x,y,t): if t == t_st: if x == x_st and y == y_st: return True else: return False if travel(x-1,y,t-1) or travel(x,y-1...
s810325146
p03457
u432333240
1553734907
Python
Python (3.4.3)
py
Runtime Error
396
48128
588
import numpy as np N = int(input()) travels = np.array([input().split() for _ in range(N)], dtype=int) travels = np.insert(travels, 0, [0, 0, 0], axis=0) travels = travels[travels[:,0].argsort(), :] able = True for i in range(np.shape(travels)[1]-1): dist = travels[i+1,:] - travels[i,:] time = dist[0] x = a...
s250416700
p03457
u900688325
1553055596
Python
Python (3.4.3)
py
Runtime Error
483
27380
490
N = int(input()) TXY = [list(map(int, input().split())) for _ in range(N)] TXY.insert(0,[0,0,0]) point_a, point_b = 0, 0 for i in range(N): if TXY[i+1][0] - TXY[i][0] < abs(TXY[i+1][1] - TXY[i][1]) + abs(TXY[i+1][2] - TXY[i][2]): point += 1 for i in range(N): if point_a == 0 and (TXY[i+1][0] - TXY[i][...
s131292491
p03457
u900688325
1553054752
Python
Python (3.4.3)
py
Runtime Error
414
27300
440
N = int(input()) TXY = [list(map(int, input().split())) for _ in range(N)] TXY.insert(0,[0,0,0]) point = 0 for i in range(N+1): if TXY[i+1][0] - TXY[i][0] < abs(TXY[i+1][1] - TXY[i][1]) + abs(TXY[i+1][2] - TXY[i][2]): point += 1 for i in range(N+1): if TXY[i+1][0] - TXY[i][0] % 2 != abs(TXY[i+1][1] - ...
s972066318
p03457
u771532493
1552888905
Python
Python (3.4.3)
py
Runtime Error
466
17324
412
def judge(t,x,y,t0,x0,y0): minT=abs(x-x0)+abs(y-y0) return (t-t0-minT)>=0 and (t-t0-minT)%2==0 n=int(input()) lst=[tuple(int(i) for i in input().split()) for i in range(n)] t0=0;x0=0;y0=0 num=0;bool=False while num<=n-1: t,x,y=lst[num] if judge(t,x,y,t0,x0,y0): t0=t;x0=x;y0=y t,x,y=lst[num+1] num+=1...
s993407951
p03457
u771532493
1552888835
Python
Python (3.4.3)
py
Runtime Error
448
17324
389
def judge(t,x,y,t0,x0,y0): minT=abs(x-x0)+abs(y-y0) return (t-t0-minT)>=0 and (t-t0-minT)%2==0 n=int(input()) lst=[tuple(int(i) for i in input().split()) for i in range(n)] t0=0;x0=0;y0=0 num=0;bool=False while num<=n: t,x,y=lst[num] if judge(t,x,y,t0,x0,y0): t0=t;x0=x;y0=y num+=1 bool=True else: ...
s476517128
p03457
u771532493
1552888701
Python
Python (3.4.3)
py
Runtime Error
471
17312
409
def judge(t,x,y,t0,x0,y0): minT=abs(x-x0)+abs(y-y0) return (t-t0-minT)>=0 and (t-t0-minT)%2==0 n=int(input()) lst=[tuple(int(i) for i in input().split()) for i in range(n)] t0=0;x0=0;y0=0 num=0;bool=False while num<=n: t,x,y=lst[num] if judge(t,x,y,t0,x0,y0): t0=t;x0=x;y0=y t,x,y=lst[num+1] num+=1 ...
s572595332
p03457
u652081898
1552445504
Python
Python (3.4.3)
py
Runtime Error
418
28388
422
n = int(input()) schd = [] for _ in range(n): schd.append(list(map(int, input().split()))) def travel(x, y, t, k): x1, y1 = schd[k][1], schd[k][2] dist = abs(x1-x) + abs(y1-y) if dist <= schd[k][0]-t and (schd[k][0]-t-dist)%2 == 0: if k+1 == n: return "Yes" else: ...
s452908743
p03457
u652057333
1552357269
Python
Python (3.4.3)
py
Runtime Error
17
2940
366
# C n = int(input()) preX = [0,0,0] ans = True for i in range(n): curX = list(map(int, input().split())) time = if not curX[0] - preX[0] >= (abs(curX[1] - preX[1]) + abs(curX[2] - preX[2])) and curX[0] - preX[0] % 2 == (abs(curX[1] - preX[1]) + abs(curX[2] - preX[2])) % 2: ans = False if ans: p...
s928007023
p03457
u807772568
1551984315
Python
Python (3.4.3)
py
Runtime Error
17
3064
342
import sys n = int(input()) a = [list(map(int,input().split()))] h,j,k = 0,0,0 for i in range(n): t = abs(h - a[i][0]) dx = abs(j - a[i][1]) dy = abs(k - a[i][2]) if t >= dx + dy: if t % 2 != (dx + dy % 2): print("No") sys.exit() else: print("No") sy...
s316649850
p03457
u235905557
1551641169
Python
Python (3.4.3)
py
Runtime Error
383
17320
540
N = int(input()) routes = [(0,0,0)] append = routes.append for _ in range(0, N): t, x, y = map(int, input().split()) append((t, x, y)) for i in range(1, N+2): bt, bx, by = routes[i-1] t, x, y = routes[i] ct = t - bt # xだけで考える。yとxは独立させて考えて問題ない。両方が成立しなければ成立しないため。 cx = x - bx cy = y - by ...
s212206067
p03457
u549497563
1551630742
Python
Python (3.4.3)
py
Runtime Error
17
2940
201
n = int(input()) flag = True for _ in range(N): t, x, y = map(int, input().split()) if (t < x + y) or (x + y + t) % 2==1: flag = False if flag: print("Yes") else: print("No")
s473083840
p03457
u867069435
1551212359
Python
Python (3.4.3)
py
Runtime Error
17
2940
156
n = int(input()) for i in range(n): t,x,y=map(int,input().split()) if (x+y) > t and (x+y)%2 != t%2): print("No") exit() print("Yes")
s115884810
p03457
u551351897
1550044827
Python
Python (3.4.3)
py
Runtime Error
17
2940
940
#include <bits/stdc++.h> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef long long int ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) #d...
s820097014
p03457
u985376351
1549242227
Python
Python (3.4.3)
py
Runtime Error
755
33652
459
n = int(input()) p = [None]*n for i in range(n): p[i] = list(map(int,input().split())) plan = [[0,0,0]] plan.extend(p) print('plan') print(plan) for i in range(n+1): diff = [plan[i+1][k] - plan[i][k] for k in range(len(plan[0]))] print(diff) if abs(diff[1])+abs(diff[2])>diff[0]: print('No')...
s652817959
p03457
u374103100
1549057402
Python
Python (3.4.3)
py
Runtime Error
18
3064
521
def is_reachable(src, dst): can_go = True dt = dst[0] - src[0] dist = abs(dst[1] - src[1]) + abs(dst[2] - src[2]) if dt < dist: can_go = False if dt % 2 != dist % 2: can_go = False return can_go route = [list(map(int, input().split())) for _ in range(N)] route.insert(0, [0, 0, ...
s636147615
p03457
u654386293
1548091538
Python
Python (3.4.3)
py
Runtime Error
446
3968
1741
import math def solve(): n = int(input()) success_trip = True now_t, now_x, now_y = 0, 0, 0 for i in range(n): next_t, next_x, next_y = map(int, input().split(' ')) if success_trip: if not find_path(now_t, now_x, now_y, next_t, next_x, next_y): success_trip =...
s443968515
p03457
u189575640
1547816858
Python
Python (3.4.3)
py
Runtime Error
18
2940
473
import sys # A,B,C = [int(n) for n in input().split()] N = int(input()) # S = str(input()) # T = str(input()) t = [0]*N x = [0]*N y = [0]*N for i in range(N): t[i],x[i],y[i] = [int(n) for n in input().split()] dt = t[0] d = x[0] + y[0] if(dt < d || dt%2 != d%2): print("No") sys.exit() for i in range(1,N): ...
s035282089
p03457
u785578220
1547750520
Python
Python (3.4.3)
py
Runtime Error
301
11008
862
def a():return input()#s def ai():return int(input())#a,n or k def ma():return map(int, input().split())#a,b,c,d or n,k def ms():return map(str, input().split())#,a,b,c,d def lma():return list(map(int, input().split()))#x or y def lms():return list(map(str, input().split()))#x or y k= [0] l = [0] m=[] co = range(1,10**...
s092599816
p03457
u359474860
1544532352
Python
Python (3.4.3)
py
Runtime Error
393
30068
566
n = int(input()) coordinate = {0: [0, 0, 0]} i = 1 while True: coordinate[i] = input().split() coordinate[i] = [int(j) for j in coordinate[i]] if not coordinate[i]: coordinate.pop(i) break i += 1 k = 0 for k in range(n): time_reminder = coordinate[k+1][0] - coordinate[k][0] x_re...
s901936602
p03457
u359474860
1544532106
Python
Python (3.4.3)
py
Runtime Error
385
30068
574
coordinate = {0: [0, 0, 0]} i = 1 while True: coordinate[i] = input().split() coordinate[i] = [int(j) for j in coordinate[i]] if not coordinate[i]: coordinate.pop(i) break i += 1 k = 1 for k in range(len(coordinate) - 1): time_reminder = coordinate[k+1][0] - coordinate[k][0] ...
s244079336
p03457
u359474860
1544531746
Python
Python (3.4.3)
py
Runtime Error
383
30068
574
coordinate = {0: [0, 0, 0]} i = 0 while True: coordinate[i] = input().split() coordinate[i] = [int(j) for j in coordinate[i]] if not coordinate[i]: coordinate.pop(i) break i += 1 k = 0 for k in range(len(coordinate) - 1): time_reminder = coordinate[k][0] - coordinate[k+1][0] ...
s342562883
p03457
u359474860
1544531653
Python
Python (3.4.3)
py
Runtime Error
382
30068
570
coordinate = {0: [0, 0, 0]} i = 0 while True: coordinate[i] = input().split() coordinate[i] = [int(j) for j in coordinate[i]] if not coordinate[i]: coordinate.pop(i) break i += 1 k = 0 for k in range(len(coordinate)): time_reminder = coordinate[k][0] - coordinate[k+1][0] ...
s624222117
p03457
u624475441
1544299807
Python
Python (3.4.3)
py
Runtime Error
175
28148
256
import sys input() e = [[0, 0, 0]] + [list(map(int, e.split())) for e in sys.stdin] for (t0, a0, b0), (t1, a1, b1) in zip(e, e[1:]): d = (t1 - t0) - abs(a1 - a0) - abs(b1 - b0) if d < 0 or t % 2 == 1: print('No') exit() print('Yes')
s412362090
p03457
u893048163
1544064586
Python
Python (3.4.3)
py
Runtime Error
202
32144
262
n = int(input()) l = [input().split() for _ in range(n)] ot = ox = oy = 0 for (t, x, y) in l: diff = int(t) - ot if abs(x - ox) + abs(y - oy) <= diff: ox = x oy = y ot = t else: print("No") exit(0) print("Yes")
s874469957
p03457
u969850098
1543710790
Python
Python (3.4.3)
py
Runtime Error
18
2940
95
a, b = map(int, input().split()) if ((a * b % 2) == 0: print('Even') else: print('Odd')
s636895419
p03457
u023229441
1543525980
Python
Python (3.4.3)
py
Runtime Error
333
3064
308
n=int(input()) A=[] for i in range(n): a,b,c=map(int,input().split()) if a<b+c or (b+c)%2!=a%2: print("No") exit() A.append(list(a,b,c)) if n==1: print("Yes") exit() for i in range(n-1): if not A[i+1][0]-A[i][0]>=A[i+1][2]+A[i+1][1]-A[i][1]-A[i][2]: print("No") exit() print("Yes")
s089442352
p03457
u023229441
1543525941
Python
Python (3.4.3)
py
Runtime Error
18
3064
310
n=int(input()) A=[] for i in range(n): a,b,c=map(int,input().split()) if a<b+c or (b+c)%2!=a%2: print("No") exit() A.append(list(a,b,c)) if n==1: print("Yes") exit() for i in range(n-1): if not A[i+1][0]-A[i][0]>=A[i+1][2]+A[i+1][1]-A[i][1]-A[i][2]: print("No") exit() print("Yes")
s572276953
p03457
u023229441
1543525767
Python
Python (3.4.3)
py
Runtime Error
339
3064
301
n=int(input()) A=[] for i in range(n): a,b,c=map(int,input().split()) if a<b+c or (b+c)%2!=a%2: print("No") exit() if n==1: print("Yes") exit() for i in range(n-1): if not A[i+1][0]-A[i][0]>=A[i+1][2]+A[i+1][1]-A[i][1]-A[i][2]: print("No") exit() print("Yes")
s787727196
p03457
u023229441
1543525700
Python
Python (3.4.3)
py
Runtime Error
334
3064
301
n=int(input()) A=[] for i in range(n): a,b,c=map(int,input().split()) if a<b+c or (b+c)%2!=a%2: print("No") exit() if n==1: print("Yes") exit() for i in range(n-2): if not A[i+1][0]-A[i][0]>=A[i+1][2]+A[i+1][1]-A[i][1]-A[i][2]: print("No") exit() print("Yes")
s651417419
p03457
u023229441
1543525387
Python
Python (3.4.3)
py
Runtime Error
329
3064
301
n=int(input()) A=[] for i in range(n): a,b,c=map(int,input().split()) if a<b+c or (b+c)%2!=a%2: print("No") exit() if n==1: print("Yes") exit() for i in range(n-1): if not A[i+1][0]-A[i][0]>=A[i+1][2]+A[i+1][1]-A[i][1]-A[i][2]: print("No") exit() print("Yes")
s687418911
p03457
u023229441
1543525094
Python
Python (3.4.3)
py
Runtime Error
323
3064
267
n=int(input()) A=[] for i in range(n): a,b,c=map(int,input().split()) if a<b+c or (b+c)%2!=a%2: print("No") exit() for i in range(n-2): if not A[i+1][0]-A[i][0]>=A[i+1][2]+A[i+1][1]-A[i][1]-A[i][2]: print("No") exit() print("Yes")
s100197737
p03457
u655430899
1542487105
Python
Python (3.4.3)
py
Runtime Error
17
3064
388
N = int(input()) points = [list(map(int, input().split(" "))) for _ in range(point_count)] points.insert(0, [0, 0, 0]) can = True for i in range(N): dt = points[i + 1][0] - points[i][0] dist = abs(x[i + 1][0] - x[i][0]) + abs(y[i + 1][0] - y[i][0]) if dt < dist: can = False if dist % 2 != dt % ...
s252818963
p03457
u272557899
1541994398
Python
Python (3.4.3)
py
Runtime Error
357
21156
1056
n = int(input()) s = [] for i in range(n):#h:高さ s.append([int(m) for m in input().split()]) for i in range(n): if i == 0: if not(-s[i][1] - s[i][0] <= s[i][2] <= -s[i][1] + s[i][0] and s[i][1] - s[i][0] <= s[i][2] <= s[1][1] + s[i][0]): print("No") exit() else: ...
s466733132
p03457
u882209234
1541645624
Python
Python (3.4.3)
py
Runtime Error
368
3064
281
N = int(input()) flag = True t0 = x0 = y0 = 0 for i in range(N): t1, x1, y1 = map(int, input().split()) t = t1 - t0 x = x1 - x0 y = y1 - y0 if t % (abs(x) + abs(y)) != 0: flag = False t0 = t1 x0 = x1 y0 = y1 if flag: print('Yes') else: print('No')
s103281671
p03457
u609014603
1539987538
Python
Python (3.4.3)
py
Runtime Error
335
22628
366
def mdist(a, b): return abs(a[0]-b[0]) + abs(a[1]-b[1]) n = int(input()) data = [[0, 0, 0]] + [[int(d) for d in input().split(' ')] for _ in range(n)] for d1, d2 in enumerate(data[:-1], data[1:]): dt = d2[0] - d1[0] dist = mdist(d1[1:], d2[1:]) if not ((dt >= dist) and ((dt%2)==(dist%2))): pri...
s073115690
p03457
u609014603
1539987399
Python
Python (3.4.3)
py
Runtime Error
17
3064
357
def mdist(a, b): return abs(a[0]-b[0]) + abs(a[1]-b[1]) n = int(input()) data = [[0, 0, 0]] + [[int(d) for d in input().split(' ')] for _ in range(n)] for d1, d2 in enumerate(data[:-1], data[1:]): dt = d2[0] - d1[0] dist = mdist(d1[1:], d2[1:]) if not ((dt >= dist) and ((dt%2)==(dist%2))): pri...
s122971414
p03457
u012298376
1538865238
Python
Python (3.4.3)
py
Runtime Error
17
2940
662
#include <bits/stdc++.h> //#include <iostream> #include <string> #include <vector> using namespace std; int n; int t[9999]; int x[9999]; int y[9999]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> t[i] >> x[i] >> y[i]; } bool can = 0; int dt, dist; for (int i = 1; i < n; i...
s103899410
p03457
u659100741
1537404106
Python
Python (3.4.3)
py
Runtime Error
376
11872
417
N = int(input()) t = [] x = [] y = [] for i in range(N): n = list(map(int, input().split())) t.append(n[0]) x.append(n[1]) y.append(n[2]) n.clear() answer = "YES" for i in range(len(N)-1): if t%2 != (abs(x[i+1]-x[i])+abs(y[i+1]-y[i]))%2: answer = "NO" if t[i+1]-t[i] < abs(x[i+1]-x[...
s729016575
p03457
u659100741
1537403816
Python
Python (3.4.3)
py
Runtime Error
367
11824
402
N = int(input()) t = [] x = [] y = [] for i in range(N): n = list(map(int, input().split())) t.append(n[0]) x.append(n[1]) y.append(n[2]) n.clear() answer = "YES" for i in range(N-1): if t%2 != (abs(x[i+1]-x[i])+abs(y[i+1]-y[i]))%2: answer = "NO" if t[i+1]-t[i] < abs(x[i+1]-x[i])+a...
s166663517
p03457
u659100741
1537134926
Python
Python (3.4.3)
py
Runtime Error
482
11780
772
N = int(input()) t = [] x = [] y = [] for i in range(N): n = list(map(int, input().split())) t.append(n[0]) x.append(n[1]) y.append(n[2]) n.clear() answer = "YES" for i in range(N): if i == 0: if t[i] > x[i]+y[i]: if t%2 != 0 and x[i]+y[i]%2 != 0 or t%2 == 0 and x[i]+y[i]%2...
s833196330
p03457
u659100741
1537134730
Python
Python (3.4.3)
py
Runtime Error
477
11804
772
N = int(input()) t = [] x = [] y = [] for i in range(N): n = list(map(int, input().split())) t.append(n[0]) x.append(n[1]) y.append(n[2]) n.clear() answer = "YES" for i in range(N): if i == 0: if t[i] > x[i]+y[i]: if t%2 != 0 and x[i]+y[i]%2 == 0 or t%2 == 0 and x[i]+y[i]%2...
s335643150
p03457
u829411282
1537098494
Python
Python (3.4.3)
py
Runtime Error
17
2940
149
N = int(input()) for i in range(N): t,x,y=map(int,input()split()) if x+y>t or (t+x+y)%2 != 0: print("No") break print("Yes")
s469960986
p03457
u388323466
1536881000
Python
Python (3.4.3)
py
Runtime Error
355
3868
315
N = int(input()) Z=[] for i in range(N): t, x, y = map(int, input().split()) if t % 2 == 0: if x + y <= t and (x + y) % 2 == 0: Z.append(1) else: Z.append(0) else: if x + y <= t and (x + y) % 2 == 1: Z.append(1) else: Z.append(0) i += 1 if Z.index(0) >= 1: print('No') else: print('Yes')
s914878694
p03457
u394853232
1536820398
Python
Python (3.4.3)
py
Runtime Error
17
3064
395
n = int(input()) t1 = 0 x1 = 0 y1 = 0 boolean = True for _ in range(n): t, x, y = [int(_) for _ in input().split()] if boolean: temp1 = x temp2 = t x = abs(x - x1) + abs(y - y1) t -= t1 x1 = temp y1 = y t1 = temp2 if x > t or (x + t) % 2 == 1: ...
s235634326
p03457
u698064859
1535741719
Python
Python (3.4.3)
py
Runtime Error
17
3064
343
import itertools a = int(input()) b = int(input()) c = int(input()) x = int(input()) ok = set() for a_num in range(a + 1): for b_num in range(b + 1): for c_num in range(c + 1): price = a_num * 500 + b_num * 100 + c_num * 50 if price == x: ok.add((a_num, b_num, c_nu...
s224361829
p03457
u329006798
1535060785
Python
Python (2.7.6)
py
Runtime Error
13
5764
160
n = int(input()) for i in range(n): t, x, y = map(int, input().split()) if x + y < t or (x + y + t) % 2: print("No") exit() print("Yes")
s876984687
p03457
u562016607
1534446475
Python
Python (3.4.3)
py
Runtime Error
17
3060
247
N=int(input());t=[0]*(N+1);x=[0]*(N+1);y=[0]*(N+1);flag=1 for i in range(N):t[i+1],x[i+1],y[i+1]=map(int,input().split()) for i in range(N):a=abs(x[i+1]-x[i])+abs(y[i+1]-y[i])-t[i+1]+t[i];flag=0;break if a>0 or a%2 print("Yes" if flag else "No")
s287292020
p03457
u659640418
1534231369
Python
Python (3.4.3)
py
Runtime Error
17
2940
159
n = int(input()) for i in range(n): t, x, y = map(int, input().split()) if x + y < t or (x+y-t)%2 /= 0: print("No") exit() print("Yes")
s618295820
p03457
u659640418
1534231285
Python
Python (3.4.3)
py
Runtime Error
17
2940
158
n = int(input()) for i in range(n): t, x, y = map(int, input().split()) if x + y < t or (x+y-t)%2 /= 0 print("No") exit() print("Yes")
s325112044
p03457
u659640418
1534231236
Python
Python (3.4.3)
py
Runtime Error
17
2940
153
n = input() for i in range(n): t, x, y = map(int, input().split()) if x + y < t or (x+y-t)%2 /= 0 print("No") exit() print("Yes")
s593931207
p03457
u659640418
1534231207
Python
Python (3.4.3)
py
Runtime Error
17
3060
154
n = input() for i in range(n): t, x, y = map(int, input().split()) if x + y <= t or (x+y-t)%2 /= 0 print("No") exit() print("Yes")
s498611537
p03457
u263933075
1532910563
Python
Python (3.4.3)
py
Runtime Error
17
3060
171
n = int(input()) for i in range(n): a, b = map(int, input().split()) if abs(a) + abs(b) > n: print('No') break else: print('Yes')
s872139903
p03457
u491656579
1532480107
Python
Python (3.4.3)
py
Runtime Error
17
3060
238
n = int(input()) for i in range(n): t, x, y = map(int, input().split()) if x + y < t or (X + y) % 2 != t % 2: print("No") exit() print("Yes")
s680833057
p03457
u491656579
1532479968
Python
Python (3.4.3)
py
Runtime Error
17
3060
161
n = int(input()) for i in range(n): t, x, y = map(int, input().split()) if x + y < t or (X + y + t) % 2: print("No") exit() print("Yes")
s784771118
p03457
u229138558
1532030418
Python
Python (3.4.3)
py
Runtime Error
18
3060
216
N = map(int , input()) for i in range(int(N)): t , x , y =map(str , input().split()) tv=int(t)%2 xy=int(x)+int(y) xyv=xy%2 if int(t) >= int(xy): print("Yes") else : print("No")
s663254630
p03457
u229138558
1532030378
Python
Python (3.4.3)
py
Runtime Error
17
3060
215
N = map(int , input()) for i in range(int(N)): t , x , y =map(str , input().split()) tv=int(t)%2 xy=int(x)+int(y) xyv=xy%2 if int(t) >= int(xy): print("Ok") else : print("No")
s277988006
p03457
u685263709
1531697415
Python
Python (3.4.3)
py
Runtime Error
417
18112
456
n = int(input()) travel_plan = [tuple(map(int, input().split())) for i in range(n)] travel_plan = [(0, 0, 0)] + travel_plan for i in range(n+1): t1 = travel_plan[i][0] x1 = travel_plan[i][1] y1 = travel_plan[i][2] t2 = travel_plan[i+1][0] x2 = travel_plan[i+1][1] y2 = travel_plan[i+1][2] x ...
s555776042
p03457
u685263709
1531695255
Python
Python (3.4.3)
py
Runtime Error
17
3064
429
n = int(input()) travel_plan = list(tuple(map(int, input().split()))) travel_plan = [(0, 0, 0)] + travel_plan for i in range(n+1): t1, x1, y1 = travel_plan[i][0] + travel_plan[i][1] + travel_plan[i][2] t2, x2, y2 = travel_plan[i+1][0] + travel_plan[i+1][1] + travel_plan[i+1][2] x = abs(x1 - x2) y = abs(...
s121047057
p03457
u599547273
1530071638
Python
Python (3.4.3)
py
Runtime Error
338
22068
475
# Relative rela import sys n = int(input()) txy_list = [[int(n) for n in input().split()] for i in range(n)] times_list = [txy_list[i][0] - txy_list[i+1][0] for i in range(n-1)] before_x, before_y = 0, 0 for i, txy in enumerate(txy_list): t, x, y = txy rela_x, rela_y = x - before_x, y - before_y remaining = times_...
s759910634
p03457
u105456682
1529427744
Python
Python (3.4.3)
py
Runtime Error
390
3064
311
N = int(input()) tmp = [0,0,0] data=list(map(int,(input()).split())) flag = True for i in range(N): tmp = list(map(int,(input()).split())) if (tmp[0] - data[0])%2 == (tmp[1] + tmp[2] - data[1] - data[2]) % 2 + 1: flag = False break else: data = tmp if flag: print("Yes") else: print("No")
s123445952
p03457
u034734062
1529020614
Python
Python (3.4.3)
py
Runtime Error
323
3060
308
prev_t = 0 prev_x = 0 prev_y = 0 n = int(input()) for _ in range(n): t, x, y = map(int, input().split()) dist = (x - prev_x) + (y - prev_y) time = t - prev_t if dist != time: ans = False break prev_x = x prev_y = y prev_t = t if not ans: print('No') else: print('Yes')
s923996542
p03457
u411858517
1528824183
Python
Python (3.4.3)
py
Runtime Error
336
27300
429
N = int(input()) arr = [ list(map(int, input().split())) for i in range(N)] for i in range(N-1): if (arr[i+1][1] + arr[i+1][2]) - (arr[i][1] + arr[i][2]) < arr[i+1][0] - arr[i][0]: if((arr[i+1][1] + arr[i+1][2]) - (arr[i][1] + arr[i][2]) - (arr[i+1][0] + arr[i][0]))%2 == 0: res = 'Yes' ...
s834048671
p03457
u883792993
1528428250
Python
Python (3.4.3)
py
Runtime Error
17
3060
661
N=int(input()) Destinations=[[0,0,0]] for i in range(N): Destinations.append(list(map(int, input().split()))) for i in range(N-1): x_distance = Destinations[i+1][1] - Destinations[i][1] y_distance = Destinations[i+1][2] - Destination[i][2] if x_distance < 0: x_distance = -x_distance if y_d...
s691051315
p03457
u787562674
1527653541
Python
Python (3.4.3)
py
Runtime Error
493
21960
577
N = int(input()) list = [[int(i) for i in input().split()] for i in range(N)] if N == 1: if list[0][0] - list[0][1] - list[0][2] < 0: print("No") elif (list[0] - list[1] - list[2]) % 2 == 0: print("Yes") else: print("No") else: for i in range(N-1): if (list[i+1][0] - lis...
s168116365
p03457
u186426563
1525897122
Python
Python (3.4.3)
py
Runtime Error
434
27300
296
n = int(input()) t = [[0, 0, 0]] for i in range(n): t.append(list(map(int, input().split()))) for i in range(0, n+1): time = t[i+1][0] - t[i][0] move = t[i+1][1] + t[i+1][2] - (t[i][1] + t[i][2]) if(move > time or move%2 != time%2): print("No") exit() print("Yes")
s328493812
p03457
u503901534
1525795435
Python
Python (3.4.3)
py
Runtime Error
429
19572
477
n = int(input()) trv = [[0,0,0]] for i in range(n): t,x,y = map(int,input().split()) a = [t,x,y] trv.append(a) flag = 1 for i in range(1,len(trv)+1): time = trv[i][0]-trv[i-1][0] dist = abs(trv[i][1]-trv[i-1][1]) + abs(trv[i][2]-trv[i-1][2]) if time < dist: flag = 0 break el...
s088074357
p03457
u057463552
1524352777
Python
Python (3.4.3)
py
Runtime Error
17
3064
517
N = int(input()) plan = [] for j in range(0,N): t,x,y = map(int,input().split()) plan.append(t,x,y) if (plan[0] < plan[1] + plan[2]) or ((plan[0] % 2) != ((plan[1] + plan[2]) % 2)): print("No") exit() for i in range(0,N-1): time_dis = plan[i*3 +3] - plan[i*3] x_dis = abs(plan[i*3+1] - plan[i*...
s954115730
p03457
u077299408
1522448481
Python
Python (3.4.3)
py
Runtime Error
367
27380
664
# 入力 n = int(input()) loc_list = [] for _ in range(n): loc_list.append(list(map(int, input().split()))) # 処理 ans = True prev_loc = [0, 0, 0] for loc in loc_list: # 現在の位置から次の位置へ移動可能かどうかを判定 if not movable(prev_loc, loc): ans = False break prev_loc = loc if ans: print("Yes") else: print("No") # 動け...
s283411859
p03457
u325638208
1522250588
Python
Python (3.4.3)
py
Runtime Error
17
3064
364
n = int(input()) t1,x1,y1 = map(int, input().split()) for p in [x1,y1]: if p < 0 or n < p: print('No') exit() t2,x2,y2 = map(int, input().split()) for p in [x2,y2]: if p < 0 or n < p: print('No') exit() dt = t2 - t1 d = abs(x2 - x1) + abs(y2 - y1) if (d < dt) and (dt%2 == d...
s000368129
p03457
u325638208
1522250405
Python
Python (3.4.3)
py
Runtime Error
17
3060
209
n = int(input()) t1,x1,y1 = map(int, input().split()) t2,x2,y2 = map(int, input().split()) dt = t2 - t1 d = abs(x2 - x1) + abs(y2 - y1) if (d < dt) and (dt%2 == d%2): print('Yes') else: print('No')
s768973582
p03457
u325638208
1522250340
Python
Python (3.4.3)
py
Runtime Error
17
3060
293
n = int(input()) t1,x1,y1 = map(int, input().split()) t2,x2,y2 = map(int, input().split()) for p in [x1,y1,x2,y2]: if p < 0 or n < p: print('No') exit() dt = t2 - t1 d = abs(x2 - x1) + abs(y2 - y1) if (d < dt) and (dt%2 == d%2): print('Yes') else: print('No')
s800792417
p03457
u562935282
1522209080
Python
Python (3.4.3)
py
Runtime Error
17
3064
635
def BlCannotGo(dt, dx, dy): ## 行けないならTrue dist = dx + dy if (dt % 2) != (dist % 2) or dist > dt: return True else: return False def abs(x,y): return max(x,y) - min(x,y) if __name__ == '__main__': n = int(input()) t, x, y = list(), list(), list() t[0], x[0], y[0] = 0, 0, 0 ...
s937229245
p03457
u562935282
1522209005
Python
Python (3.4.3)
py
Runtime Error
17
3064
589
def BlCannotGo(dt, dx, dy): ## 行けないならTrue dist = dx + dy if (dt % 2) != (dist % 2) or dist > dt: return True else: return False if __name__ == '__main__': n = int(input()) t, x, y = list(), list(), list() t[0], x[0], y[0] = 0, 0, 0 for i in range(n): t[i+1], x[i+1], ...
s908711045
p03457
u294283114
1522002836
Python
Python (3.4.3)
py
Runtime Error
18
3060
347
n = int(input()) st, sx, sy = list(map(int, input().split())) is_reach = True for i in range(0, n): gt, gx, gy = list(map(int, input().split())) t = gt - sy dist = abs(gx - sx) + abs(gy - sy) if not(t >= dist and (t - dist) % 2 == 0): is_reach = False break if is_reach: print("Y...
s401488934
p03457
u757919796
1521473191
Python
Python (3.4.3)
py
Runtime Error
2104
17312
655
def get_arounds(target): return [(target[0] + x, target[1] + y) for x, y in ((1, 0), (0, 1), (-1, 0), (0, -1))] def search_path(step, start, end, limit): if step == limit: return start == end return any([search_path(step + 1, a, end, limit) for a in get_arounds(start)]) if __name__ == '__main__'...
s359758791
p03457
u867069435
1521091797
Python
Python (3.4.3)
py
Runtime Error
17
2940
168
n = int(input()) for i in range(n): t, x, y = map(int, input().split()) if x + y) <= t and (x + y) % 2 != t % 2: print("No") exit() print("Yes")
s799095280
p03457
u941884460
1520669411
Python
Python (3.4.3)
py
Runtime Error
392
3064
418
N = int(input()) flg = True now,posx,posy=0,0,0 while flg==True: t,x,y=map(int,input().split()) if abs(x-posx)+abs(y-posy) > (t-now): flg = False print('No') elif (t-now)%2==0 and ((abs(x-posx)+abs(y-posy))%2 ==1): flg =False print('No') elif (t-now)%2==1 and ((abs(x-posx)+abs(y-posy))%2 ==0): ...
s322389951
p03457
u941884460
1520669236
Python
Python (3.4.3)
py
Runtime Error
17
3064
418
N = int(input()) flg = True now,posx,posy=0,0,0 while flg==True: t,x,y=map(int,input().split()) if abs(x-posx)+abs(y-posy) > (t-now): flg = False print('No') elif (t-now)%2==0 and ((abs(x-posx)+abs(y-posy))%2 ==1): flg =False print('No') elif (t-now)%2==1 and ((abs(x-posx)+abs(y-posy))%2 ==0): ...
s562506310
p03457
u941884460
1520669167
Python
Python (3.4.3)
py
Runtime Error
17
3064
419
N = int(input()) flg = True #start now,posx,posy=0,0,0 while flg: t,x,y=map(int,input().split()) if abs(x-posx)+abs(y-posy) > (t-now): flg = false print('No') elif (t-now)%2==0 and ((abs(x-posx)+abs(y-posy))%2 ==1): flg =false print('No') elif (t-now)%2==1 and ((abs(x-posx)+abs(y-posy))%2 ==0): ...
s263591785
p03457
u803647747
1519279092
Python
Python (3.4.3)
py
Runtime Error
18
3064
445
N = int(input()) for i in range(N): cord_list.append(list(map(int, input().split()))) cord_list = [[0, 0, 0]] flag = 0 for j in range(N): a = cord_list[j+1][0] - cord_list[j][0] b = abs(cord_list[j+1][1] - cord_list[j][1]) c = abs(cord_list[j+1][2] - cord_list[j][2]) if ((a - (b + c))%2 ==0) & ((b...
s130496917
p03457
u500207661
1519241190
Python
Python (3.4.3)
py
Runtime Error
17
2940
331
n = int(input()strip()) p = [ list(map(int, input().split())) for i in range(n) ] p.insert(0, [0,0,0]) ans = True for i in range(n): time = p[i+1][0] - p[i][0] dist = abs(sum(p[i+1][1:]) - sum(p[i][1:])) if time % 2 != dist % 2 or dist > time: ans = False break if ans: print("Yes") else: ...