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:
P1 = list(map(int, input().split()))
P2 = list(map(int, input().split()))
a = [4,6,9,11]
if P1[0] != 2 and P2[0] == P1[0]+1:
  if P1[0] in a and P1[1]==30 and P2[1]==1:
    print(1)
  if P1[0] not in a and P1[1]==31 and P2[1]==1:
    print(1)
else:
 if P1[0] ==2 and P1[1]==28 and P2[0] == 3 and P2[1]==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 M1 == M2:
    print(0)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
day_1 = input().split()
day_2 = input().split()
if day_1[0] != day_2[0]:
  print(1)
else:
  print(0)

Submission status: Accepted

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

A,B = map(int,input().split())
C,D = map(int,input().split())

if (A == 1 or A == 3 or A == 5 or A == 7 or A == 8 or A == 10 or A == 12):
  if B == 31:
    print(1)
  else:
    print(0)
elif (A == 4 or A == 6 or A== 9 or A == 11):
  if B == 30:
    print(1)
  else:
    print(0)
elif A == 2:
  if B == 28:
    print(1)
  else:
    print(0)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

    if(M1==2 and D1==28):
        if(M2==M1+1 and D2==1):
            print('1')
            sys.exit()

    if(M1==4 or M1==6 or M1==9 or M1==11 and D1==30):
        if(M2==M1+1 and D2==1):
            print('1')
            sys.exit()

    if(M1==1 or M1==3 or M1==5 or M1==7 or M1==8 or M1==10 or M1==12 and D1==31):
        if(M2==M1+1 and D2==1) or (M1==12 and M2==1 and D2==1):
            print('1')
            sys.exit()

    print('0')

main()

Submission status: Accepted

Solution code:
str  = [input() for i in range(2)]
s1 = str[0].split()
s2 = str[1].split()
 
if s1[0] != s2[0] and int(s1[1]) >= int(s2[1]):
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
# A - November 30
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

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

Submission status: Accepted

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

if int(a[-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 D1 + 1 == D2:
    print(0)
else:
    print(1)

Submission status: Accepted

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

if d1 - d2 != -1:
    print('1')
else:
    print('0')

Submission status: Accepted

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

a = List[0][0]
b = List[1][0]

if a == b:
  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:
def main():
  M = []
  D = []
  for i in range(2):
    m, d = [int(i) for i in input().split()]
    M.append(m)
    D.append(d)

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

main()

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 = [int(i) for i in input().split()]
m2, d2 = [int(i) for i in input().split()]
if m1 == m2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
ip=input().strip()
while((len)==0):
  ip=input().strip()
m,d=map(int,ip.split())
m1,d1=map(int,input().split())
odd=[1,3,5,7,8,10,12]
eve=[4,6,9,11]
if m in odd:
  if(d==31):
    print(1)
  else:
    print(0)
elif m in eve:
  if(d==30):
    print(1)
  else:
    print(0)
else:
  if(d==28):
    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:
vi,di=[int(x) for x in input().split()]
v2,d1=[int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
from fractions import gcd
# from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7


def main():
    m, d = map(int, input().split())
    md, dd = map(int, input().split())

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

    


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:


def inputs():
    return [int(s) for s in input().split()]


def main():
    M1, _ = inputs()
    M2, _ = inputs()

    if (M1 + 1) % 12 == M2 % 12:
        return 1
    else:
        return 0


if __name__ == '__main__':
    print(main())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    M1, D = map(int, input().split())
    M2, D = map(int, input().split())
    return '1' if M1 != M2 else '0'

if __name__ == '__main__':
    print(solve())

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(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:
ma, da = input().split()
mb, db = input().split()

if ma == mb:
  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:
M_1,D_1 = map(int, input().split())
M_2,D_2 = map(int, input().split())

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

Submission status: Accepted

Solution code:
m = input().split()
d = input().split()
result = 0
if abs(int(m[0]) - int(d[0])):
  result = 1
print(result)

Submission status: Accepted

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

result = 0
 
if (M2 % 12) == ((M1 + 1) % 12):
  if (D2 == 1) & (M2 != 1):
    result = 1
    
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
m1 = input().split()[0]
m2 = input().split()[0]

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

a = [1, 3, 5, 7, 8, 10, 12]
b = [2, 4, 6, 9, 11]

if d2 == 1 and m2 == m1 + 1:
    if d1 == 28 and m1 == 2:
        print(1)
    elif d1 == 30:
        for i in range(len(b)):
            if m1 == b[i]:
                print(1)
        for i in range(len(a)):
            if m1 == a[i]:
                print(0)
    elif d1 == 31:
        for i in range(len(a)):
            if m1 == a[i]:
                print(1)
        for i in range(len(b)):
            if m1 == b[i]:
                print(0)
    else:
        print(0)
else:
    print(0)

Submission status: Accepted

Solution code:
"""
n = int(input())*100
x = n%108

if x <=12:
	print(n//108)
else:
	print(":(")
	"""
a = []
for i in range(2):
	a.append(list(map(int,input().split())))
if a[0][0] is not a[1][0]:
	print("1")
else:
	print("0")

Submission status: Accepted

Solution code:
m1, _ = map(int, input().split())
m2, _ = 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 M2 - M1 ==0:
    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:
    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:
# -*- coding: utf-8 -*-
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=input().split()
M2,D2=input().split()
M1=int(M1)
M2=int(M2)
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 D1 + 1 == D2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
def main():
    m1, d1 = [int(n) for n in input().split()]
    m2, d2 = [int(n) for n in input().split()]
    if m1 != m2:
        print("1")
    else:
        print("0")
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 ==2 :
    if D1==28:
        print(1)
    else:
        print(0)
elif (M1==1) or (M1==3) or (M1==5) or (M1==7) or (M1==8) or (M1==10) or (M1==12) :
    if(D1==31):
        print(1)
    else:
        print(0)    
elif  (M1==4) or (M1==6) or (M1==9) or (M1==11) :
    if(D1==30):
        print(1)
    else:
        print(0)
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:
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())

if a1 != b1 and b2 == 1 :
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
import sys
# input = sys.stdin.buffer.readline
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
import heapq
import bisect
import copy
# import math
def warshall_floyd(d, N):
    for k in range(N):
        for i in range(N):
            for j in range(N):
                d[i * N +j] = min(d[i * N +j], d[i * N + k] + d[k * N + j])
    return d

MOD = 10**9 + 7

def main():
    aa, ab = getlist()
    bb, bc = getlist()
    if aa == bb:
        print(0)
    else:
        print(1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M1, D2 = 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")
"""
if d1 == 31:
    if m1 == 1 or m1 == 3 or m1 == 5 or m1 == 7 or m1 == 8 or m1 == 10 or m1 == 12:
        print(1)
elif d1 == 30:
    if m1 == 4 or m1 == 6 or m1 == 9 or m1 == 11:
        print(1)
elif d1 == 28:
    if m1 == 2:
        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:
x = []
y = []
for i in range(2):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)

if y[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 (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:
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 in [1,3,5,7,8,10] and D1==31) or (M1 in [4,6,9,11] and D1==30) or (M1==2 and D1==28):
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
dt1 = list(map(int, input().split()))
dt2 = list(map(int, input().split()))
if dt1[0] == dt2[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:
m1,d1=(int(x) for x in input().split())
m2,d2=(int(x) for x in input().split())
math1 = [1,3,5,7,8,10,12]
math2 = [4,6,9,11]
math3 = [2]
a = 0
if m1 in math1:
    if d1 == 31:
        a += 1
elif m1 in math2:
    if d1 == 30:
        a += 1
elif m1 in math3:
    if d1 == 28:
        a += 1
else:
    pass

print(a)

Submission status: Accepted

Solution code:
# 複数
s = input().split()
s = input().split()
i=int(s[1])
if i==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
from sys import stdin
m1, d1 = (stdin.readline().rstrip()).split()
m2, d2 = (stdin.readline().rstrip()).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:
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())
m1, d1 = map(int, input().split())
if m != m1:
    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 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 = input().split()
M2,D2 = input().split()

# print(M1,M2,D1,D2)

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

c = 0

if m1 == 1 and d1 == 31 and m2 == 2 and d2 == 1:
    print(1)
    c = 1
if m1 == 2 and d1 == 28 and m2 == 3 and d2 == 1:
    print(1)
    c = 1
if m1 == 3 and d1 == 31 and m2 == 4 and d2 == 1:
    print(1)
    c = 1
if m1 == 4 and d1 == 30 and m2 == 5 and d2 == 1:
    print(1)
    c = 1
if m1 == 5 and d1 == 31 and m2 == 6 and d2 == 1:
    print(1)
    c = 1
if m1 == 6 and d1 == 30 and m2 == 7 and d2 == 1:
    print(1)
    c = 1
if m1 == 7 and d1 == 31 and m2 == 8 and d2 == 1:
    print(1)
    c = 1
if m1 == 8 and d1 == 31 and m2 == 9 and d2 == 1:
    print(1)
    c = 1
if m1 == 9 and d1 == 30 and m2 == 10 and d2 == 1:
    print(1)
    c = 1
if m1 == 10 and d1 == 31 and m2 == 11 and d2 == 1:
    print(1)
    c = 1
if m1 == 11 and d1 == 30 and m2 == 12 and d2 == 1:
    print(1)
    c = 1
if m1 == 12 and d1 == 31 and m2 == 1 and d2 == 1:
    print(1)
    c = 1
if c == 0:
    print(0)

Submission status: Accepted

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

cal = {1: 31, 2:28, 3:31, 4:30, 5:31, 6:30, 7:31, 8:31, 9:30, 10:31, 11:30, 12:31}

if cal[M1] == D1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
L=[[1,31],[2,28],[3,31],[4,30],[5,31],[6,30],[7,31],[8,31],[9,30],[10,31],[11,30],[12,31]]

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

print([0,1][[M1,D1] in L])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def main():
    m1, d1 = [int(i) for i in input().split()]
    m2, d2 = [int(i) for i in 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 m1 ==1 and d1 == 31:
  print('1')
elif m1==2 and d1 == 28:
  print('1')
elif m1==3 and d1 == 31:
  print('1')
elif m1==4 and d1 == 30:
  print('1')
elif m1==5 and d1 == 31:
  print('1')
elif m1==6 and d1 == 30:
  print('1')
elif m1==7 and d1 == 31:
  print('1')
elif m1==8 and d1 == 31:
  print('1')
elif m1==9 and d1 == 30:
  print('1')
elif m1==10 and d1 == 31:
  print('1')
elif m1==11 and d1 == 30:
  print('1')
else:
  print('0')

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:
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:
#三井住友　コンテストA
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==1 or M1==3 or M1==5 or M1==7 or M1==8 or M1==10 or M1==12:
    if D1==31:
        print('1')
    else:
        print('0')
elif M1==4 or M1==6 or M1==9 or M1==11:
    if D1==30:
        print('1')
    else:
        print('0')
elif M1==2:
    if D1==28:
        if D2-D1==1:
            print('0')
        else:
            print('1')
    elif D1==29:
        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:
m,d = map(int,input().split())
n,e = map(int,input().split())
if m!=n:
    print(1)
else:
    print(0)

Submission status: Accepted

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

im1 = int(m1)
im2 = int(m2)
sm1 = str(m1)
sm2 = str(m2)

samurai = {'2':28, '4':30, '6':30, '9':30, '11':30}

f  = 0

if im1 == im2:
    pass
elif im1 + 1 == im2 or (im1 == 12 and im2 == 1):
    if sm1 in samurai:
        if d1 == samurai[sm1]:
            f += 1
    else:
        if d1 == 31:
            f += 1
    if d2 == 1:
        f += 1

if f == 2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
M,D = map(int,input().split())
N,S = map(int,input().split())
if M==1 or M==3 or M==5 or M==7 or M==8 or M==10 or M==12:
    if D == 31 and S==1:
        if M+1==N or M-11==N:
            print(1)
        else:
            print(0)
    else:
            print(0)
elif M==4 or M==6 or M==9 or M==11:
    if D==30 and S==1:
        if M+1==N or M-11==N:
            print(1)
        else:
            print(0)
    else:
            print(0)
elif M==2:
    if D==28 or D==29:
        if S==1:
            if M+1==N or M-11==N:
                print(1)
            else:
                print(0)
        else:
                print(0)
    else:
                print(0)
else:
    print(0)

Submission status: Accepted

Solution code:
m1,d1 = list(map(int, input().split()))
m2,d1 = 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 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:
M1, D1 = [int(v) for v in input().split()]
M2, D2 = [int(v) for v in input().split()]

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

Submission status: Accepted

Solution code:
m = []
d = []
for _ in range(2):
    temp = list(map(int, input().split()))
    m.append(temp[0])
    d.append(temp[1])
if m[0] == 12 and d[0] == 31:
    print(1)
elif m[1] == m[0] + 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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:
input()
m, d = map(int, input().split())
print(int(d==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:
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=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())
m,n = map(int, input().split())
c=0
d=1

if a==m:
 print(c)
else: 
 print(d)

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b=map(int,input().split(" "))
c,d=map(int,input().split(" "))
ans=0
if(a!=c):
    ans=1
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
m1, d1 = [int(n) for n in input().split()]
m2, d2 = [int(n) for n in 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:
a,b = map(int,input().split())
m,n = map(int,input().split())

if b>n:
  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:
a,aa = map(int,input().split())
b,bb = map(int,input().split())
 
if a==b:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
a = input().split()
c = input().split()
if a[0] != c[0]:
	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(d2 == 1):
    print(1)
    exit()
print(0)

Submission status: Accepted

Solution code:
s = [input().split() for i in range(2)]
M1=int(s[0][0])
D1=int(s[0][1])
M2=int(s[1][0])
D2=int(s[1][1])

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

Submission status: Accepted

Solution code:
M1, _ = map(int, input().split())
M2, _ = 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 d1+1 != d2:
  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:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby


n1 = [int(s) for s in stdin.readline().rstrip().split()]
n2 = [int(s) for s in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(map(int,input().split()))
t=list(map(int,input().split()))
if(t[1]==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 M1==M2: # もし同じ月なら、月末日ではない
    print(0)
else: # 違う月なら月末日である
    print(1)

Submission status: Accepted

Solution code:
m1, d1 = input().split()
m1, d2 = input().split()
d2 = int(d2)
result = 0

if d2 == 1:
  result = 1
print(result)

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:
n1, n2 = input().split()
n1, n2 = input().split()
if n2 == '1':
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
m31 = [1,3,5,7,8,10,12]
m30 = [4,6,9,11]

if a in m31 and b == 31:
    print(1)
elif a in m30 and b == 30:
    print(1)
elif a == 2 and b == 28:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=(int(x) for x in input().split())
c,d=(int(x) for x in input().split())

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

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:
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:
import sys
m,d = input().split()
if m in ('1','3','5','7','8','10','12'):
  if d == '31':
    print('1')
  else:
    print('0')
elif m == '2':
  if d == '28':
    print('1')
  else:
    print('0')
else:
  if d == '30':
    print('1')
  else:
    print('0')

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
# if (m1 == 4 or 6 or 9 or 11) and d1 ==30:
#     print(1)
# elif m1 == 2 and d1 ==28:
#     print(1)
# elif d1 == 31:
#     print(1)
# else:
#     print(0)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
a31 = [1,3,5,7,8,10,12]
a30 = [4,6,9,11]
if M1 in a31:
    if D1 == 31 and M2 == M1+1 and D2 == 1:
        print(1)
    else:
        print(0)
    
elif M1 in a30:
    if D1 == 30 and M2 == M1+1 and D2 == 1:
        print(1)
    else:
        print(0)
elif M1 == 2:
    if D1 == 28 and M2 == M1+1 and D2 == 1:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
month_1, day_1 = input().split()
month_2, day_2 = input().split()

int_month_1 = int(month_1)
int_month_2 = int(month_2)

if int_month_1 == int_month_2:
  print('0')
else:
  print('1')