Problem:


Score: 100 points

Problem Statement

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

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

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

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

Constraints

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

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

Input

Input is given from Standard Input in the following format:

M_1 D_1
M_2 D_2

Output

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

Sample Input 1

11 16
11 17

Sample Output 1

0

November 16 is not the last day of a month.

Sample Input 2

11 30
12 1

Sample Output 2

1

November 30 is the last day of November.



Sample input:
11 16
11 17


Sample output:
0

Submission status: Accepted

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

Submission status: Accepted

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

print(1 if md1[0]!=md2[0] else 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,=map(int,input().split())
*m2,=map(int,input().split())
if m1[0]!=m2[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!=c:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print('1' if d2 == 1 else '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())
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<m2:
  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:
print(1 if input().split()[0]!=input().split()[0] else 0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


M_1, D_1 = zz()
M_2, D_2 = zz()
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())
print(1 if m1 != m2 else 0)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
m,d=MI()
M,D=MI()
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+1 == m2 else 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:
print(int(input().split()[0] != input().split()[0]))

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    M, D = i2(2)
    if M[0] != M[1]:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
d1 = input().split()[0]
d2 = input().split()[0]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力　２０２０－０７２７　21：50
import sys
#input = sys.stdin.readline  #文字列では使わない
M1,D1 = map(int, input().split())
M2,D2 = map(int, input().split())

import datetime
import calendar
def get_last_date(dt):
    return dt.replace(day=calendar.monthrange(dt.year, dt.month)[1])

dt = datetime.datetime(2019, M1, D1)

if dt ==get_last_date(dt):
    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:
    ans = 1
else:
    ans = 0
print(ans)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.readline
import time
import math
import itertools as it
def inp():
    return int(input())
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

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

# -----------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)

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,_ = input().split()
m2,_ = input().split()
ans = 0

if m1 != m2:
    ans = 1

print(ans)

Submission status: Accepted

Solution code:
print(+(' 1\n'in[*open(0)][1]))

Submission status: Accepted

Solution code:
print(1//int([*open(0)][1][2:]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    m1, d1 = map(int, readline().rstrip().split())
    m2, d2 = map(int, readline().rstrip().split())
    print(1 if d2 == 1 else 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 in [1,3,5,7,8,10,12] and d1==31:
  print(1)
elif m1 in [4,6,9,11] and d1==30:
  print(1)
elif m1==2 and d1 in [28,29]:
  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 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:
#!/usr/bin/env python3
あ, い, う, え = map(int, open(0).read().split())
if あ - う == 0:
    print(0)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m, d = map(int,input().split())
n, e = map(int,input().split())
print(int(n >= 2 and e == 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 = input().split()
m2, d2 = input().split()
print('1' if m1 != m2 else '0')

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

M1, D1 = MAP()
M2, D2 = MAP()

print(0 if M1==M2 else 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n=int(input())
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
#hl=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

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,m2,d2=map(int,open(0).read().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 + 1 == m2 and d2 == 1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
# coding: utf-8
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:
x,_=map(int, input().split())
y,_=map(int, input().split())
print(1) if (x != y) 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 - November 30
m,_ = map(int,input().split())
n,_ = map(int,input().split())
print(int(m!=n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())
print(m2 - m1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
# n = int(input())
# li = list(map(int, input().split()))
# n = int(input())
a, b = map(int, input().split())
c, d = map(int, input().split())
# d = defaultdict(lambda: 0)

# s = input()
print("1" if c == a+1 else "0")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 d2==1:
    print(1)

else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
print(0 if input()[:2] == input()[:2] else 1)

Submission status: Accepted

Solution code:
pm,pd = map(int,input().split())
nm,nd = map(int,input().split())
print(0 if pm == nm else 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:
print(1-(input()[:2]in input()))

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 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
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)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
a,b = IL()
c,d = IL()
print(int(a!=c))

Submission status: Accepted

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

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

end = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

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

if __name__ == '__main__':
    main()

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:
x,y = map(int,input().split())
a,b = map(int,input().split())

if y+1 == b:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

_, D1 = MAP()
_, D2 = MAP()

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

Submission status: Accepted

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

#入力
# s = input()[0:-1]
# n = int(input())
m1,d1 = map(int, input().split())
m2,d2 = map(int, input().split())
# a = list(map(int,input().split()))
# a = [int(input()) for i in range()]


# ab=[]
# for i in range():
#     a,b = map(int, input().split())
#     ab.append([a,b])


     
def main():
    if m1 ==12:
        if m2 == 1 and d2 ==1 :
            print(1)
        else:
            print(0)
    else:
        if m2 ==m1+1 and d2 ==1:
            print(1)
        else:
            print(0)
        
    
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
m1,d1 = readInts()
m2,d2 = readInts()
print('1' if m1 != m2 else '0')

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
M,D=map(int, input().split())
MM,DD=map(int, input().split())

if MM-1==M or (MM-1==0 and M==12):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import datetime

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
'''
before = datetime.date(2019, m1, d1)
check = before + datetime.timedelta(day=1)

after = datetime.date(2019, m2, d2)
'''
if (m2 - m1 == 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('1')
else:
    print('0')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = [list(input().split()) for _ in range(2)]
print(0 if li[0][0] == li[1][0] else 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


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

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

Submission status: Accepted

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

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:
a = input().split()
b = input().split()
if int(a[0])<int(b[0]):
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if D1 != 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:
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())

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

Submission status: Accepted

Solution code:
md = list(map(int,input().split()))
mmd = list(map(int,input().split()))
if md[0] != mmd[0]:
    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())

    if M1 == M2:
        ans = 0
    else:
        ans = 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

if m2 == m1 + 1 and d2 != d1 + 1:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
s1 = input().split()
s2 = input().split()
if s1[0] == s2[0]:
    print("0")
if s1[0] != s2[0] and int(s2[1])== 1:
    print("1")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(1 if m1 != m2 else 0)

Submission status: Accepted

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

if M1 == 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,D=map(int,input().split())
MM,DD=map(int,input().split())
if D>DD:
    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:
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 = map(int,input().split())
M2 , D2 = map(int,input().split())
if M1 < M2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
l1 = list(map(int,input().split()))
l2 = list(map(int,input().split()))

if l2[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:
month1, day1 = map(int, input().rstrip().split(' '))
month2, day2 = map(int, input().rstrip().split(' '))

if day1 > day2:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
X1, Y1 = map(int, input().split())
if Y1 == 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:
import numpy as np
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
x = [30] * 13
x[1] = x[3] = x[5] = x[7] = x[8] = x[10] = x[12] = 31
x[2] = 28
x[0] = 0
print('1' if x[m1] == d1 else '0')