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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s929597252 | p03729 | u423585790 | 1563060930 | Python | PyPy3 (2.4.0) | py | Runtime Error | 182 | 38512 | 1374 | #!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): re... |
s924452979 | p03729 | u170077602 | 1562878948 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 193 | row = list(map(int, input().split()))
Flag = False
for i in range(1000000):
if row[0]*i % row[1] == row[2]:
Flag = True
break
if Flag:
print("YES")
else:
print("NO") |
s030939036 | p03729 | u668503853 | 1562328859 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 83 | a,b,c=input().spit()
if a[-1] ==b[0] and b[-1] ==c[0]:print("YES")
else:print("NO") |
s777871809 | p03729 | u314050667 | 1561411894 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 108 | a, b, c = input().split()
if a[len(a)] == b[0] and b[len(b)] == b[0]:
print("YES")
else:
print("NO") |
s715429952 | p03729 | u655135177 | 1561233112 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 193 | siri = input().split()
one = siri[0][-1]
two = [siri[1][1],siri[1][-1]]
three = siri[2][0]
if one == two[0]:
if two[1] == three:
print("YES")
else:
print("NO")
else:
print("NO") |
s828201164 | p03729 | u971282165 | 1561232011 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 161 | words = list(map(int,input().split()))
a = words[0][-1:]
b = words[1][0]
c = words[1][-1:]
d = words[2][0]
if a==b and c == d:
print('YES')
else:
print('NO') |
s531349234 | p03729 | u374103100 | 1560814937 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38384 | 257 | # https://atcoder.jp/contests/abc060/tasks/abc060_a
import itertools
import collections
import bisect
def main():
A, B, C = map(int, input().split())
print('YES' if A[-1] == B[0] and B[-1] == C[0] else 'NO')
if __name__ == '__main__':
main()
|
s669663836 | p03729 | u298297089 | 1560788290 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 109 | A,B,C = map(int, input().split())
print('YES' if A[-1] == B[0] and B[-1] == C[0] and C[-1] == A[0] else 'NO') |
s093225737 | p03729 | u997530672 | 1560105215 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | a, b, c = input().split()
if a[-1] == b[0] and b[-1] == c[0]:
print('YES')
else:
print('NO') |
s167182257 | p03729 | u911575040 | 1559343120 | Python | Python (3.4.3) | py | Runtime Error | 41 | 5304 | 93 | from fractions import gcd
a,b,c=map(int,input().split())
print("NO"if c%gcd(a,b)!=0else"YES") |
s873159282 | p03729 | u353652911 | 1558985583 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | x,y,z=input(),split()
print("YES" if x[-1]==y[0] and y[-1]==z[0] else "NO") |
s300553301 | p03729 | u102871988 | 1558662360 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 120 | a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print(’YES’)
else:
print(’NO’)
|
s361948839 | p03729 | u591764610 | 1557922428 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 71 | a,b,c=input().split()
print('NYOE S'[[a[-1]==b[0] and b[-1]==c[0]]::2]) |
s958298065 | p03729 | u591764610 | 1557922358 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 70 | a,b,c=input().split();print('NYOE S'[[a[-1]==b[0]and b[-1]==c[0]]::2]) |
s621011288 | p03729 | u591764610 | 1557922293 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 68 | a,b,c=input().split();print('NYOE S'[a[-1]==b[0]and b[-1]==c[0]]::2) |
s246104643 | p03729 | u856169020 | 1557334967 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | a, b, c = map(int, input().split())
if a[-1]==b[0] and b[-1]==c[0]:
print("YES")
else:
print("NO") |
s718943842 | p03729 | u055941944 | 1556765542 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 127 | a,b,c=map(int,input().split())
ans="NO"
for i in range (100000):
if a*i%b==c:
ans="YES"
break
print(ans)
|
s875894779 | p03729 | u374531474 | 1556678796 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 94 | A, B, C = map(int, input().split())
print('YES' if A[-1] == B[0] and B[-1] == C[0] else 'NO')
|
s477247481 | p03729 | u041075929 | 1556047541 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 300 | import sys, os
import numpy as np
f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
sys.stdin = open('./input.txt', 'r')
def solve():
a,b,c = input(), input(), input()
if a[-1]== b[0] and b[-1] = c[0]:
print('YES')
else:
print('NO')
solve()
|
s312064920 | p03729 | u655048024 | 1555883306 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 197 | a,b,c=map(int,input().split())
ans='NO'
A=[]
for i in range(10001):
A.append((a*i-c)%b)
if(i>3)and(A[0]==A[-1]):
break
if (a*i-c)%b==0:
ans='YES'
break
print(ans)
|
s261062838 | p03729 | u144980750 | 1555824136 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 94 | a,b,c=map(str,input().split())
if("YES" if a[len(a)-1]==b[0] and b[len(b)-1]==c[0] else "NO")
|
s194764369 | p03729 | u144980750 | 1555824121 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 90 | a,b,c=map(input().split())
if("YES" if a[len(a)-1]==b[0] and b[len(b)-1]==c[0] else "NO")
|
s921358391 | p03729 | u144980750 | 1555824062 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 85 | a,b,c=input().split()
if("YES" if a[len(a)-1]==b[0] and b[len(b)-1]==c[0] else "NO")
|
s486934886 | p03729 | u144980750 | 1555823993 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 99 | a=input().split()
if("YES" if a[0][len(a[0])-1]==a[1][0] and a[1][len(a[1])-1]==a[2][0] else "NO")
|
s847799010 | p03729 | u331464808 | 1555435698 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | a,b,c = map(str,input().split())
if a[-1]=b[0] and b[-1]=c[0]:
print('YES')
else:
print('NO') |
s542444974 | p03729 | u585482323 | 1554162669 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38640 | 1742 | #!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): ... |
s171308869 | p03729 | u268516119 | 1553874463 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | A,B,C=map(list,input().split())
print(['NO','YES'][A[-1]==B[0] and B[-1]== |
s347493710 | p03729 | u170324846 | 1552323471 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 94 | a,b,c=input().split()
print("YES") if a[len(a)] == b[0] and b[len(b)] == c[0] else print("NO") |
s246682035 | p03729 | u325264482 | 1552268738 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 106 | a, b, c = input().split()
if (a[-1] == B[0]) and (B[-1] == C[0]):
print("YES")
else:
print("NO")
|
s191948556 | p03729 | u251123951 | 1551565313 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 80 | a,b,c=input().split
print("YES") if a[-1]==b[0] and b[-1]==c[0] else print("NO") |
s976875957 | p03729 | u652081898 | 1551340902 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 101 | a, b, c = input().split()
if a[-1] == b[1] and b[-1] == c[1]:
print("YES")
else:
print("NO") |
s114687165 | p03729 | u729133443 | 1549865412 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 79 | import re;a,b=re.findall('. .',input());print('YNEOS'[a[0]+b[2]!=a[2]+b[0]::2]) |
s992161768 | p03729 | u729133443 | 1549864344 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 82 | s=input().find;i=s(' ');j=s(' ',i);print('YNEOS'[s[i-1]+s[j+1]!=s[i+1]+s[j-1]::2]) |
s666157695 | p03729 | u729133443 | 1549863960 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 66 | a,b,c=input().split();print('YNEOS'[a[-1]+c[0]!=b[::len(b)-1]::2]) |
s355141555 | p03729 | u717001163 | 1549428538 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 78 | a,b,c=input().split()
print "YES" if a[-1] == b[0] and b[-1] == c[0] else "NO" |
s687846725 | p03729 | u717001163 | 1549428521 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 77 | a,b,c=input().split()
print "YES" if a[-1] == b[0] && b[-1] == c[0] else "NO" |
s253008495 | p03729 | u717001163 | 1549428471 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 93 | a,b,c=input().split()
print "YES" if a.last() == b.first() && b.last() == c.first() else "NO" |
s616331521 | p03729 | u717001163 | 1549428351 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 96 | a,b,c=map(int(),split())
print "YES" if a.last() == b.first() && b.last() == c.first() else "NO" |
s949247443 | p03729 | u371467115 | 1546202813 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 139 | a,b,c=map(int,input().split())
for i in range(1,b+1):
if (a*i)%b==c:
print("YES")
break
else:
print("NO")
|
s385421200 | p03729 | u371467115 | 1546199199 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 120 | a, b, c = map(int, input().split())
print("YES" if any((a*i)%b==c for i in range(1, b+1)) else "NO")
#コピペです。 |
s249317595 | p03729 | u996952235 | 1543716478 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 92 | a,b,c=input().split()
if a[0]==b[-1] anb b[0] == c[-1]:
print('YES')
else:
print('NO')
|
s340559848 | p03729 | u996952235 | 1543716425 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 91 | a,b,c=input().split()
if a[0]==b[-1] anb [0] == c[-1]:
print('YES')
else:
print('NO')
|
s315382353 | p03729 | u832039789 | 1543716275 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 96 | a=input()
b=input()
c=input()
if a[-1]==b[0] and b[-1]==c[0]:
print('YES')
else:
print('NO') |
s995563723 | p03729 | u111365959 | 1543237774 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 87 | ,b,c = input().split()
print('YES') if a[-1] == b[0] and b[-1] == c[0] else print('NO') |
s377033546 | p03729 | u397531548 | 1542156193 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | A,B,C=input().split()
if A[-1]=B[0] and B[-1]=C[0]:
print("Yes")
else:
print("No")
|
s867218219 | p03729 | u939552576 | 1541722435 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 90 | a,b,c = map(int,input().split())
print('YES' if a[-1] == b[0] and b[-1] == c[0] else 'NO') |
s975208783 | p03729 | u601522790 | 1540493507 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | A, B, C = map(int, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
print("YES")
else :
print("NO") |
s951105135 | p03729 | u601522790 | 1540493464 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | A, B, C = map(int, input().split())
if A[-1] == B[0] && B[-1] == C[0]:
print("YES")
else :
print("NO") |
s293646400 | p03729 | u923279197 | 1540157479 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | a,b,c=map(input().split())
if (a[len(a)-1]==b[0])&(b[len(b)-1]==c[0]):
print('YES')
else:
print('NO')
|
s821156107 | p03729 | u320325426 | 1538593582 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 83 | a, b, c = input().split()
print("YES" if a[-1] == b[1] and b[-1] == c[1] else "NO") |
s733999286 | p03729 | u940102677 | 1538286043 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | a = list(input())
b = list(input())
c = list(input())
if a[len(a)] == b[0] and b[len(b)] == c[0]:
print("YES")
else:
print("NO") |
s363849189 | p03729 | u940102677 | 1538285977 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 131 | a = list(input())
b = list(input())
c = list(input())
if a[len(a)] = b[0] and b[len(b)] = c[0]:
print("YES")
else:
print("NO") |
s389788953 | p03729 | u462538484 | 1537643470 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 131 | s = input().split()
a, b, c = s[0], s[1], s[2]
if b.startswith(a[-1:]) and c.stratswith(b[-1:]):
print("YES")
else:
print("NO") |
s644642556 | p03729 | u601082779 | 1536024769 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 64 | a,b,c=input().split();print('YNEOS'[a[-1]^b[0]^b[-1]^c[0]>0::2]) |
s576762152 | p03729 | u601082779 | 1536024713 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 62 | a,b,c=input().split();print('YNEOS'[a[-1]^c[0]^b[0]^b[-1]::2]) |
s465318422 | p03729 | u277802731 | 1534386275 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 141 | #60b
a,b,c =map(int,input().split())
i=0
aa=a
while i<b:
i+=1
if aa%b == c:
print('YES')
exit()
aa+=a
print('NO') |
s380156580 | p03729 | u598009172 | 1531975405 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3056 | 203 | N,T=(int(i) for i in input().split())
t = [int(i) for i in input().split()]
a=0
for b in range(N-1):
if (t[b+1] - t[b]) < T:
a = a + t[b+1] - t[b]
else:
a = a + T
a = a+T
print(a) |
s672184463 | p03729 | u598009172 | 1531971799 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 124 | A = list(input())
B = list(input())
C = list(input())
if A[-1]==B[0] and B[-1]==C[0]:
print("Yes")
else:
print("No") |
s030266042 | p03729 | u598009172 | 1531970903 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 256 | A = list(input())
B = list(input())
C = list(input())
if condition:A[-1]=B[0]
if condition:B[-1]=c[0]
if condition:C[-1]=A[0]
print("Yes")
else:
print("No")
else:print("No")
pass
else:
print("No") |
s894098720 | p03729 | u636775911 | 1531845882 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | #coding:utf-8
n=input().split()
if(n[0][0]==n[0][1]==n[0][2]):
print("YES")
else:
print("NO")
|
s010640626 | p03729 | u657913472 | 1528287014 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 72 | a,b,c=input().split()
print("YES" if a[-1]==b[0]&&b[-1]==c[0] else "NO") |
s460017563 | p03729 | u846150137 | 1528283941 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 94 | a,b,c=[int(i) for i in input().split()]
print("YES" if a[-1]==b[0] and b[-1]== c[0] else "NO") |
s881839681 | p03729 | u503901534 | 1523334203 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 159 | s = list(map(str,input().split()))
a = list(s[0])
b = list(s[1])
c = list(s[2])
if a[-1] == b[0] and b ==[-1] == c[0]:
print('YES')
else:
primt('NO') |
s336807696 | p03729 | u503901534 | 1523334195 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 159 | s = list(map(str,input().split()))
a = list(s[0])
b = list(s[1])
c = list(s[2])
if a[-1] == b[0] and b ==[-1] == c[0]:
print('YES')
else:
primt('NO') |
s830303846 | p03729 | u766407523 | 1522614973 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | A, B, C = map(int, input().split())
if A[-1]==B[0] and B[-1]==C[0]:
print("YES")
else:
print("NO") |
s093196975 | p03729 | u127856129 | 1521425681 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 140 | a,b,c=input().split()
s=list(input(a))
f=list(input(b))
g=list(input(c))
if s[-0]==f[0] and f[-0]==g[0]:
print("YES")
else:
print("NO")
|
s739000872 | p03729 | u127856129 | 1521425614 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 140 | a,b,c=input().split()
e=list(input(a))
f=list(input(b))
g=list(input(c))
if e[-0]==f[0] and f[-0]==g[0]:
print("YES")
else:
print("NO")
|
s832009445 | p03729 | u127856129 | 1521425522 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | a,b,c=input().split()
e=list(input(a))
f=list(input(b))
g=list(input(c))
if e[-0]==f[0] and f[-0]==g[0]
print("YES")
else:
print("NO") |
s992090161 | p03729 | u978494963 | 1517378975 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | s = str(input()).split(" "):
if s[0][0] == s[1][-1] and s[1][0] == s[2][-1]:
print("YES")
else:
print("NO") |
s238203712 | p03729 | u621935300 | 1516682009 | Python | Python (2.7.6) | py | Runtime Error | 14 | 2820 | 515 | import heapq
N,W=map(int,raw_input().split())
wv=[]
w_sum=0
for i in range(N):
w,v=map(int,raw_input().split())
w_sum+=w
wv.append((w,v))
a=[ float("-inf") for i in range(w_sum*2) ]
i=0
i=1
q=[]
for ind_i, i in enumerate(wv):
w=i[0]
v=i[1]
#Initialize
if ind_i==0:
a[0]=0
a[w]=v
continue
#Put queue
fo... |
s060966732 | p03729 | u863684580 | 1515632050 | Python | PyPy2 (5.6.0) | py | Runtime Error | 47 | 28012 | 187 | k = map(int, raw_input().split())
temp = [k[0]]
for i in xrange((k[0]*k[2])):
if sum(temp) % k[1] == k[2]:
print "YES"
exit()
temp.append(int(k[0]))
print "NO"
|
s373969310 | p03729 | u863684580 | 1515629404 | Python | PyPy2 (5.6.0) | py | Runtime Error | 38 | 27884 | 143 | l = map(str, raw_input().split())
for i in range(len(l)-1):
if l[i][len(l)-1] == l[i+1][0]:
print "YES"
exit()
print "NO"
|
s869293887 | p03729 | u943004959 | 1514770024 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 575 | def LI(): return [int(x) for x in input().split(" ")]
def LS(): return [str(x) for x in input().split(" ")]
def ItoS(L): return [str(x) for x in L]
def StoI(L): return [int(c) for c in L]
def solve():
n, t = LI()
T = LI()
sentou = [0] * (T[-1] + t + 1)
i = 0
while i < len(T):
sentou[T... |
s286304863 | p03729 | u257974487 | 1513102849 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | a, b, c = input().split()
if a[len(a-1)] == b[0] and b[len(b-1)] == c[0]:
print("YES")
else:
print("NO")
|
s581463916 | p03729 | u257974487 | 1513102794 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 108 | a, b, c = input().split()
if a[len(a)] == b[0] and b[len(b)] == c[0]:
print("YES")
else:
print("NO") |
s625584443 | p03729 | u504715104 | 1508363156 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 260 |
s,y,j=input().split()
sss=len(s)
yyy=len(y)
jjj=len(j)
ss=s[0:1]
ssss=s[sss-1:sss]
yy=y[0:1]
yyyy=y[yyy-1:yyy]
jj=j[0:1]
jjjj=j[jjj-1:jjj]
if ssss==yy:
nyan=1
if yyyy==jj:
nyan+=1
if nyan==2:
print('YES')
else:
print('NO')
|
s783733099 | p03729 | u425351967 | 1507213359 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 110 | A, B, C = input().split()]
if A[len(A)-1] == B[0] and B[len(B)-1] == C[0]:
print("YES")
else:
print("NO") |
s486821248 | p03729 | u778700306 | 1505698547 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | A, B, C = input().split()
if A[-1] == B[0] && B[-1] == C[0]:
print('YES')
else:
print('NO')
|
s711827177 | p03729 | u846372029 | 1499110023 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | #Shiritori
a,b,c = input().split()
if ( a[-1]==b[0] and b[-1]==c[0] ):
print("YES")
else:
prtin("NO") |
s208433363 | p03729 | u467027051 | 1497311628 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 225 | # -*- coding: utf-8 -*-
#-------
# Initialize
A,B,C = map(list, input().split())
#-------
# Define
#-------
# Do
if (A[len(A)-1] == B[0]) & (B[len(A)-1] == C[0]):
print("YES")
else:
print("NO")
#-------
# Output
|
s254947553 | p03729 | u809670194 | 1496527772 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 177 | i = input().split()
a = int(i[0])
b = int(i[1])
c = int(i[2])
answer = "NO"
while a <= a*b:
if a%b==c:
answer = "YES"
break
a += a
print(answer)
|
s024070511 | p03729 | u761320129 | 1495659559 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 312 | def solve():
ar = raw_input().split(' ')
A = int(ar[0])
B = int(ar[1])
C = int(ar[2])
s = set([])
sum = 0
while True:
sum = sum + A
m = sum % B
#print 'sum=',sum,'m=',m
if (m == C): return 'Yes'
if (m in s): return 'No'
s.add(m)
if __name__ == '__main__' :
print solve() |
s976232241 | p03729 | u616040357 | 1495431099 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print(’YES’)
else:
print(’NO’)
|
s058451859 | p03729 | u652737716 | 1495214763 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 498 | # input
NW = [int(x) for x in input().split(" ")]
N = NW[0]
W = NW[1]
w = []
v = []
for _ in range(N):
wv = [int(x) for x in input().split(" ")]
w.append(wv[0])
v.append(wv[1])
# 品物i-Nまでを使って容量Wのナップサックにいれられる品物の価値の総和の最大値
def rec(i, Wrec):
if i >= N:
return 0
a = -1
if Wrec - w[i] >= 0:
a = v[i]+rec(i+1, Wre... |
s222344357 | p03729 | u652737716 | 1495209529 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 172 |
T = int(input().split(" ")[1])
t = [int(x) for x in input().split(" ")]
t.append(100000000000)
ret = 0
for i in range(len(t)-1):
ret += min(T,t[i+1] - t[i])
print(ret) |
s966224710 | p03729 | u732491892 | 1494710371 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 206 | # -*- coding: utf-8 -*-
def shiritori(a, b):
return a[len(a)-1:] == b[:1]
a, b, c = map(input().split())
if shiritori(a, b) is True and shiritori(b, c) is True:
print("YES")
else:
print("NO")
|
s431776032 | p03729 | u732491892 | 1494710137 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 215 | # -*- coding: utf-8 -*-
def shiritori(a, b):
return a[len(a)-1:] == b[:1]
a, b, c = map(int, raw_input().split())
if shiritori(a, b) is True and shiritori(b, c) is True:
print("YES")
else:
print("NO")
|
s824549780 | p03729 | u545503667 | 1494447498 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3056 | 181 | a, b, c = [int(x) for x in input().split()]
def foo(a, b, c):
for i in range(1, b+1):
if (a*i)%b == c:
return "YES"
return "NO"
print(foo(a, b, c)) |
s670726852 | p03729 | u545503667 | 1494447142 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 257 | a, b, c = [int(x) for x in input().split()]
from math import gcd
def foo(a, b, c):
if a == 1:
return "YES"
elif b == 1:
return "NO"
elif gcd(a, b) ==1:
return "NO"
else:
return "YES"
print(foo(a, b, c)) |
s936983942 | p03729 | u545503667 | 1494447089 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 253 | a, b, c = [int(x) for x in input().split()]
from math import gcd
def foo(a, b, c):
if a == 1:
return "YES"
elif b == 1:
return "NO"
elif gcd(a, b) ==1:
return "NO:
else:
return "YES"
print(foo(a, b, c)) |
s769240275 | p03729 | u722670579 | 1494441956 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 126 | str1=input()
str2=input()
str3=input()
if str1[-1:]==str2[:1] and str2[-1:]==str3[:1]:
print("YES")
else:
print("NO") |
s903459040 | p03729 | u722670579 | 1494441118 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 184 | str1=input()
str2=input()
str3=input()
slice1=str1[-1:]
slice2=str2[:1]
slice3=str2[-1:]
slice4=str3[:1]
if slice1==slice2 and slice3==slice4:
print("YES")
else:
print("NO")
|
s389119409 | p03729 | u792547805 | 1494389665 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | s = raw_input().split()
A = s[0]
B = s[1]
C = s[2]
if A[len(A)]==B[0] && B[len(B)]==C[0]:
print('YES')
else:
print('NO') |
s759068085 | p03729 | u009102496 | 1494168891 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 157 | a,b,c=map(int,input(),split())
d=0
for n=range(1,b+1):
if n*a%b==c:
d=d+1
else:
d=d:
if d>0:
print("YES")
else:
print("NO")
|
s209942439 | p03729 | u009102496 | 1494167068 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | a,b,c = map(str,input().split())
if a[-1]=b[0] and b[-1]=c[0]:
print("YES")
else:
print("NO") |
s266062574 | p03729 | u046488986 | 1494119735 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 245 | # coding: utf-8
N,T = [int(i) for i in input().split(" ")]
array = input().split(" ")
ans = 0
fin = 0
for x in array:
time = int(x)
if time <= fin:
ans += (time + T - fin)
else:
ans += T
fin = time + T
print(ans) |
s948304538 | p03729 | u045939752 | 1494036436 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 94 | A,B,C=map(int,input().split())
ans='NO'
if A[-1]==B[0] and B[-1]==C[0]:
ans='YES'
print(ans) |
s696628550 | p03729 | u045939752 | 1494036397 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | A,B,C=map(int,input().split())
ans='NO'
if A[-1]==B[0] and B[-1]==C[0]
ans='YES'
print(ans) |
s496199483 | p03729 | u791838908 | 1493971585 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | a, b, c = map(int, input().split())
result = "NO"
for i in range(1, 100):
if a * i % b == c:
result = "YES"
print(result)
|
s366611315 | p03729 | u906017074 | 1493762240 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | a,b,c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print('YES')
else:
print(ans) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.