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:
from sys import stdin


def main():
    M_1, D_1 = [int(x) for x in stdin.readline().rstrip().split()]
    M_2, D_2 = [int(x) for x in stdin.readline().rstrip().split()]

    if not M_1 == M_2:
        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 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:
# coding: utf-8

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a = inpl()
b = inpl()
if a[0] == b[0]:
    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:
# -*- coding: utf-8 -*-
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:
import sys
M1,D1 = map(int, input().split())
M2,D2 = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

[M1, D1] = [int(i) for i in input().split()]
[M2, D2] = [int(i) for i in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def solve():
  m1,d1 = (int(i) for i in input().split())
  m2,d2 = (int(i) for i in input().split())
  if m1 != m2:
    print(1)
  else:
    print(0)
solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=[]
for i in range(2):
	n.append([int(x) for x in input().split()])
print(1 if n[0][0]!=n[1][0] else 0)

Submission status: Accepted

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

if 28 <= d1 <= 31:
    if m1 != m2 and d2 < d1:
        print(1)
    else:
        print(0)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys

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:
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:
class Diff_m:
  def __init__(self):
    m1 = list(map(int,(input().split(' '))))
    m2 = list(map(int,(input().split(' '))))
    self.m1, self.m2 = m1[0], m2[0]
  
  def diff_m(self):
    if self.m2 == self.m1 + 1 or self.m1 - self.m2 == 11:
      print(1)
    else:
      print(0)
      
solve = Diff_m()
solve.diff_m()

Submission status: Accepted

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

Submission status: Accepted

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

next_month = M1+1
if M1+1 > 12:
  next_month = (M1+1)%12


if next_month == M2 and D2 == 1:
  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:
a,b=open(0);print(+(a[:2]!=b[:2]))

Submission status: Accepted

Solution code:
print(int((input().split())[0] != (input().split())[0]))

Submission status: Accepted

Solution code:
input()
_, D2 = input().strip().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:
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())
if m1!=m2 and d1>20:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
md1 = [int(i) for i in input().split()]
md2 = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


M1, _ = read_ints()
M2, _ = read_ints()
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(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 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 m1 in (1, 3, 5, 7, 8, 10, 12) and d1 == 31:
    print('1')
elif m1 == 2 and d1 == 28:
    print('1')
elif m1 in (4,6,9,11) and d1 == 30:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
a,b=list(map(int, input().split()))
i,j=list(map(int, input().split()))
if a+1==i or (i==1 and a==12):
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
usrInput1 = input()
usrInput2 = input()

date1List = usrInput1.split( )
date2List = usrInput2.split( )

if int(date1List[0]) < int(date2List[0]):
    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 else 1
print(ans)

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

if not D2 == 1:
  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 or M1 == 3 or M1 == 5 or M1 == 7 or M1 == 8 or M1 == 10 or M1 == 12:
  print(1) if D1 == 31 else print(0)
elif M1 == 4 or M1 == 6 or M1 == 9 or M1 == 11:
  print(1) if D1 == 30 else print(0)
elif M1 == 2:
  print(1) if D1 == 28 else print(0)

Submission status: Accepted

Solution code:
s1 = input().split(' ')[0].strip()
s2 = input().split(' ')[0].strip()

if s1 != s2:
  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: return '1'
    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(M1, D1, M2, D2)
if D2 == 1:
  print(1)
else:
  print(0)

Submission status: Accepted

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

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

else:
    print("1")

Submission status: Accepted

Solution code:
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if 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()]

ans = 0 if M_1 == M_2 else 1

print(ans)

Submission status: Accepted

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()
sys.setrecursionlimit(10**5)
input=lambda: sys.stdin.readline().rstrip()
 
show_flg=False
show_flg=True



m,d=LI()
M,D=LI()

ans=1-(m==M)*1
print(ans)

Submission status: Accepted

Solution code:
_=input()
print(int(input().split()[1] == "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:
import sys
input = sys.stdin.readline
def print_ans(M1, M2):
    """Test Case
    >>> print_ans(11, 11)
    0
    >>> print_ans(11, 12)
    1
    """
    if M1 == M2:
        print("0")
    else:
        print("1")

if __name__ == '__main__':
    M1, D1 = map(int, input().rstrip().split())
    M2, D2 = map(int, input().rstrip().split())
    print_ans(M1, M2)

Submission status: Accepted

Solution code:
import datetime

def last_day_of_month(any_day):
    next_month = any_day.replace(day=28) + datetime.timedelta(days=4)  # this will never fail
    return next_month - datetime.timedelta(days=next_month.day)

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

date1 = datetime.date(2019, m1, d1)
date2 = datetime.date(2019, m2, d2)

if (date2>date1):
  print('1') if(last_day_of_month(datetime.date(2019, m1, d1) ) == datetime.date(2019, m1, d1)) else print('0')

Submission status: Accepted

Solution code:
import datetime

if __name__ == "__main__":
    MD1 = input().split()
    MD2 = input().split()

    # hoge = datetime.date(2019, MD1[0], MD1[1])

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

Submission status: Accepted

Solution code:
from __future__ import print_function
# import numpy as np
# import numpypy as np
import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd

def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p//common , q//common )
# from itertools import accumulate
# from collections import deque

import random


def main():
    m1,d1 = map(int, input().strip().split())
    # m2,d2 = map(int, input().strip().split())
    smksmri=[4,6,9,11]
    soreigai=[1,3,5,7,8,10,12]
    if d1==28:
        if m1==2:
            print(1)
            return
        elif m1!=2:
            print(0)
            return
        else:
            try:
                raise Exception
            except:
                traceback.print_exc("error0!")
    if d1==30:
        if (m1 in smksmri):
            print(1)
            return
        elif (not (m1 in smksmri)):
            print(0)
            return 
        else:
            try:
                raise Exception
            except:
                traceback.print_exc("error1!")
    elif d1==31:
        if (m1 in soreigai):
            print(1)
            return
        elif (not (m1 in soreigai)):
            print(0)
            return 
        else:
            try:
                raise Exception
            except:
                traceback.print_exc("error2!")
    elif d1!=28 and d1!=30 and d1!=31:
        print(0)
        return 
    else:
        print(0)
        return
        try:
            raise Exception
        except:
            traceback.print_exc("error3!")


    return

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if (a,b,c,d) == (1,31,2,1) or (a,b,c,d) ==(2,28,3,1) or (a,b,c,d) ==(3,31,4,1) or (a,b,c,d) ==(4,30,5,1) or (a,b,c,d) == (5,31,6,1) or (a,b,c,d) ==(6,30,7,1) or (a,b,c,d) ==(7,31,8,1) or (a,b,c,d) ==(8,31,9,1) or (a,b,c,d) ==(9,30,10,1) or (a,b,c,d) ==(10,31,11,1) or (a,b,c,d) ==(11,30,12,1):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
def main():
    M_1,D_1 = map(int,input().split())
    M_2,D_2 = map(int,input().split())
    if D_1 == 31:
        print(1)
        return
    
    if D_1 == 30:
        if M_1==4 or M_1==6 or M_1==9 or M_1==11:
            print(1)
            return
        
    if M_1==2 and D_1==28:
        print(1)
        return
    print(0)
    return



if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(1 if int(input().split()[0])-int(input().split()[0]) else 0)

Submission status: Accepted

Solution code:
m,d =  (int(i) for i in input().split())
M,D =  (int(i) for i in input().split())

if m!=M :
  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:
s = list(map(int,input().split()))
t =list(map(int,input().split()))
if s[0] == t[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:
    ans = 1
else:
    ans = 0

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)

#print(M1)
#print(D1)
#print(M2)
#print(D2)

Submission status: Accepted

Solution code:
m1,d = list(map(int, input().split()))
m2,d = 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('0')
    exit()
print('1')

Submission status: Accepted

Solution code:
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
lastday = [31,28,31,30,31,30,31,31,30,31,30,31]
if D2 == 1 and M2-M1 == 1 and D1 == lastday[M1-1]:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
n = []
for i in range(2):
    n.append(list(map(int, input().split())))
    
if n[1][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("1")
else:
  print("0")

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

else:
    print(0)

Submission status: Accepted

Solution code:
import sys

#+++++
		
def main():
	m1,d1 = map(int, input().split())
	m2,d2 = map(int, input().split())
	ret = 1 if m1!=m2 else 0
	print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

Solution code:
A=list(map(int,input().split()))
B=list(map(int,input().split()))

if A[1]<B[1] :
    print(0)

elif A[1]>B[1]:
    print(1)

Submission status: Accepted

Solution code:
input()
m,d = map(int,input().split())
print(1) if d == 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('{}'.format(1))
else:
    print('{}'.format(0))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l=[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 l[m1-1]==d1:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
if b[0]>a[0]:
    if a[1]==31 or a[1]==30 or a[1]==29 or a[1]==28:
        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())
print(1 if d2 == 1 else 0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def isLast(m1, d1, m2, d2):
  return m2 > m1
 
if __name__ == "__main__":
  import sys
  in_str = ''
  for line in sys.stdin:
    in_str += line
  m1, d1, m2, d2 = [int(_) for _ in in_str.split()]
  print(int(isLast(m1, d1, m2, d2)))

Submission status: Accepted

Solution code:
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

#a = list(map(int, input().split()))

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 = (int(i) for i in input().split())
c, d = (int(i) for i in input().split())

if d == 1 and c == a+1:
  if a == 4 or 6 or 9 or 11 and b == 30:
    print ('1')
  elif a == 1 or 3 or 5 or 7 or 8 or 10 or 12 and b ==31:
    print ('1')
  elif a == 2 and b == 28:
    print ('1')
  else:
    print('0')
else:
  print('0')

Submission status: Accepted

Solution code:
from math import floor

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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(M: "List[int]", D: "List[int]"):
    print(0 if M[0]==M[1] else 1)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    M = [int()] * (2)  # type: "List[int]"
    D = [int()] * (2)  # type: "List[int]"
    for i in range(2):
        M[i] = int(next(tokens))
        D[i] = int(next(tokens))
    solve(M, D)

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

Submission status: Accepted

Solution code:
from datetime import date

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

dt1 = date(2019,M1,D1)
dt2 = date(2019,M2,D2)

d = dt2 - dt1
d = d.days

if d != 1:
    print(0)
else:
    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:
import sys
import string
input = sys.stdin.readline

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)
        exit()
if  M1 == 4 or M1 == 6 or M1 == 9 or M1 == 11:
    if D1 == 30:
        print(1)
        exit()
if M1 == 2:
    if D1 == 28:
        if D2 == 1:
            print(1)
            exit()
    if D1 == 29:
        if D2 == 1:
            print(1)
            exit()
print(0)

Submission status: Accepted

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

if m in (1,3,5,7,8,10,12) and d == 31:
  print(1)
elif m in (4,6,9,11) and d == 30:
  print(1)
elif m == 2 and d == 28:
  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())
print(1 if d == 1 else 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:
m, d = map(int, raw_input().split())
raw_input()
if m in (1,3,5,7,8,10,12) and d == 31:
  print(1)
elif m in (4,6,9,11) and d == 30:
  print(1)
elif m == 2 and d == 28:
  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 and b==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:
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 = (int(_) for _ in input().split())
M2, D2 = (int(_) for _ in 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 d1+1 != d2:
  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:
Mone, Done = map(int, input().split())
Mtwo, Dtwo = map(int, input().split())

if Mtwo == Mone+1 and Dtwo == 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())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import datetime

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

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

Submission status: Accepted

Solution code:
try:

  D1=[int(i) for i in input().split(" ")]

  D2=[int(i) for i in input().split(" ")]

  dts={

    "28":[2],

    "30":[4,6,9,11],

    "31":[1,3,5,7,8,10,12]

  }

  print(int(D1[0] in dts.get(str(D1[1]),[])))

except:

  print(0)

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

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

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

Submission status: Accepted

Solution code:
# -*- Coding: utf-8 -*-
#from dateutil.relativedelta import relativedelta
#import datetime
#import itertools#これは色々使える組み込み関数みたいなやつ
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#print(0)
N =2
month, date = [0]*N, [0]*N#N個の空のリストを作成
#l = list(range(N))#範囲がNのリストを作成する


for i in range(N):
  month[i], date[i] = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input().split(' ') 
m = input().split(' ') 
x = int(m[1])
if x == 1:
    print(1)
else:
    print(0)