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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s036423875 | p03708 | u133038626 | 1495939523 | Python | Python (3.4.3) | py | Runtime Error | 25 | 3316 | 1304 | # coding: utf-8
import sys
import math
def main():
a = int(input())
b = int(input())
if a == b:
print(1)
return
# 作れる数字は、高々2**k - 1 (k: floor(log2(b))+1)
da = math.floor(math.log2(a)) + 1
db = math.floor(math.log2(b)) + 1
sys.stderr.write("da: {} db: {}\n".format(da, db))... |
s709169832 | p03708 | u104282757 | 1495937183 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 514 | # D
res = 0
A = int(input())
B = int(input())
def pow2_floor_log2(x):
res = 1
while res*2 <= x:
res *= 2
return res
while True:
# find log2A and log2B
C = pow2_floor_log2(B)
if A < C:
# A to C
res += C - A
if B > C:
B_ = C + pow2_floor_log2(B - C)*... |
s426506778 | p03708 | u104282757 | 1495936738 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 455 | # D
import math
res = 0
A = int(input())
B = int(input())
while True:
# find log2A and log2B
C = 2**math.floor(math.log2(B))
if A < C:
# A to C
res += C - A
if B > C:
B_ = C + 2**math.floor(math.log2(B - C) + 1) - 1
if C + A <= B_:
res += C
... |
s263581459 | p03709 | u488401358 | 1596591411 | Python | PyPy3 (7.3.0) | py | Runtime Error | 661 | 159228 | 1107 | import sys
input=sys.stdin.readline
mod=10*9+7
N=int(input())
taka=[tuple(map(int,input().split())) for i in range(N)]
taka.sort()
V=[0]+[taka[i][1] for i in range(N)]+[10**15]
cummin=[V[i] for i in range(N+2)]
for i in range(N,-1,-1):
cummin[i]=min(cummin[i],cummin[i+1])
cummax=[V[i] for i in range(N+2)]
for i... |
s421827880 | p03709 | u488401358 | 1596591355 | Python | PyPy3 (7.3.0) | py | Runtime Error | 673 | 159360 | 1095 | import sys
input=sys.stdin.readline
mod=10*9+7
N=int(input())
taka=[tuple(map(int,input().split())) for i in range(N)]
taka.sort()
V=[0]+[taka[i][1] for i in range(N)]+[10**15]
cummin=[V[i] for i in range(N+2)]
for i in range(N,-1,-1):
cummin[i]=min(cummin[i],cummin[i+1])
cummax=[V[i] for i in range(N+2)]
for i... |
s546847585 | p03709 | u488401358 | 1596590849 | Python | PyPy3 (7.3.0) | py | Runtime Error | 685 | 159288 | 836 | import sys
input=sys.stdin.readline
mod=10*9+7
N=int(input())
taka=[tuple(map(int,input().split())) for i in range(N)]
taka.sort()
V=[0]+[taka[i][1] for i in range(N)]+[10**15]
cummin=[V[i] for i in range(N+2)]
for i in range(N,-1,-1):
cummin[i]=min(cummin[i],cummin[i+1])
cummax=[V[i] for i in range(N+2)]
for i... |
s095928538 | p03709 | u488401358 | 1596590261 | Python | PyPy3 (7.3.0) | py | Runtime Error | 638 | 145880 | 909 | import sys
input=sys.stdin.readline
mod=10*9+7
N=int(input())
taka=[tuple(map(int,input().split())) for i in range(N)]
taka.sort()
V=[0]+[taka[i][1] for i in range(N)]+[10**15]
cummin=[V[i] for i in range(N+2)]
for i in range(N,-1,-1):
cummin[i]=min(cummin[i],cummin[i+1])
cummax=[V[i] for i in range(N+2)]
for i... |
s529593533 | p03709 | u663102311 | 1497963187 | Python | Python (2.7.6) | py | Runtime Error | 1454 | 150656 | 5407 | from collections import OrderedDict, deque
import heapq
import fileinput
# def file_iterator(file_name):
# with open(file_name) as f:
# for line in f:
# yield line
iterator = fileinput.input()
# iterator = file_iterator('input2.txt')
MAX_VELOCITY = 1000000000
MAX_N = 200000
MODULO = 100000... |
s046079775 | p03711 | u085186789 | 1601091585 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8916 | 245 | x, y = map(int,input().split())
S1 = [1, 3, 5, 7, 8, 10, 12]
S2 = [4, 6, 9, 11]
for i in range(len(S1)):
for j in range(len(S1)):
if (S1[i] == x and s1[j] == y) or (S2[i] == x adn S2[j] == y):
print("Yes")
else:
print("No") |
s043865327 | p03711 | u805011545 | 1600742451 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9080 | 242 | H, W = [int(x) for x in input().split()]
pic = [list(input()) for _ in range(H)]
ans = [['#' for i in range(W+2)] for j in range(H+2)]
for i in range(W):
for j in range(H):
ans[j+1][i+1] = pic[j][i]
for i in range(H+2):
print(*ans[i]) |
s496491065 | p03711 | u485349322 | 1600537108 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8808 | 222 | x,y=map(int,input().split())
group_A=[1,3,5,7,8,10,12]
group_B=[4,6,9,11]
if x in group_A = True and y in group_A =True:
print("Yes")
elif x in group_B = True and y in group_B =True:
print("Yes")
else:
print("No")
|
s123188549 | p03711 | u568426505 | 1600137502 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9044 | 150 | a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=map(int,input().split(" "))
print("Yes") if (c[0] in a and c[1] in a) or (c[0] in b and c[1] in b) else print("No") |
s392348180 | p03711 | u886902015 | 1599852348 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9168 | 221 | x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if (x in a and y in a):
ptint("yes")
elif (x in b and y in b):
print("Yes")
elif (x in c and y in c):
print("Yes")
else:
print("No")
|
s501034127 | p03711 | u886902015 | 1599851870 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9048 | 176 | x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
ptint("yes")
else:
print("No") |
s149903502 | p03711 | u620846115 | 1598990346 | Python | Python (3.8.2) | py | Runtime Error | 19 | 8832 | 130 | a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]
x,y=input().split()
if x,y is in a or x,y is in b:
print("Yes")
else:
print("No") |
s424777412 | p03711 | u477320129 | 1598928703 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8908 | 183 | G = [set([1,3,5,7,8,10,12]), set([4,6,9,11]), set([2])]
def check(x, y):
for g in G:
if x in g and y in g:
return True
return False
print("Yes" if check(x, y) else "No") |
s963205655 | p03711 | u347397127 | 1598832530 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9076 | 106 | L=[1,0,1,2,1,2,1,1,2,1,2,1]
a,b=map(int,input().split())
if L[a]==L[b]:
print("Yes")
else:
print("No") |
s701169803 | p03711 | u075303794 | 1598167468 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8888 | 175 | x,y=map(int,input().split())
if x>y:
x,y=y,x
A=[1,3,5,,7,8,10,12]
B=[4,6,9,11]
if x==2 or y==2:
print('No')
elif (x in A and y in B):
print('No')
else:
print('Yes')
|
s279493525 | p03711 | u018679195 | 1597974134 | Python | Python (3.8.2) | py | Runtime Error | 21 | 9128 | 426 | x = int(input())
y = int(input())
s1 = [1, 3, 5, 7, 8, 10, 12]
s2 = [4, 6, 9, 11]
if x >= 1:
if x <= 12:
if y >= 1:
if y <= 12:
if x in s1 and y in s1:
print("Yes")
elif x in s2 and y in s2:
print("Yes")
elif... |
s271219803 | p03711 | u863370423 | 1597973426 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9188 | 219 | x = int(input())
y = int(input())
s1 = [1,3,5,7,8,10,12]
s2 = [4,6,9,11]
if x in s1 and y in s1:
print("Yes")
elif x in s2 and y in s2:
print("Yes")
elif x == 2 and y == 2:
print("Yes")
else:
print("No") |
s334102431 | p03711 | u468972478 | 1597712489 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8976 | 176 | n1 = set([1, 3, 5, 7, 8, 10, 12])
n2 = set([4, 6, 9, 11])
n3 = set([2])
nums = set(map(int, input().split())
print("Yes" if nums <= n1 or nums <= n2 or nums <= n3 else "No")
|
s879472993 | p03711 | u442948527 | 1596862181 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9012 | 79 | x,y=map(int,input().split())
G=121313113131
print(["No","Yes"][G[x-1]==G[y-1]]) |
s596567712 | p03711 | u876742094 | 1596479984 | Python | PyPy3 (7.3.0) | py | Runtime Error | 91 | 74576 | 112 | x,y=map(int,input().split())
a=[0,1,3,1,2,1,2,1,1,2,1,2,1
if a[x]==a[y]:
print("Yes")
else:
print("No")
|
s711835533 | p03711 | u739843002 | 1596226212 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9080 | 134 | g = [31,28,31,30,31,30,31,31,30,31,30,31]
tmp = input().split(" ")
print("Yes") if g[int(tmp[0])] == g[int(tmp[1])] else print("No") |
s324891608 | p03711 | u739843002 | 1596226161 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8836 | 134 | g = [31,28,31,30,31,30,31,31,30,31,30,31]
tmp = input().split(" ")
print("Yes") if g[int(tmp[0])] == g[int(tmp[1])] else print("No") |
s698954707 | p03711 | u739843002 | 1596226098 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9036 | 123 | g = [31,28,31,30,31,30,31,31,30,31,30,31]
tmp = input().split(" ")
print("Yes") if g[tmp[0]] == g[tmp[1]] else print("No") |
s442093121 | p03711 | u786020649 | 1595723863 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9052 | 271 | x,y=map(int,input().split())
s0=1<<(x-1)|1<<(y-1)
s1=sum(list(map(lambda x:1<<(x-1),[1,3,5,7,8,10,12])))&s0
s2=sum(list(map(lambda x:1<<(x-1),[4,6,9,11])))&s0
s3==sum(list(map(lambda x:1<<(x-1),[2])))&s0
if s1==s0 or s2==s0 or s3==s0:
print('Yes')
else:
print('No')
|
s544530416 | p03711 | u786020649 | 1595723818 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9072 | 253 | x,y=map(int,input().split())
s0=1<<(x-1)|1<<(y-1)
s1=sum(map(lambda x:1<<(x-1),[1,3,5,7,8,10,12]))&s0
s2=sum(map(lambda x:1<<(x-1),[4,6,9,11]))&s0
s3==sum(map(lambda x:1<<(x-1),[2]))&s0
if s1==s0 or s2==s0 or s3==s0:
print('Yes')
else:
print('No')
|
s158364144 | p03711 | u065099501 | 1594842105 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9100 | 170 | x,y=map(int,input().split())
if x in gp1 and y in gp1:
print('Yes')
elif x in gp2 and y in gp2 :
print('Yes')
elif x==y==2:
print('Yes')
else:
print('No') |
s234601792 | p03711 | u514118270 | 1594501998 | Python | PyPy3 (7.3.0) | py | Runtime Error | 93 | 68732 | 598 | import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): retur... |
s028204179 | p03711 | u316603606 | 1594469987 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8968 | 237 | l1 = [1,3,5,7,8,10,12]
l2 = [4,6,9,11]
l3 = [2]
n = 0
if x in l1:
if y in l1:
print ('Yes')
n = 1
elif x in l2:
if y in l2:
print ('Yes')
n = 1
else:
if y in l3:
print ('Yes')
n = 1
if n == 0:
print ('No') |
s289825348 | p03711 | u051496905 | 1594162506 | Python | Python (3.8.2) | py | Runtime Error | 21 | 9108 | 175 | x , y = map(iint,input().split())
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]
if x in A and y in A:
print("Yes")
elif x in B and y in B:
print("Yes")
else:
print("No") |
s853163417 | p03711 | u981931040 | 1592576276 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9028 | 186 | sequence = ((1, 3, 5, 7, 8, 10, 12), (4, 6, 9, 11), (2))
x , y = map(int, input().split())
for s in sequence:
if x in s and y in s:
print('Yes')
exit()
print('No')
|
s243408752 | p03711 | u350093546 | 1590517617 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 193 | a,b=map(int,input().split()
list=[4,6,9,11]
if a==2 or b==2:
print('No')
elif a in list and b in list:
print('Yes')
elif a not in list and b not in list:
print('Yes')
else:
print('No')
|
s393929916 | p03711 | u350093546 | 1590517538 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 192 | a,b=map(int,input().split()
if a==2 or b==2:
print('No')
list=[4,6,9,11]
elif a in list and b in list:
print('Yes')
elif a not in list and b not in list:
print('Yes')
else:
print('No') |
s103850346 | p03711 | u332793228 | 1589753711 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 81 | g="013121212121"
x,y=map(int,input().split())
print("Yes"if g[x]==g[y] else "No") |
s904509624 | p03711 | u617659131 | 1589660591 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 115 | a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
x,y = map(int, input().split())
if (x in a and y in a) or (x in b and y in b): |
s685005346 | p03711 | u493130708 | 1589358234 | Python | PyPy3 (2.4.0) | py | Runtime Error | 263 | 63980 | 2328 | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
from collections import deque
from fractions import gcd
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = float('inf')
#############
# Functions #
######... |
s268838995 | p03711 | u902380746 | 1589295449 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 366 | import sys
import math
import bisect
def main():
A = 1, 3, 5, 7, 8, 10, 12]
B = [4, 6, 9, 11]
C = [2]
x, y = map(int, input().split())
if x in A and y in A:
print('Yes')
elif x in B and y in B:
print('Yes')
elif x in C and y in C:
print('Yes')
else:
print... |
s976095470 | p03711 | u870518235 | 1589077260 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 184 | A = [[1,3,5,7,8,10,12],[4,6,9,11],[2]]
x,y = map(int, input().split())
flg = 0
for a in A:
if x in a and y in a:
flg = 1
if flg = 1:
print("Yes")
else:
print("No") |
s109371769 | p03711 | u130900604 | 1588863686 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 156 | a={1,3,5,7,8,10,12}
b={4,6,9,11}
c={2}
xy=map(set,input().split())
if xy.issubset(a) or xy.issubset(b) or xy.issubset(c):
print("No")
else:
print("Yes") |
s240195567 | p03711 | u973108807 | 1588642527 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 219 | seta = set(1,3,5,7,8,10,12)
setb = set(4,6,9,11)
setc = set(2)
a,b = map(int, input().split())
if (a in seta and b in seta) or (a in setb and b in setb) or (a in setc and b in setc):
print('Yes')
else:
print('No') |
s718961899 | p03711 | u900848560 | 1588488740 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38256 | 144 | a,b=input().split()
list1={1:1,2:3,3:1,4:0,5:1,6:0,7:1,8:1,9:0,10:1,11:0,12:1}
c=list1(a)
d=list1(b)
if c==d:
print("Yes")
else:
print("No") |
s881822258 | p03711 | u828139046 | 1588350828 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 236 | x,y = map(int,input().split())
group1 = list(1,3,5,7,8,10,12)
group2 = list(4,6,9,11)
if x in group1 and y in group1:
print('Yes')
elif x in group2 and y in group2:
print('Yes')
elif x == y == 2:
print('Yes')
else:
print('No') |
s219598217 | p03711 | u115877451 | 1588016366 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 135 | a,b=map(int,input().split())
n=[1,3,5,7,8,10,12]
m=[4,6,9,11]
o=[2]
p=[n,m,o]
if count(a)==count(b):
print('Yes')
else:
print('No') |
s012351630 | p03711 | u235066013 | 1587687069 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 168 | a,b=[str(i) for i in input().split()]
list1=["1","3","5","7","8","10","12"]
list2=["4","6","9","11"]
if a,b in list1 or a,b in list2:
print('Yes')
else:
print('No') |
s059904929 | p03711 | u017415492 | 1587539286 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 249 | n,m=map(int,input().split())
a=(1,3,5,7,8,10,12)
b=(4,6,9,11)
c=(2)
flag=False
if n in a and m in a:
flag=True
print("Yes")
elif n in b and m in b:
flag=True
print("Yes")
elif n in c and m in c:
flag=True
print("Yes")
else:
print("No") |
s378257357 | p03711 | u931173291 | 1587251921 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 790 | h,w=map(int,input().split())
ans=[]
import sys
def s(a,b):
if a%3==1:
s=a*b
x=(a//3)*b
y=((a-(a//3))//2)*b
z=s-x-y
e=(a-(a//3))*(b//2)
d=s-x-e
ma=max(x,y,z)
mi=min(x,y,z)
mc=max(x,e,d)
mn=min(x,e,d)
return(min((ma-mi),(mc-mn)))... |
s151183076 | p03711 | u358254559 | 1586703561 | Python | PyPy3 (2.4.0) | py | Runtime Error | 163 | 38256 | 207 | x,y = map(int, input().split())
if x==2 or y==2:
print("No")
exit()
if x==4 or x==6 or x==9 or x==11:
if y==4 or y==6 or y==9 or y~=11:
print("Yes")
else:
print("No")
else:
print("No")
|
s079833734 | p03711 | u358254559 | 1586703507 | Python | PyPy3 (2.4.0) | py | Runtime Error | 177 | 38384 | 205 | x,y = map(int, input().split())
if x==2 or y==2:
print("No")
exit()
if x==4 or x==6 or x==9 or x==11:
if y==4 or y==6 or y==9 or y~=11:
print("Yes")
else:
print("No")
else:
print("No")
|
s589929496 | p03711 | u373047809 | 1586376482 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 81 | p = "_acababababa"
x, y = map(int, input().split())
print("YNeos"[p[x]!=p[y]::2]) |
s236558126 | p03711 | u624689667 | 1584451409 | Python | PyPy2 (5.6.0) | py | Runtime Error | 41 | 28012 | 238 | x, y = [int(i) for i in input().split()]
if x == y == 2:
print("Yes")
elif x in (4, 6, 9, 11) and y in (4, 6, 9, 11):
print("Yes")
elif x in (1, 3, 5, 7, 8, 10, 12) and y in (1, 3, 5, 7, 8, 10, 12):
print("Yes")
else:
print("No") |
s116360666 | p03711 | u346677493 | 1584288224 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 202 | x,y=map(int,raw_input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
for i in range(1000):
if a[i]==x and a[i]==y:
print "Yes"
elif b[i]==x and b[i]==y:
print "Yes"
else:
print "No" |
s453876918 | p03711 | u346677493 | 1584288187 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 192 | x=input()
y=input()
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
for i in range(1000):
if a[i]==x and a[i]==y:
print "Yes"
elif b[i]==x and b[i]==y:
print "Yes"
else:
print "No"
|
s107853760 | p03711 | u641446860 | 1584255556 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 183 | x, y = map(int, input().split())
list1 = [1,3,5,6,8,10,12,4,6,9,11,2]
list2 = [0,0,0,0,0,0,0,1,1,1,1,2]
d = dict(zip(list1, list2))
if d[x] == d[y]:
print("Yes")
else:
print("No") |
s736470489 | p03711 | u163874353 | 1584148017 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 208 | x, y = map(int, input().split())
l = [1, 3, 5, 7, 8, 10, ,12]
m = [4, 6, 9, 11]
n = [2]
if l.count(x) == l.count(y) != 0 or m.count(x) == m.count(y) != 0 or x == y == 2:
print("Yes")
else:
print("No") |
s123490410 | p03711 | u975719989 | 1583563685 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 169 | x,y = map(int,input().split())
a = [1,3,5,7,,8,10,12]
b = [4,6,9,11]
if x in a and y in a:
print("Yes")
elif x in b and y in b:
print("Yes")
else:
print("No") |
s019389489 | p03711 | u857070771 | 1581970646 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 155 | h,w=map(int,input().split())
a=[]
a.append("#"*(w+2))
for i in range(h):
s="#"+input()+"#"
a.append(s)
a.append("#"*(w+2))
for i in a:
print(i) |
s597356379 | p03711 | u686036872 | 1580903785 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 155 | A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
C={2}
x, y = {map(int, input().split())}
print("Yes" if {x, y} <= A or {x, y} <= B or {x, y} <= C else "No")
|
s613221184 | p03711 | u686036872 | 1580903743 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 160 | A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
C={2}
x, y = {map(int, input().split())}
print("Yes" if {x, y} <= A or {x, y} <= B or [x, y] <= C else "No")
|
s919444611 | p03711 | u686036872 | 1580903544 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 182 | A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
C={2}
print("Yes" if {map(int, input().split())} <= A or \
{map(int, input().split())} <= B or \
{map(int, input().split())} <= C else "No") |
s521673494 | p03711 | u094191970 | 1580538168 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 119 | x,y=map(int,input().split())
a=[4,6,9,11]
print('Yes' if x==y==2 or (x in a and y in a) or (x not in a and y not in a)) |
s454197064 | p03711 | u763881112 | 1578674789 | Python | Python (3.4.3) | py | Runtime Error | 155 | 13540 | 166 |
import numpy as np
import fractions as fra
a[13]={0,3,1,3,2,3,2,3,3,2,3,2,3}
x,y=map(int,input().split())
if(a[x]==a[y]):
print("Yes")
else:
print("No") |
s639975262 | p03711 | u609061751 | 1578040013 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 271 | import sys
input = sys.stdin.readline
x, y = [int(x) for x in input().split()]
A = [1, 3, 5, 7, 8, 10, 12]
B = [4, 6, 9, 11]
C = [2]
x, y = [int(x) for x in input().split()]
for i in [A, B, C]:
if x in i and y in i:
print("Yes")
sys.exit()
print("No") |
s180994312 | p03711 | u608726540 | 1577804307 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 349 | x,y=map(int,input().split())
if x==1 or x==3 or x==5 or x== 7 or ==8 or x==12 or x==!0:
if y==1 or y==3 or y==5 or y==7 or y==8 or y==10 or y==12:
print('Yes')
else:
print('No')
elif x==4 or x==6 or x==9 or x==11:
if y==4 or y==6 or y==9 or y==12:
print('Yes')
else:
print... |
s066752518 | p03711 | u635540732 | 1577776379 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 175 | a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
x,y=map(int,input())
if a.count(x)==a.count(y) and b.count(x)==b.count(y) and c.count(x)==c.count(y):
print('Yes')
else:
print('No') |
s961526900 | p03711 | u977661421 | 1577233609 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 334 | x,y = [int(i) for i in input().split()]
if x == 2 or y == 2:
print("No")
elif (x == 4 or x == 6 or x == 9) and (y == 6 or y == 9 or y == 11):
print("Yes")
elif (x == 1 or x == 3 or x == 5 or x == 7 or x == 8 or x == 10) and (y == 3 or y == 5 or y == 7 or y == 8 or y == 10 or y == 12):
print("Yes")
else:
... |
s883813413 | p03711 | u506587641 | 1576960517 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 198 | lst0 = [1, 3, 5, 7, 8, 10, 12]
lst1 = [4, 6, 9, 11]
x, y = map(int, input().split())
for i in range(2):
if x in lst[i] and y in lst[i]:
print('Yes')
break
else:
print('No') |
s263431413 | p03711 | u506587641 | 1576960100 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 198 | lst0 = [1, 3, 5, 7, 8, 10, 12]
lst1 = [4, 6, 9, 11]
x, y = map(int, input().split())
for i in range(2):
if x in lst[i] and y in lst[i]:
print('Yes')
break
else:
print('No') |
s050677731 | p03711 | u506587641 | 1576959968 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 198 | lst1 = [1, 3, 5, 7, 8, 10, 12]
lst2 = [4, 6, 9, 11]
x, y = map(int, input().split())
for i in range(2):
if x in lst[i] and y in lst[i]:
print('Yes')
break
else:
print('No') |
s823690948 | p03711 | u181215519 | 1576641840 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 252 | list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]
x, y = map( int, input().split() )
if ( x in list1 and y in list1 ) \
or ( x in list2 and y in list2 ) \
or ( x in list3 and y in list3 ) :
print( "Yes" )
else :
print( "No" ) |
s700332106 | p03711 | u181215519 | 1576641574 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 239 | list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]
x, y = map( int, input().split() )
if ( x in list1 and y in list1 ) or ( x in list2 and y in list2 )
or ( x in list3 and y in list3 ) :
print( "Yes" )
else :
print( "No" ) |
s389719630 | p03711 | u134712256 | 1575491842 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 216 | x,y = map(int,input().split())
A = (2)
B = (4,6,9,11)
C = (1,3,5,7,8,10,12)
if x in A and y in B:
print("Yes")
else if x in B and y in B:
print("Yes")
else if x in C and y in C:
print("Yes")
else:
print("No") |
s788236356 | p03711 | u275212209 | 1575349399 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | A,B=list(map(int,input().split(' ')))
A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
print('Yes' if {x,y} <= A or {x,y} <= B else 'No') |
s377638686 | p03711 | u275212209 | 1575349290 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 121 | A,B=list(map(int,input().split(" ")))
A={1,3,5,7,8,10,12}
B={4,6,9,11}
print("Yes" if {x,y} <= A or {x,y} <= B else "No") |
s242349453 | p03711 | u275212209 | 1575349259 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 112 | A,B=map(int,input().split())
A={1,3,5,7,8,10,12}
B={4,6,9,11}
print("Yes" if {x,y} <= A or {x,y} <= B else "No") |
s027516532 | p03711 | u278356323 | 1575052374 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 820 | # ABC062a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
# Union-Find木
class UnionFind:
def __init__(self, n):
self.tree = [i for i in range(n)]
def root(self, x):
if(self.tree[x] == x):
return x
self.tree[x] = self.root(self.tree[x])
return s... |
s005655088 | p03711 | u609814378 | 1574794731 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 206 | x,y = map(int,input().split())
a = [4,6,9,11]
b = [1,3,5,7,8,10,12]
if x in a and y in a:
print("Yes")
elif x in b and y in b:
print("Yes")
elif x == y == 2:
print("Yes"
else:
print("No")
|
s006132908 | p03711 | u452015170 | 1573683683 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 272 | x、y = map(input().split())
group1 = (1,3,5,7,8,10,12)
group2 = (4,6,9,11)
group3 = (2)
if (x in group1) and (y in group1) :
print("Yes")
if (x in group2) and (y in group2) :
print("Yes")
if (x in group3) and (y in group3) :
print("Yes")
else:
print("No") |
s675447304 | p03711 | u403986473 | 1570765894 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 246 | x, y = map(int,input().split())
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]
if x in A:
X = 'A'
if x in B:
X = 'B'
if x in A:
X = 'C'
if y in A:
Y = 'A'
if y in B:
Y = 'B'
if y in A:
Y = 'C'
print('Yes' if X==Y else 'No')
|
s086983521 | p03711 | u740047492 | 1569350073 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 233 | a, b = map(int, input().split())
g1 = [1, 3, 5, 7, 8, 10, 12]
g2 = [4, 6, 9, 11]
g3 = [2]
if g1 in a and g1 in b:
print("Yes")
elif g2 in a and g2 in b:
print("Yes")
elif g3 in a and g3 in b:
print("Yes")
else:
print("No")
|
s522428520 | p03711 | u779170803 | 1569269993 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 598 | INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
x,y = INTM()
if x in a:
... |
s568767071 | p03711 | u167908302 | 1569202578 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 261 | #coding:utf-8
#数字をグループ分けしておく。リストの番号が0始まりなので、最初わざと0を入れる
group = [0,1,3,1,2,1,2,1,1,2,1,2,1]
x, y = map(int, input().slit())
if group[x] == group[y]:
print('Yes')
else:
print('No')
|
s943382370 | p03711 | u167908302 | 1569202508 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 284 | #coding:utf-8
#数字をグループ分けしておく。リストの番号が0始まりなので、最初わざと0を入れる
group = [0,1,3,1,2,1,2,1,1,2,1,2,1]
x, y = map(int, input().slit())
for i in group:
if group[x] == group[y]:
print('Yes')
else:
print('No')
|
s639475589 | p03711 | u385244248 | 1569091973 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 228 | a = (1,3,5,7,8,10,12)
b = (4,6,9,11)
c = (2)
abc = [a,b,c]
x,y = map(int,input().split())
for i, checker in enumerate(abc):
if x in checker:
checker2 = checker
if y in checker2:
print("Yes")
else:
print("No") |
s454477352 | p03711 | u597047658 | 1568645030 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 257 | x, y = map(int, input())
first_group = [1, 3, 5, 7, 8, 10, 12]
second_group = [4, 6, 9, 11]
if (x in first_group and y in first_group) or \
(x in second_group and y in second_group) or \
(x == 2 and y == 2):
print('Yes')
else:
print('No')
|
s241211761 | p03711 | u597455618 | 1568604162 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 234 | x, y = map(int, input().split())
if x == 2 or y == 2:
print("No")
elif {4, 6, 9, 11} <= x and {4, 6, 9, 11} <= y:
print("Yes")
elif {1, 3, 5, 7, 8, 10, 12} <= x and {1, 3, 5, 7, 8, 10, 12} <= y:
print("Yes")
else :
print("No") |
s710877322 | p03711 | u580362735 | 1568127691 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 160 | x,y = map(int,input().split())
g1 = [1,3,5,7,8,10,12]
g2 = [4,6,9,11]
g3 = [2]
print('Yes') if (x and y) in g1 or (x and y) in g2 or (x and y) in g3 print('No') |
s861806167 | p03711 | u788023488 | 1567876174 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 221 | x,y = map(int, input().split())
ans='No'
if x,y in [2]:
if y in [2]:
ans='Yes'
if x in [4,6,9,11]:
if y in [4,6,9,11]:
ans='Yes'
if x in [1,3,5,7,8,10,12]:
if y in [1,3,5,7,8,10,12]:
ans='Yes'
print(ans) |
s573356802 | p03711 | u095015466 | 1567192537 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 250 | x,y = map(int, input().split())
if x==2:
print('No')
elif x==4 or x==6 or x==9 or x==11
if y==6 or y==9 or y==11:
print('Yes')
else: print('No')
else:
if y==3 or y==5 or y==7 or y==8 or y==10 or y==12:
print('Yes')
else: print('No') |
s355690539 | p03711 | u404145225 | 1566874149 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 264 | ls1 = [[1,3,5,7,8,10,12],[4,6,9,11],[2]]
a,b = int(input().split())
if a in ls1[2]:
print('NO')
else if a in ls1[1]:
if b in ls1[1]:
print("Yes")
else:
print("No")
else if a in ls1[0]:
if b in ls1[0]:
print("Yes")
else:
print("No")
|
s544677485 | p03711 | u252383625 | 1566769338 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 201 | x,y = map (int, input(). split())
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
if x in a and y in a:
print ('yes')
elseif x in b and y in b:
print ('yes')
else :
print ('No') |
s432180427 | p03711 | u703890795 | 1566508043 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 248 | x, y = map(int, input().split())
group1 = (1, 3, 5, 7, 8, 10, 12)
group2 = (4, 6, 9, 11)
group3 = (2)
if ((x in group1) and (y in group1)) or ((x in group2) and (y in group2)) or ((x in group3) and (y in group3)):
print("Yes")
else:
print("No") |
s567656722 | p03711 | u243572357 | 1566385471 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 | s = 'alababaababa'
x, y = map(int, input().split())
print('YES' if s[x] == s[y] else 'NO') |
s779105058 | p03711 | u329143273 | 1566242656 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 54 | s='0131212112121'
print("Yes" if s[x]==s[y] else "No") |
s770224695 | p03711 | u798316285 | 1566098881 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 143 | x,y=int(map,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
print("Yes" if x in a and y in a or x in b and y in b or x==2 and y==2 else "No") |
s788652267 | p03711 | u798316285 | 1566098825 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 142 | x,y=int(map,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
print("Yes" if x in a and y in a or x in b and y in b or x==2 and y==2 else "No) |
s294325884 | p03711 | u598229387 | 1566055488 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 109 | x,y=map(int, input().split())
a = {1,3,5,7,8,10,12}
b = {4,6,9,11}
print('Yes' if x,y<=a or x,y<=b else 'No') |
s713169061 | p03711 | u571445182 | 1565950826 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 351 | import sys
X, Y=map(int,input().split())
if X==2 or Y==2:
print('No')
sys.exit()
elif X==4 or X==6 or X==9 or X==11:
if Y==6 or Y==9 or Y==11:
print('Yes')
sys.exit()
else:
print('No')
sys.exit()
else:
if Y==3 or Y==5 or Y==7 or Y==8 or Y==10 Y==12:
print('Yes')
sys.exit()
else:
... |
s269204414 | p03711 | u598229387 | 1565898203 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 87 | S = 'ACABABAABABA'
x,y = map(int, input().split())
print('Yes' if S[x]==S[y] else 'No') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.