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:
M, D = map(int,input().split())
N, E = map(int,input().split())
if E == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
M,D=map(int,input().split())

if D==1 and M==m+1:
    print(1)
elif m==12 and M==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 m2 > m1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
import math
import sys


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

if D1 < D2: 
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
# 2019 12/01
# A November 30

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

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

Submission status: Accepted

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

    print(1 if m1 != m2 else 0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(0 if d-b>0 else 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,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 = input().split()
c,d = input().split()
if a == c:
    ans = 0
else:
    ans = 1
print(ans)

Submission status: Accepted

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

sanju = [4,6,9,11]
ans = 0

if m1 in sanju:
	if d1 == 30:
		if m2 == m1+1 and d2 == 1:
			ans = 1
elif m1 == 2:
	if d1 == 28:
		if m2 == m1+1 and d2 == 1:
			ans = 1
else:
	if d1 == 31:
		if m2 == m1+1 and d2 == 1:
			ans = 1

print(ans)

Submission status: Accepted

Solution code:
# coding:utf-8

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

if D1 > D2 and 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(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:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    M1, D1 = map(int, input().split())
    M2, D2 = map(int, input().split())
    print(int(D1 + 1 != D2))


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

lst = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

print(int(m1 != m2 and lst[m1] == d1))

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())

print('1' if not a == c else '0')

Submission status: Accepted

Solution code:
m, d = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

M,D = map(int,input().split())
M,D = map(int,input().split())
if D==1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
md1 = list(map(int, input().split()))
md2 = list(map(int, input().split()))


if md1[0] == md2[0]:
	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 (D1 > D2):
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a1,d1= map(int,input().split())
a2,d2= map(int,input().split())
if a1==a2:
    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:
  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(0)
else:
  print(1)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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 main():
    m1, d1 = list(map(int, input().split()))
    m2, d2 = list(map(int, input().split()))
    if d1 + 1 == d2:
        print(0)
    else:
        print(1)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (m1, d1) = [int(e) for e in lines[0].split(" ")]
    (m2, d2) = [int(e) for e in lines[1].split(" ")]

    return (m1, d1, m2, d2)


def solve(m1, d1, m2, d2):


    result = '0'
    if d2 == 1:
        result = '1'

    return  result

def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
m1, d1=map(int, input().split())
m2, d2=map(int, input().split())
print(int(d2==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("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(0)

else:
    print(1)

Submission status: Accepted

Solution code:
MD1=list(map(int,input().split()))
MD2=list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
k,l=map(int,input().split())
if n==k:
  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:
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 d2 != 1:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
M1, D1 = [int(s) for s in input().split()]
M2, D2 = [int(s) for s in input().split()]

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

Submission status: Accepted

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

m1, _ = map(int, input().split())
m2, _ = map(int, input().split())


ans = 0
if m1 != m2:
    ans = 1


print(ans)

Submission status: Accepted

Solution code:
M,D = [list(map(int,input().split())) for i in range(2)]
r = 0

if M[0] != D[0]:
    r = 1




print(r)

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 M2 != M1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
ds = [31,28,31,30,31,30,31,31,30,31,30,31]
a=list(map(int,input().split()))
b=list(map(int,input().split()))
if ds[a[0]-1]==a[1]:
  print('1')
else:
  print('0')

Submission status: Accepted

Solution code:
#coding:utf-8
from collections import deque
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = True

def index(a,b):
    return str(min(a,b)) + "," +  str(max(a, b))

def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    m1, d1 = map(int, args[0].split())
    m2, d2 = map(int, args[1].split())
    return '1' if m1+1 == m2 else '0'


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
a = list()
for _ in range(2):
    a.append(input().split(' '))

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

Submission status: Accepted

Solution code:
#A
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:
# -*- coding: utf-8 -*-
#mitsui a
import sys
import math
import collections
#sys.setrecursionlimit(100000)

#n=int(input())

tmp = input().split()
a,b = list(map(lambda a: int(a), tmp))
tmp = input().split()
c,d = list(map(lambda a: int(a), tmp))


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())
def ans():
    if m1==m2:
        print(0)
        return
    m=m1+1 if m1!=12 else 1
    if m2==m:
        print(1)
        return
    print(0)
ans()

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:
md1 = list(map(int,input().split()))
md2 = list(map(int,input().split()))

if md2[0] == md1[0] + 1 and md2[1] == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
n,k=map(int,input().split())
ans=chk=0
print(1 if (m in [1,3,5,7,8,10,12] and d==31) or (m in [4,6,9,11] and d==30) or (m==2 and d==28) else 0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2-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)
elif a == 12 and c == 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:
N1 ,M1 = map(lambda x: int(x),input().split())

N2 ,M2 = map(lambda x: int(x),input().split())

if N1 != N2:
  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:
  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:
    print("1")
elif m1 == 12 and m2 == 1 :
    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 not 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 D1+1==D2:
    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:
    print(0)
else:
    print(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:
lis = list(map(int, input().split()))
li = list(map(int, input().split()))

if lis[0]==li[0]:
    print(0)
else:
    print(1)

Submission status: Accepted

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

# N = int(input())
X, Y = map(int,input().split())
Z, W = map(int,input().split())
# vA = list(map(int, input().split()))

res = int(X != Z)
print(res)

Submission status: Accepted

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

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




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
M_1,D_1=[int(thing) for thing in input().split(" ")]
M_2,D_2=[int(thing) for thing in input().split(" ")]

if 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 (d2 == 1) and (m2 == m1 + 1):
    print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
M1, D1 = map(int,raw_input().split())
M2, D2 = map(int,raw_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 + 1 == 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 1<=m1 and m1<=12 and 1<=m2 and m2<=12 and d2==1:
    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:
M1, D1 = map(int, input().split())
M2 ,D2 = map(int ,input().split())

if (M1 +1 == M2) or (M1 == 12 and M2 == 1):
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' 
------------------------
author : iiou16
------------------------
'''

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

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


if __name__ == '__main__':
    main()

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_1, D_1=(int(i) for i in input().split())
M_2, D_2=(int(i) for i in input().split())

if D_1+1!=D_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(0)
else:
  print(1)

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:
# coding:utf-8
m1,d1 = list(map(int, input().split()))
m2,d2 = list(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 and d2 ==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a, b = (int(i) for i in input().split()) 
c, d= (int(i) for i in input().split()) 
#a = [int(i) for i in input().split()] 
#e = [[int(i) for i in input().split()] for i in range(n)] 
#print(a,b,c,d)
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()))

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

Submission status: Accepted

Solution code:
[m1,d1]=list(map(int,input().split()))
[m2,d2]=list(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)
elif(M1==12 and M2==1):
    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:
month, day = map(int, input().split())
month_after, day_after = map(int, input().split())

print(month_after - month)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
m, 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(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
# input = sys.stdin.readline
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    m1,d1=mis()
    m2,d2=mis()
    if m2-m1==1 or (m1==12 and m2==1) :
        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(1 if C != A else 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:
a, c = map(int,input().split())
b, d = map(int,input().split())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	M1, D1 = inputMap()
	M2, D2 = inputMap()

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


if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
n1 = input().split()
n2 = input().split()

if n1[0] == n2[0]:
    print(0)
else:
    print(1)

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 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+1)%12 == m2%12 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 d2 != d1 + 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 = [int(a) for a in input().split()]
m2, d2 = [int(a) for a in input().split()]

print(int(m1 is not 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:
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())

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())
if a+1==c:
  print(1)
else:
  print(0)

Submission status: Accepted

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

import math
import itertools

# 入力
#N = int(input())
#S = str(input())
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 M2 == 1:
    print("0")
elif M1 != M2:
    print("1")
else:
    print("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:
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,d=map(int,input().split(" "))
mm,dd=map(int,input().split(" "))

if m==mm:
	print(0)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))
M1,D1 = LI()
M2, D2 = LI()
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()))

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 d2==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:

m1 = int(input().split()[0])
m2 = int(input().split()[0])

if m2-m1==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().strip().split())
m2, d2 = map(int, input().strip().split())

if m2 > m1:
    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:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
aaa = list(map(int,input().split()))
bbb = list(map(int,input().split()))

if aaa[0] == bbb[0]:
    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('1')
else:
    print('0')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    *mdmd,  = map(int, read().split())
    print("1" if mdmd[0]!=mdmd[2] else "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:
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,d=map(int,input().split())
M,D=map(int,input().split())
print(0 if M==m 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:
input1 = map(int,input().split())
input2 = map(int,input().split())

M1, D1 = input1
M2, D2 = input2

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

Submission status: Accepted

Solution code:
m1, d1 = [int(val) for val in input().split(' ')]
m2, d2 = [int(val) for val in input().split(' ')]

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

if m1==m2:
	ans = '0'
else:
	ans = '1'

print(ans)

Submission status: Accepted

Solution code:
input_line1=input().split()
input_line2=input().split()
if int(input_line1[0])!=int(input_line2[0]):
  print ('1')
else:
  print ('0')

Submission status: Accepted

Solution code:
m1, n1 = map(int, input().split())
m2, n2 = map(int, input().split())
if m1==m2:
    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 m2 == m1+1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m,n=input().split()
ma,na=input().split()
if m==ma:
  print("0")
else:
  print("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:
today = input()
tomorrow = list(map(lambda x: int(x), input().split(" ")))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
md = [list(map(int, input().split())) for _ in range(2)]
if md[1][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:
# -*- coding: utf-8 -*-
# get a integer
a = raw_input()
b = raw_input()
if int(b.split(" ")[1]) == 1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1, d1 = [int(_) for _ in input().split()]
m2, d2 = [int(_) for _ in input().split()]
if d1 + 1 == d2:
    print('0')
else:
    print('1')

Submission status: Accepted

Solution code:
#　三井住友A
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
m1,d1 = nm()
m2,d2 = nm()
if m1==m2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
m,d = map(int,input().split())
n,e = map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data1 = list(map(int, input().split()))
data2 = list(map(int, input().split()))

if data1[0]==data2[0]:
    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 and b > d:
    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==12 and M2 ==1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
s = list(map(int, input().split()))
f = list(map(int, input().split()))
if s[0] != f[0]:
    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 and M1+1==M2:
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[list(map(int,input().split())) for i in range(2)]

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

Submission status: Accepted

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

ans = 0
if (m1 + 1 == m2 and d2 == 1):
    ans = 1
print(ans)

Submission status: Accepted

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

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