Problem:


Score: 100 points

Problem Statement

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

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

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

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

Constraints

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

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

Input

Input is given from Standard Input in the following format:

M_1 D_1
M_2 D_2

Output

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

Sample Input 1

11 16
11 17

Sample Output 1

0

November 16 is not the last day of a month.

Sample Input 2

11 30
12 1

Sample Output 2

1

November 30 is the last day of November.



Sample input:
11 16
11 17


Sample output:
0

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
m, d = input().split(' ')
M, D = 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 D2 == 1:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
a = input().split()
m1 = int(a[0])
b = input().split()
m2 = int(b[0])

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

Submission status: Accepted

Solution code:
dates = [list(map(int, input().split())) for _ in range(2)]
print("{}".format("1" if dates[0][0] < dates[1][0] or (dates[0][0] == 12 and dates[0][1] == 1) else "0"))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
s,t=map(int,input().split())
if t==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 D2 == 1 else 0)

Submission status: Accepted

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


def main():
    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:
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:
lst = list(map(int,input().split()))
lst2 = list(map(int,input().split()))
if lst2[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()))

ans = 1 if M1 + 1 == M2 else 0
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

import datetime
import calendar

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

day1 = datetime.date(2019, m1, d1)
day2 = datetime.date(2019, m1, calendar.monthrange(2019, m1)[1])

if day1 == day2:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
m0, d0 = map(int, input().split())
m1, d1 = map(int, input().split())
print('0') if m0 == m1 else print('1')

Submission status: Accepted

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

b=int(b)
d=int(d)

if d-b==1:
    print("0")
else:
    print("1")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
md1=input()
md2=input()

m1st,d1st=md1.split()
m2st,d2st=md2.split()


m1=int(m1st)
d1=int(d1st)

m2=int(m2st)
d2=int(d2st)



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

Submission status: Accepted

Solution code:
li = []
for i in range(2):
  a,b = map(int, input().split())
  li.append(a)
  
if li[1] == li[0]+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())
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())

# print(m1)
# print(m2)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
from collections import deque
import re
import math
import functools

def sRaw():
    return input().rstrip("\r")

def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


def gcd(a, b):
    if(b == 0):
        return a
    return gcd(b, a % b)


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    
def ZAlgo(s):
    l = len(s)
    A = [0]*l
    i =1
    j =0
    A[0]=l
    while i<l:
        while i+j<l and s[j] == s[i+j]:
            j+=1
        if j==0:
            i+=1
            continue
        A[i]=j
        k=1
        while (i+k<l) and (k+A[k]<j):
            A[i+k] =A[k]
            k+=1
        i+=k
        j-=k
    return A


DIV = 998244353

def main():
    MD = isRaw()
    MD2 =isRaw()
    return 0 if MD[0] == MD2[0] else 1

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

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

print(0 if m1==m2 else 1)

Submission status: Accepted

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

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())
mm,dd=map(int,input().split())
if m!=mm:
    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:
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==1 and m2==m1+1:
  print(1)
else:
  print(0)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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:
x = input()
y = input()
l = x.split()
l2 = y.split()
if l[0] != l2[0]:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
D1 = list(int(i) for i in input().split())
D2 = list(int(i) for i in input().split())

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

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:
m1, _ = list(map(int, input().split()))
m2, _ = list(map(int, input().split()))

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

Submission status: Accepted

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

if m-M == 1 or m-M == -11:
  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 = [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 d2 == 1:
	print('1')
else:
	print('0')

Submission status: Accepted

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

if m1 != m2:
  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:
#!/usr/bin/env python3
#三井住友信託銀行プログラミングコンテスト2019 A

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

m1,d1 = LI()
m2,d2 = LI()
if m1 == m2:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

M1 , _ = list(map(int, sys.stdin.buffer.readline().split()))
M2 , _ = list(map(int, sys.stdin.buffer.readline().split()))
print((M2 - M1) % 12)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m1,d1 = map(int, input().strip().split(' '))
m2,d2 = map(int, input().strip().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 and d2 == 1:
    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 D1>D2 and M2>M1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
m=input().split()
M=input().split()
 
if int(M[0]) - int(m[0]) == 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 d2 == 1:
  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:
m,d = map(int,input().split())
mm,dd = map(int,input().split())
if dd == 1:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
def solve(m1, d1, m2, d2):
    return int(m1 != m2)

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

Submission status: Accepted

Solution code:
targetDay = input().split()
nextDay	  = input().split()

if targetDay[0] != nextDay[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("0")
else:
  	print("1")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#22:04
a,b = map(int,input().split())
c,d = map(int,input().split())
print(int(a!=c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    today = input().split()
    tomo = input().split()
    if today[0] == tomo[0]:
        print(0)
    else:
        print(1)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

if x[0] != y[0]:
    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:
_, D1 = map(int, input().split())
_, D2 = map(int, input().split())

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

Submission status: Accepted

Solution code:
m1, d1 = map(int, raw_input().strip().split())
m2, d2 = map(int, raw_input().strip().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 d==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, b = map(int,input().split())
c, d = map(int,input().split())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

m1, d1 = [int(item) for item in input().split()]
m2, d2 = [int(item) for item in 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:
m,d=map(int,input().split())
n,e=map(int,input().split())
print(1 if m!=n else 0)

Submission status: Accepted

Solution code:
A,B,C,D = map(int, open(0).read().split())
print(int(A != C))

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:
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().split())
month2,day2,=map(int,input().split())
if month1==month2:
  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, 12]:
	if D1 == 31:
		print("1")
	else:
		print("0")
elif M1 == 2:
	if D1 == 28:
		print("1")
	else:
		print("0")
else:
	if D1 == 30:
		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:
m, d = map(int, input().split())
print(1 if int(input().split()[1])-d!=1 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:
a, b = map(int, input().split())
c, d = map(int, input().split())
if(a != c):
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

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

print(0 if M1 == M2 else 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(M_1: int, D_1: int, M_2: int, D_2: int):
    print(M_2 - M_1)


if __name__ == "__main__":
    M_1, D_1 = map(int, input().split())
    M_2, D_2 = map(int, input().split())

    main(M_1, D_1, M_2, D_2)

Submission status: Accepted

Solution code:
import datetime

M,D = map(int,raw_input().split())
ans = format((datetime.date(2019, M, D) + datetime.timedelta(days = 1)).day)

if int(ans) == 1:
  print "1"
else:
  print "0"

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read

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

Submission status: Accepted

Solution code:
def main(lst):
    m_1, d_1, m_2, d_2 = lst[0], lst[1], lst[2], lst[3]

    before = False
    after = None

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

    if m_1 in lst_1:
        if d_1 == 31:
            before = True
            if m_2 == m_1 + 1 or m_2 == 1:
                if d_2 == 1:
                    after = True
        else:
            before = False
    elif m_1 in lst_2:
        if d_1 == 28:
            before = True
            if m_2 == 3:
                if d_2 == 1:
                    after = True
        else:
            before = False
    if m_1 in lst_3:
        if d_1 == 30:
            before = True
            if m_2 == m_1 + 1:
                if d_2 == 1:
                    after = True
        else:
            before = False

    if before == True and after == True:
        return 1
    else:
        return 0


if __name__ == '__main__':
    before = list(map(int, input().rstrip().split()))
    after = list(map(int, input().rstrip().split()))

    print(main(before + after))

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

Submission status: Accepted

Solution code:

date1 = input().split(" ")
date2 = input().split(" ")

if date1[0] != date2[0]:
  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:
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:
# atcoder : python3 (3.4.3)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
mod = 10**9+7

# main
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())
print(int(M1!=M2))

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 ==2 and d==28:
  print(1)
elif m in [4,6,9,11] and d==30:
  print(1)
else:
  print(0)

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

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

if 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:
def solve():
	m1, d1, m2, d2 = map(int, open(0).read().split())
	if m1 != m2:
		print('1')
	else:
		print('0')
solve()

Submission status: Accepted

Solution code:
print(+(input()[:2]!=input()[:2]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(int(input()[:2] != input()[:2]))

Submission status: Accepted

Solution code:
from sys import stdin
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
#n = int(stdin.readline().rstrip())
#l = list(map(int, stdin.readline().rstrip().split()))
M1, D1 = map(int, stdin.readline().rstrip().split())
M2, D2 = map(int, stdin.readline().rstrip().split())
#S = [list(stdin.buffer.readline().decode().rstrip()) for _ in range(h)]

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

Submission status: Accepted

Solution code:
str1 = input().split()
str2 = input().split()

m1 = str1[0]
d1 = str1[1]
m2 = str2[0]
d2 = str2[1]

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

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:
print '1' if int(raw_input().split(' ')[1]) > int(raw_input().split(' ')[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:
import sys

def main():
    m1, d1, m2, d2 = map(int, sys.stdin.read().split())
    if m1 == m2:
        ans = 0
    else:
        ans = 1
    print(ans)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
M1,D1=[int(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:
a, b = map(int, input().split())
c, d = map(int, input().split())

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/sumitrust2019/tasks/sumitb2019_a
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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

    print(1 if d2 == 1 else 0)

if __name__ == '__main__':
    main()

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)