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:
import datetime
import calendar

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

def get_last_date(year, month):
  return datetime.date(year, month, calendar.monthrange(year, month)[1])

now = datetime.date(2019, m1, d1)
dat = get_last_date(2019, m1)

if now == dat:
  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:
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())
if M1 in [1,3,5,7,8,10] and M1+1 == M2 and D1 ==31 and D2 == 1:
    ans =1
elif M1 ==2 and M2 ==3 and D1==28 and D2 ==1:
    ans = 1
elif M1 == 12 and M2 == 1 and D1 == 31 and D2 ==1:
    ans =1
elif M1 in [4,6,9,11] and M1 +1 == M2 and D1==30 and D2 == 1:
    ans =1
else:
    ans=0
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
lines = stdin.readlines()
 
M1,D1 = map(int, lines[0].split())
M2,D3 = map(int, lines[1].split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
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:
# -*- 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:
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:
d1 = list(map(int,input().split()))
d2 = list(map(int,input().split()))
if d1[0] != d2[0]:
    print('1')
else:
    print('0')

Submission status: Accepted

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

if b + 1 == d:
    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:
    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!=12:
    if M2-M1==1:
        print(1)
    else:
        print(0)
elif M1==12:
    if M2==1:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    a, b = LI()
    c, d = LI()
    if a != c:
        print(1)
    else:
        print(0)
    return


#main
if __name__ == '__main__':
    solve()

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 -*-
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()
# template


def main():
    m1, d1 = mi()
    m2, d2 = mi()
    if(m1 != m2):
        print(1)
    else:
        print(0)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
n = list(map(int, input().split()))


if l[0] == 12 and n[0]==1 :
    print("1")


elif n[0] == l[0] +1:
    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 (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:
Month = [0,1,2,3,4,5,6,7,8,9,10,11,12]
Day = [31,28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

IN = list(map(int, input().split()))
_month1 = IN[0]
_day1 = IN[1]

IN = list(map(int, input().split()))
_month2 = IN[0]
_day2 = IN[1]

if _month1 == 1:
    if _day1 == 31:
        print(1)
    else:
        print(0)
        
if _month1 == 2:
    if _day1 == 28:
        print(1)
    else:
        print(0)

if _month1 == 3:
    if _day1 == 31:
        print(1)
    else:
        print(0)

if _month1 == 4:
    if _day1 == 30:
        print(1)
    else:
        print(0)
        
if _month1 == 5:
    if _day1 == 31:
        print(1)
    else:
        print(0)

if _month1 == 6:
    if _day1 == 30:
        print(1)
    else:
        print(0)

if _month1 == 7:
    if _day1 == 31:
        print(1)
    else:
        print(0)
        
if _month1 == 8:
    if _day1 == 31:
        print(1)
    else:
        print(0)

if _month1 == 9:
    if _day1 == 30:
        print(1)
    else:
        print(0)

if _month1 == 10:
    if _day1 == 31:
        print(1)
    else:
        print(0)
        
if _month1 == 11:
    if _day1 == 30:
        print(1)
    else:
        print(0)

if _month1 == 12:
    if _day1 == 31:
        print(1)
    else:
        print(0)

Submission status: Accepted

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

one = input().split()

two = input().split()

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

Submission status: Accepted

Solution code:
m,d= map(int,input().split())
x,y= map(int,input().split())
ans = 0
if m == x-1:
  ans = 1
elif m == 12 and d == 31:
  ans = 1
print(ans)

Submission status: Accepted

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

if e[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:
m1, d1 = map(int, input().split(' '))
m2, d2 = map(int, input().split(' '))

ans = 0
if d2 == 1:
  ans = 1

print(ans)

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

Submission status: Accepted

Solution code:
import sys


def main():
    # input = sys.stdin.readline
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = 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:
# ds = [31,28,31,30,31,30,31,31,30,31,30,31]
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,_ = map(int,input().split())
k,_ = map(int,input().split())
if m != k:
    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)
    exit(0)
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:
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,B=map(int, input().split())
C,D=map(int, input().split())
if D == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline--------------------------------------------        ]
    md = [list(map(int,input().split())) for i in range(2)]
    if md[0][0] == md[1][0]:
        print(0)
    else:
        print(1)

if __name__ == "__main__":
    main() #endline===============================================

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=2
x = [0] * N
y = [0] * N
for i in range(N):
  x[i], y[i] = map(int, input().split())
if(x[0]==x[1]):
  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:
def fetch_int_input():
    return [int(s) for s in input().strip().split()]

pre_input = fetch_int_input()
nxt_input = fetch_int_input()

echo_str = ""
if pre_input[0] != nxt_input[0]:
  echo_str = 1
 
else:
  echo_str = 0
 
print(echo_str)

Submission status: Accepted

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

    if D2 == 1 and M1 != M2:
        print(1)
    else:
        print(0)
    
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
R = lambda : map(int, input().split())

m1, d1 = R()
m2, d2 = R()
print(int(d2 == 1))

Submission status: Accepted

Solution code:
import numpy as np
s = input().split(" ")
s = [int(s[i]) for i in range(len(s))]
M1 = s[0]
D1 = s[1]

s = input().split(" ")
s = [int(s[i]) for i in range(len(s))]
M2 = s[0]
D2 = s[1]

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

Submission status: Accepted

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

x = 1 if d == 1 else 0

print(x)

Submission status: Accepted

Solution code:
import collections
import itertools as it
import math
import numpy as np

# A = input()
# A = int(input())
# A = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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

lastd = [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==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)
elif M1==12 and D1==31:
    print(1)
else:
    print(0)

Submission status: Accepted

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


def main():
    if m1 == 12:
        if m2 == 1 and d2 == 1:
            return True
        else:
            return False
    else:
        if (m1 + 1) == m2 and d2 == 1:
            return True
        else:
            return False


if __name__ == "__main__":
    if main():
        print('1')
    else:
        print('0')

Submission status: Accepted

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

M2, D2 = input().split(" ")
M2, D2 = int(M2), int(D2)

if M1 == M2 and D1+1 == D2:
	print("0")
elif M1 + 1 == M2 and D2 == 1:
	if 28 <= D1 <= 31:
		print("1")
	else:
		print("0")
else:
	print("0")

Submission status: Accepted

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

#2 4 6 9 11 
if d1 + 1 == d2:
    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:
import datetime
import calendar

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


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

Submission status: Accepted

Solution code:
day1 = int(input().split()[0])
day2 = int(input().split()[0])

if day1 == day2:
  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:
import datetime

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

M1 = int(M1)
M2 = int(M2)
D1 = int(D1)
D2 = int(D2)

date1 = datetime.datetime(2019, M1, D1)
date2 = datetime.datetime(2019, M2, D2)

if date1.month == date2.month - 1:
    print(1)
else:
    print(0)

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:
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 sys
import numpy as np
sys.setrecursionlimit(10 ** 9)

stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

M1, D1 = rl()
M2, D2 = rl()
print(1 if M1 != M2 else 0)

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
M1, D1 = map(int, input().split())
day = [31, 28, 31, 30, 31,30, 31, 31,30,31,30,31,]

if D == day[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(' '))
print(0 if m1 == m2 else 1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
Mone = int(str(input()).split()[0])
Mtwo = int(str(input()).split()[0])

if(Mone == Mtwo):
    print("0")
else:
    print("1")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())
    month =[2,4,6,9,11]

    if m1 in month:
        if m1 ==2:
            if d1 ==28:
                print(1)
            else:
                print(0)
        else:
            if d1 ==30:
                print(1)
            else:
                print(0)
    else:
        if d1 ==31:
            print(1)
        else:
            print(0)

Submission status: Accepted

Solution code:
#!/usr/bin/python

from pprint import pprint
import sys

def solve(m1, d1, m2, d2):
    if m1 != m2:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    m1, d1 = map(int, sys.stdin.readline().strip().split(" "))
    m2, d2 = map(int, sys.stdin.readline().strip().split(" "))
    solve(m1, d1, m2, d2)

Submission status: Accepted

Solution code:
M = [input().split()[0] for _ in range(2)]
if M[0] == M[1]:
    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 == 4 or M1 == 6 or M1 == 9 or M1 == 11:
    if D1 == 30:
        print(1)
    else:
        print(0)
elif M1 == 2:
    if D1 == 28:
        print(1)
    else:
        print(0)
else:
    if D1 == 31:
        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:
m, d = map(int, input().split())
M, D = map(int, input().split())
if M == m + 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 d1+1!=d2:
	print(1)
else:
	print(0)

Submission status: Accepted

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

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

if m2 == mlis[m1]:
    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 c-a == 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-1:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
from sys import stdin
a = [int(x) for x in stdin.readline().rstrip().split()]
s = [int(x) for x in stdin.readline().rstrip().split()]
if s[1] == 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())

ans = 0

if M1 != M2:
    ans = 1

print(ans)

Submission status: Accepted

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

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

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 = 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:
import sys

f = sys.stdin
m1, d1 = map(int, f.readline().split(' '))
m2, d2 = map(int, f.readline().split(' '))

result = 0

if m2 - m1 == 1:
    result = 1
if m1 == 12 and m2 == 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:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

if M1!=12:
    if M1<M2:
        print(str(1))
    else:
        print(str(0))
else:
    if M1>M2:
        print(str(1))
    else:
        print(str(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, b = map(int, input().split())
c, d = map(int, input().split())
if a==c: print(0)
else:print(1)

Submission status: Accepted

Solution code:
import numpy as np

s1=np.array(input().split(),dtype=np.int32)
s2=np.array(input().split(),dtype=np.int32)

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

m=s1[0]
idx=M.index(m)
if(s2[0]==M[(idx+1)%len(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("1")
else:
    print("0")

Submission status: Accepted

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

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

Submission status: Accepted

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

if m == 1 and int(d2) == 1:
    print(1)
else :
    print(0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意

#n = int(input())
#s = input()
#a = [int(i) for i in readline().split()]
#m = [[int(i) for i in readline().split()] for _ in range(n)]

m1,d1 = [int(i) for i in readline().split()]
m2,d2 = [int(i) for i in readline().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:
import sys
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

lis_31 = [1, 3, 5, 7, 8, 10, 12]
lis_30 = [4, 6, 9, 11]
lis_28 = 2

if M1 in lis_31 and D1 == 31:
    if M2 == M1 + 1 and D2 == 1:
        print(1)
        sys.exit()
if M1 in lis_30 and D1 == 30:
    if M2 == M1 + 1 and D2 == 1:
        print(1)
        sys.exit()
if M1 == 2 and D1 == 28:
    if M2 == M1 + 1 and D2 == 1:
        print(1)
        sys.exit()
print(0)

Submission status: Accepted

Solution code:
a = [31, 28, 31,30,31,30,31,31,30,31,30,31]
d = {a: 0 for a in xrange(1,13)}

for b in xrange(1,13):
    d[b] = a[b-1]

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

if d1 == d[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())

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

Submission status: Accepted

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

n = [-1,31,28,31,30,31,30,31,31,30,31,30,31]

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

Submission status: Accepted

Solution code:
input1 = input()
input2 = input()
inputbox1 = input1.split()
inputbox2 = input2.split()

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

Submission status: Accepted

Solution code:
#ossan
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("1")
else:
	print("0")

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 = 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(int(a != c))

Submission status: Accepted

Solution code:
#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(' '))

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

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

if m2 - m1 == 1:
    print(1)

if m2 - m1 == 0:
    print(0)

Submission status: Accepted

Solution code:
end = ['31', '28','31','30','31','30','31','31','30','31','30','31']
m1, d1, =input().split(' ')
m2, d2, =input().split(' ')

if end[int(m1) - 1] == d1:
    print('1')
else:
    print('0')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import calendar

D1, D2 = map(int, input().split())
_, lastday = calendar.monthrange(2019,D1)

if lastday == 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 M1<M2 else 0)

Submission status: Accepted

Solution code:
#!/usr/bin/env pytho3
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:
input()
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())
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 M2 - M1 == 0:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
s = input().split()
t = input().split()
if s[0] != t[0]:
  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 not m1==m2 else "0")

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(m1, d1, m2, d2):
    return 0 if m1 == m2 else 1


do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    m1 = int(parsed_lines[0][0])
    d1 = int(parsed_lines[0][1])
    m2 = int(parsed_lines[1][0])
    d2 = int(parsed_lines[1][1])
    #S = parsed_lines[1][0]
    return m1, d1, m2, d2


if not do_submit:
    m1, d1, m2, d2 = input_parse("""
    11 16
    11 17
    """)
    print(sol(m1, d1, m2, d2))

    m1, d1, m2, d2 = input_parse("""
    11 30
    12 1
    """)
    print(sol(m1, d1, m2, d2))

else:
    m1, d1 = list(map(int, input().split()))
    m2, d2 = list(map(int, input().split()))
    # S = input().split()
    # S = input()
    # T = input()
    print(sol(m1, d1, m2, d2))
    # S = input().strip()
    # print(sol(S))

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

if day2[1] == 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)