Problem:


Score: 100 points

Problem Statement

In this problem, a date is written as Y-M-D. For example, 2019-11-30 means November 30, 2019.

Integers M_1, D_1, M_2, and D_2 will be given as input.

It is known that the date 2019-M_2-D_2 follows 2019-M_1-D_1.

Determine whether the date 2019-M_1-D_1 is the last day of a month.

Constraints

Both 2019-M_1-D_1 and 2019-M_2-D_2 are valid dates in the Gregorian calendar.

The date 2019-M_2-D_2 follows 2019-M_1-D_1.

Input

Input is given from Standard Input in the following format:

M_1 D_1
M_2 D_2

Output

If the date 2019-M_1-D_1 is the last day of a month, print 1; otherwise, print 0.

Sample Input 1

11 16
11 17

Sample Output 1

0

November 16 is not the last day of a month.

Sample Input 2

11 30
12 1

Sample Output 2

1

November 30 is the last day of November.



Sample input:
11 16
11 17


Sample output:
0

Submission status: Accepted

Solution code:
m1,d2 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1==m2:
  print('0')
else:
  print('1')

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2:
      print(1)
else:
      print(0)

Submission status: Accepted

Solution code:
def resolve():
    m1,d1=map(int, input().split())
    m2,d2=map(int, input().split())
    if m2==m1:
        print('0')
    else:
        print('1')
resolve()

Submission status: Accepted

Solution code:
def resolve():
    m1,d1=map(int, input().split())
    m2,d2=map(int, input().split())
    if m2==m1+1 and d2==1:
        print('1')
    elif m1==12 and m2==1 and d2==1:
        print('1')
    else:
        print('0')
resolve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

    M,D=map(int,input().split())
    N,E=map(int,input().split())

    print(1 if M!=N else 0)

resolve()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    a,b = map(int, input().split())
    c,d = map(int, input().split())
    if d==1:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print(max(2-int(open(0).read().split()[3]), 0))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

m1, d1 = list(map(int, input().split()))
m2, d2 = list(map(int, input().split()))

ans = 1 if d2 == 1 else 0
print(ans)

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print(0 if m1==m2 else 1)

Submission status: Accepted

Solution code:
def main():
    M1, D1 = map(int, input().split())
    M2, D2 = map(int, input().split())
    if M1 != M2:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c, d = map(int, input().split())
print(int(a!=c))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
c,d = map(int, input().split())
if d == 1:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c, d = map(int, input().split())
if a != c:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1,D1=list(map(int, input().split()))
M2,D2=list(map(int, input().split()))
if (M1==M2-1 or M1-M2==11) and D2==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    _,_=input().split()
    aa,a=map(int,input().split())
    if a==1:print(1)
    else:print(0)

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
m1,d1= list(map(int, input().split()))
m2,d2= list(map(int, input().split()))
if d2==1:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
M1,D1 = [int(i) for i in input().split()]
M2,D2 = [int(i) for i in input().split()]
if M1 != M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m_1,d_1 = map(int,input().split())
m_2,d_2 = map(int,input().split())
if m_1 < m_2:
  print('1')
else:
  print('0')

Submission status: Accepted

Solution code:
m1, d1 = list(map(int,input().split()))
m2, d2 = list(map(int,input().split()))

if m2 == m1 + 1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
if a+1==c:
    print(1)
else :
    print(0)

Submission status: Accepted

Solution code:
xy = [map(int,input().split()) for i in range(2)]
x,y = [list(j) for j in zip(*xy)]
if (y[0] + 1) == y[1] :
    ans = 0
else:
    ans = 1
print(ans)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1==M2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if(m1!=m2):
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if D2 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if D2 == 1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if D2==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
c,d = map(int, input().split())
if c == a + 1 and d == 1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
# 三井住友信託銀行プログラミングコンテスト2019: A – November 30
m1, d1 = input().split()
m2, d2 = input().split()
print(1 if d2 == '1' else 0)

Submission status: Accepted

Solution code:
M1,D1 = map(int, input().split())
M2,D2 = map(int, input().split())
if M1==12 and M2==1 or M1+1==M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())

month = 12

if (m_1 % month + 1) == m_2 and d_2 == 1:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if m1==m2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split(" "))
m2, d2 = map(int, input().split(" "))
print(1 if m2 == m1 + 1 else 0)

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
s,t=map(int,input().split())
print(s-n)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if M1<M2:print(1)
else:print(0)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
c, d = map(int,input().split())

print(1 if a != c else 0)

Submission status: Accepted

Solution code:
M1,_,M2,_=map(int,open(0).read().split())
print(M2-M1)

Submission status: Accepted

Solution code:
M1,_,M2,_=map(int,open(0).read().split())
print(1 if M1!=M2 else 0)

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if M1 + 1 == M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Sat Mar 28 15:38:17 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

m, d = na()
m2, d2 = na()

if d + 1 != d2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

m1,d1 = iim()
m2,d2 = iim()

if d2 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
b = input()
a = input()
print(int(a[-2:]==' 1'))

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if M1!=M2:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())
if d_2 == 1:
  ans = '1'
else:
  ans = '0'
print(ans)

Submission status: Accepted

Solution code:
x,y=list(map(int, input().split()))
x,y=list(map(int, input().split()))
if y==1:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
_ =  input()

_ ,  d2 = [int(i) for i in input().split()]

if d2 == 1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c, d = map(int, input().split())
if a != c:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if d1 == 31:
    print("1")
elif d1 == 30 and d2 == 1:
    print("1")
elif d1 == 28 and m1 == 2:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if (m1!=m2):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
N, M = map(int, input().split())
ans = 0
N, M = map(int, input().split())
if M==1:
  ans=1
print(ans)

#print(*ans, sep='/n')

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if (m2 - m1) % 12 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 + 1 == m2 :
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if D2==1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
n2, m2 = map(int, input().split())
if n2 != n:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
#A
a,b=map(int,input().split())
c,d=map(int,input().split())
print(1 if a!=c else 0)

Submission status: Accepted

Solution code:
a, b= map(int, input().split())
c, d = map(int, input().split())

if a == c:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
print(0 if a==c else 1 )

Submission status: Accepted

Solution code:
L=list(map(int,input().split()))
K=list(map(int,input().split()))
if L[0]==K[0]:
	print(0)
else:
	print(1)

Submission status: Accepted

Solution code:
def main():
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())

    if m1 != m2:
        print('1')
    else:
        print('0')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print(1-(input()[:2]in input()))

Submission status: Accepted

Solution code:
print(0-input().find(input()[:2]))

Submission status: Accepted

Solution code:
print(1*(input()[:2]!=input()[:2]))

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if d2==1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
a,b=input().split()
c,d=input().split()
print(1 if a!=c else 0)

Submission status: Accepted

Solution code:
def main():
    day = [list(map(int, input().split())) for _ in range(2)]
    print(1 if day[0][0] + 1 == day[1][0] else 0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
m1,d1 = (int(x) for x in input().split())
m2,d2 = (int(x) for x in input().split())

if d2==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if d2 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m1,d1=(map(int, input().split())) 
m2,d2=(map(int, input().split()))
if m1 !=m2:
  print(1)
elif m1==m2:
  print(0)

Submission status: Accepted

Solution code:
M1, D1 = input().split()
M2, D2 = input().split()
M1 = int(M1)
M2 = int(M2)

if M1!=M2:
  print('1')
else:
  print('0')

Submission status: Accepted

Solution code:
# coding: utf-8

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == m2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
def solve():
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())
    
    if m1 != m2:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print(1) if d2 == 1 else print(0)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c, d = map(int, input().split())
if d == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
c,d = map(int, input().split())

if d == 1:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if d2  == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
	print(0)
else:
	print(1)

Submission status: Accepted

Solution code:
m1, d1 = map(int,input().split())
m2, d2 = map(int,input().split())

if d1>d2:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
l=[31,28,31,30,31,30,31,31,30,31,30,31]

if D2==1:
 print("1")
else:
 print("0")

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

if M1!=M2:
  print(1)
  
else:
  print(0)

Submission status: Accepted

Solution code:
a = []
b = []
a = input().split()
b = input().split()

if a[0] == b[0]:
  print("0")
else:
  print("1")

Submission status: Accepted

Solution code:
input1 = list(map(int,input().split()))
input2 = list(map(int,input().split()))
m1 = input1[0]
d1 = input1[1]
m2 = input2[0]
d2 = input2[1]
if m1 == m2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
from sys import stdin
m1, d1 = [int(_) for _ in stdin.readline().rstrip().split()]
m2, d2 = [int(_) for _ in stdin.readline().rstrip().split()]
if m1 == m2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
_,a,_,b=map(int,open(0).read().split());print(1*(a+1!=b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
if a==c:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

print(1 if d2==1 else 0)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print(int(m1 != m2))

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print(1 if m1!=m2 else 0)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

print(0 if D1 + 1 == D2 else 1)

Submission status: Accepted

Solution code:
M1, D1, M2, D2 = map(int, open(0).read().split())
print(int(M1!=M2))

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if D2 == 1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
M1, D1=input().split()
M2, D2=input().split()
M1=int(M1)
M2=int(M2)
if M1==M2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
x1,y1 = map(int,input().split())

x2,y2 = map(int,input().split())

if x1 == x2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
m1, d1 = input().split()
m2, d2 = input().split()
if m1==m2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
a = [int(str) for str in input().split()]
b = [int(str) for str in input().split()]
if a[0] == b[0]:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
m1,d1=input().split()
m2,d2=input().split()
if m1==m2:
  print("0")
else:
  print("1")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

m1, d1 = [int(x) for x in input().split()]
m2, d2 = [int(x) for x in input().split()]
print('1' if m1 != m2 else '0')

Submission status: Accepted

Solution code:
m1, _ = map(int, input().split())
m2, _ = map(int, input().split())
if m1 != m2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
input()
_, d = input().split()
print('1' if d == '1' else '0')

Submission status: Accepted

Solution code:
li = [list(map(int, input().split())) for i in range(2)]
if li[0][0] != li[1][0] :
    print(1)
else :
    print(0)

Submission status: Accepted

Solution code:
M_1, D_1 = map(int, input().split())
M_2, D_2 = map(int, input().split())

if M_1 != M_2:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if d2==1:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
m, d = map(int, input().split())
if M + 1 == m:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 == m2:
    print('0')
else:print('1')

Submission status: Accepted

Solution code:
def pin(type=int):
    return map(type,input().split())
a,b=pin()
c,d=pin()
print(str(c-a))

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
c, d = map(int,input().split())
if a == c:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
def main():
    M1, D1 = map(int, input().split())
    M2, D2 = map(int, input().split())

    print(int(M1 != M2))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
print("0" if a==c else "1")

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if M1==M2 and D1+1==D2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
a, b = input().split()
x, y = input().split()
if a == x:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))

if a[0] == b[0]:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
C,D = map(int,input().split())
if C - A == 1:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

M1,D1 = map(int, input().split())
M2,D2 = map(int, input().split())

if(M1+1==M2):print(1)
else: print(0)

Submission status: Accepted

Solution code:
a,b=(int(x) for x in input().split())
c,d=(int(x) for x in input().split())
if a == c:
  print('0')
else:
  print('1')

Submission status: Accepted

Solution code:
m1,d1=input().split()
m2,d2=input().split()

if d2=="1":
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
M_1, D_1 = map(int, input().split(" "))
M_2, D_2 = map(int, input().split(" "))

print(0 if M_1 == M_2 else 1)

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
mm,dd=map(int,input().split())
print('01'[m<mm])

Submission status: Accepted

Solution code:
# A - November 30
def main():
    M1, _, M2, _ = map(int, open(0).read().split())
    print(int(M1 != M2))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
c,d = map(int, input().split())
if a != c:
    print(1)
else:
    print("0")

Submission status: Accepted

Solution code:
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())
if D1 > D2:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

print("1" if d1 > d2 else "0")

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
    m, d = na()
    n, s = na()

    if s == 1:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
m_1,d_1 = map(int, input().split())
m_2,d_2 = map(int, input().split())
if d_2!=d_1+1:
	print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
N,M=map(int,input().split())
n,m=map(int,input().split())

if N==n:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if M1!=M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M_1, D_1 = map(int, input().split())
M_2, D_2 = map(int, input().split())

if M_1 != M_2:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
day1=input().rstrip().split()
day2=input().rstrip().split()

if int(day2[1])==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
def LI():
	return [int(s) for s in input().split()]

D1 = LI()
D2 = LI()
 
print(1) if D2[1] == 1 else print(0)

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())

if m1 != m2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1, D1 = tuple(map(int, input().split()))
M2, D2 = tuple(map(int, input().split()))
if D2 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1, D1 = tuple(map(int, input().split()))
M2, D2 = tuple(map(int, input().split()))
M1 = 1 if M1 + 1 > 12 else M1 + 1
if M1 == M2 and D2 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if M1<M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
n_1 = list(map(int, input().split()))
n_2 = list(map(int, input().split()))

if n_1[0] != n_2[0]:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())

print(0) if m1==m2 else print(1)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 == M2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 != M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if D2 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    m1,d1 = LI()
    m2,d2 = LI()
    if d2 == 1:
        return 1

    return 0


print(main())

Submission status: Accepted

Solution code:
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1 == m2 :
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
if a==c:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
j= list(map(int, input().split()))
if j[1]==1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print(1 if d2==1 else 0)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())

if d == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

print(1 if D2 == 1 else 0)

Submission status: Accepted

Solution code:
M1, D1 = list(map(int, input().split()))
M2, D2 = list(map(int, input().split()))

print(1 if D1+1 != D2 else 0)

Submission status: Accepted

Solution code:

x = list(map(int, input().split()))
x = list(map(int, input().split()))

if x[1] == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if(D2 == 1):
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
m1, d1 = map(int,input().split())
m2, d2 = map(int,input().split())
#print(m1,d1,m2,d2)
if m1==m2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
a, _ = map(int, input().split())
c, d = map(int, input().split())

if a != c and d == 1:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m2 == m1+1 and d2 == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
a=list(map(int, input().split()))
b=list(map(int, input().split()))
ou=b[0]-a[0]
if ou == 1:
  print(1)
elif ou==0:
  print(0)
elif ou==1-12:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
A = input().split(" ")
B = input().split(" ")
if A[0] == B[0]:
	print("0")
else:
	print("1")

Submission status: Accepted

Solution code:
M,D=map(int,input().split())
N,A=map(int,input().split())

if N>M:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split(" ")]
c, d = [int(x) for x in input().split(" ")]
print(0 if a == c else 1)

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if M1==M2:
    print("0")
else:
    print("1")

Submission status: Accepted

Solution code:
m_one = list(map(int, input().split()))
m_two = list(map(int,input().split()))
print(1 if m_one[1] > m_two[1] else 0)

Submission status: Accepted

Solution code:
a,b = input().split()
c,d = input().split()
if a == c:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
l1 = [int(i) for i in input().split()]
l2 = [int(i) for i in input().split()]
if l1[0] == l2[0]:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())
if m1<m2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m1,d1=list(map(int,input().split()))
m2,d2,=list(map(int,input().split()))
print(0 if m1==m2 else 1)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d2 == 1:
  	print(1)
else:
  	print(0)

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if M1 != M2:
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
### -*- coding: utf-8 -*-

prev = input().split()[0]
next = input().split()[0]

if prev != next:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
a,b = map(int,input().split())
if a==x+1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
a = input()
b = input()
month_a = int(a.split(" ")[0])
month_b = int(b.split(" ")[0])
if month_a != month_b:
	val = 1
else:
	val = 0
print(val)

Submission status: Accepted

Solution code:
x = []
y = []
for i in range(2):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)

if x[0]!=x[1]:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
n, m = (int(x) for x in input().split())
n1, m1 = (int(a) for a in input().split())
if n==n1:
    print('0')
else:
    print('1')

Submission status: Accepted

Solution code:
M1,D1 = list(map(int,input().split()))
M2,D2 = list(map(int,input().split()))
if (M1 != M2 and M2>M1) or M2 == 1 and M2<M1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d2 == 1:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 in [1, 3, 5, 7, 8, 10, 12]:
    if D1 == 31:
        print(1)
    else:
        print(0)
elif M1 in [4, 6, 9, 11]:
    if D1 == 30:
        print(1)
    else:
        print(0)
elif M1 == 2:
    if D1 == 28:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
c, d = map(int,input().split())
if d == 1:
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
_ = list(map(int, input().split()))
_, n = list(map(int, input().split()))
if n == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M1,D1=(int(x) for x in input().split())
M2,D2=(int(x) for x in input().split())
if M1==M2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    m, d = list(map(int, input().rstrip('\n').split()))
    m, d = list(map(int, input().rstrip('\n').split()))
    print(1 if d == 1 else 0)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
M1,D1 = list(map(int,input().split()))
M2,D2 = list(map(int,input().split()))

if M1 == M2:
  print(0)
else:
  print(1)