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: Wrong Answer

Solution code:
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 == M2:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

if (d1 == 30 and d2 == 1) or (d1 == 31 and d2 == 1):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x=input().split()
y=input().split()
if(x[0]!=y[0]):
    print("0")
else:
    print("1")

Submission status: Wrong Answer

Solution code:
x=input().split()
print(x)

Submission status: Wrong Answer

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

if d2 == 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if m1<m2 and d1<d2:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
_,s=open(0)
c=0
for i in range(1000):
 p=0;F=1
 for j in str(i).zfill(3):
  q=s[p:].find(j)
  if q<0:F=0;break
  p+=q+1
 c+=F
print(c)

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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
x = np.add.accumulate(x)
print('1' if x[m1 - 1] + d1 + 1 == x[m2 - 1] + d2 else '0')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
xy = [map(int,input().split()) for i in range(2)]
x,y = [list(j) for j in zip(*xy)]
if (x[1] + 1) == y[1] :
    ans = 0
else:
    ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
# Author: cr4zjh0bp
# Created: Sat Mar 28 15:38:17 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

m, d = na()
m2, d2 = na()

if d + 1 != d2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
print(1+input().find(input()[:2]))

Submission status: Wrong Answer

Solution code:
print(input().count(input()[:2]))

Submission status: Wrong Answer

Solution code:
input()
print(input().count(' 1'))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
M_1, D_1 = map(int, input().split())
M_2, D_2 = map(int, input().split())

if M_1 != M_2:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M_1, D_1 = map(int, input().split(" "))
M_2, D_2 = map(int, input().split(" "))

print(0 if M_1 == M_2 else 0)

Submission status: Wrong Answer

Solution code:
# A - November 30
def main():
    M1, _, M2, _ = map(int, open(0).read().split())
    print(M1 != M2)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b == 30 or b==31:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a == c and d == 1:
    print("1")
else:
    print("2")

Submission status: Wrong Answer

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

if M1 == 12:
    if M2 == 1:
        print(1)
elif M1 + 1 == M2:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
a = input()
b = input()
month_a = int(a.split(" ")[0])
day_a = int(a.split(" ")[1])
month_b = int(b.split(" ")[0])
day_b = int(b.split(" ")[1])
last_day = [31,28,31,30,31,30,31,31,30,31,30,31]
if month_a - month_b == 0 and day_b - day_a == 1:
	val = 1
elif month_b-month_a == 1 and day_a == last_day[month_a-1] and day_b == 1:
	val = 1
else:
	val = 0
print(val)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a == 2 or a == 4 or a == 6 or a == 9 or a == 11:
  if b == 31:
    print("1")
  else:
    print("0")

elif a == 1 or a == 3 or a == 5 or a == 7 or a == 8 or a == 10 or a == 12:
  if b ==30:
    print("1")
  else:
    print("0")
else:
  print("0")

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
b_day = input()
d_day = input()
print('0') if d_day.split(" ")[1] == 1 else print('1')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
M_1, D_1 = map(int, input().split())
M_2, D_2 = map(int, input().split())
if D_2 == 0:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
M_1, D_1 = map(int, input().split())
M_2, D_2 = map(int, input().split())
if D_2 == 0:
  print('1')
else:
  print('0')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import datetime

m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())

months_31 = [1,3,5,7,8,10,12]

if m_1 in months_31:
  if d_1 == 31:
    print(1)
else:
  if d_1 == 30:
    print(1)
  else:
    if m_1 == 2 and d_1 == 28:
      print(1)
    else:
      print(0)

Submission status: Wrong Answer

Solution code:
import datetime

m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())

months_31 = [1,3,5,7,8,10,12]

if m_1 in months_31:
  if d_1 == 31:
    print(1)
else:
  if m_1 == 2 and d_1 == 28:
    print(1)
    exit()
  
  if d_1 == 30:
    print(1)
  else:
    print(0)

Submission status: Wrong Answer

Solution code:
import datetime

m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())

months_31 = [1,3,5,7,8,10,12]

if m_1 in months_31:
  if d_1 == 31:
    print(1)
else:
  if m_1 == 2:
    if d_1 == 28:
      print(1)
      exit()
  
  if d_1 == 30:
    print(1)
  else:
    print(0)

Submission status: Wrong Answer

Solution code:
import datetime

m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())

months_31 = [1,3,5,7,8,10,12]

if m_1 in months_31:
  if d_1 == 31:
    print(1)
  else:
    print(0)
else:
  if d_1 == 30:
    print(1)
  else:
    print(0)

Submission status: Wrong Answer

Solution code:
import datetime

m_1, d_1 = map(int, input().split())
m_2, d_2 = map(int, input().split())

months_31 = [1,3,5,7,8,10,12]

if m_1 in months_31:
  if d_1 == 31:
    print(1)
else:
  if d_1 == 30:
    print(1)
  else:
    print(0)

Submission status: Wrong Answer

Solution code:
import itertools

N = input()
S = input()
l = []
l = [i for i in S]

answer = []

answer = [i for i in itertools.combinations(l,3)]

answer = set(answer)
print(len(answer))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
Month31=[1,3,5,7,8,10,12]
Month30=[2,4,6,9,11]
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if M1 in Month31 and D1 == 31:
    print(1)

elif M1 in Month30 and D1==30:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if next_month == M2 and D2 == 1:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

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

if int(date1List[0]) < int(date2List[0]) and int(date1List[1]) > int(date2List[1]):
    print("1")
else:
    print("0")

Submission status: Wrong Answer

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

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

if int(date1List[0]) < int(date2List[0]):
    print("1")
else:
    print("0")

Submission status: Wrong Answer

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

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

if int(date1List[0]) - 1 == int(date2List[0]):
    print("1")
elif date2List[0] == "1" and date2List[1] == "1":
    print("1")
else:
    print("0")

Submission status: Wrong Answer

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

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

if int(date1List[0]) - 1 == int(date2List[0]):
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
m1,d1 = input().split()
m2,d2 = input().split()
t=1 
f=0
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(t)
    else: 
        print(f)
elif m1==4 or m1==6 or m1==9 or m1==11:
    if d1 == 30:
        print(t)
    else: 
        print(f)
elif m1==2: 
    if d1==28:
        print(t)
    else: print(f)

Submission status: Wrong Answer

Solution code:
print(0)

Submission status: Wrong Answer

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)
        else:
            print(0)
    if d1==30:
        if (m1 in smksmri):
            print(1)
        else:
            print(0)
    elif d1==31:
        if (m1 in soreigai):
            print(1)
        else:
            print(0)
    else:
        print(0)
        # try:
        #     raise Exception
        # except:
        #     traceback.print_exc("error!")


    return

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
flag = 0
if (a == 1 or 3 or 5 or 7 or 8 or 10 or 12):
    if b == 31:
        flag = 1
    else:
        flag = 0
elif a == 2:
    if b == 28:
        flag = 1
    else:
        flag = 0

else:
    if b == 30:
        flag = 1
    else:
        flag = 0

print(flag)

Submission status: Wrong Answer

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==28:
            print(1)
        else:
            print(0)
    if d1==30:
        if (m1 in smksmri):
            print(1)
        else:
            print(0)
    elif d1==31:
        if (m1 in soreigai):
            print(1)
        else:
            print(0)
    else:
        print(0)
        # try:
        #     raise Exception
        # except:
        #     traceback.print_exc("error!")


    return

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
flag = 0
if (a == 1 or 3 or 5 or 7 or 8 or 10 or 12):
    if b == 31:
        flag = 1
    else:
        flag = 0
elif a == 2:
    if b == 28:
        flag = 1
    else:
        flag = 0

elif (a == 4 or 6 or 9 or 11):
    if b == 30:
        flag = 1
    else:
        flag = 0

print(flag)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
flag = 0
if (a == 1 or 3 or 5 or 7 or 8 or 10 or 12):
    if b == 31:
        flag = 1
if a == 2:
    if b == 28:
        flag = 1

if (a == 4 or 6 or 9 or 11):
    if b == 30:
        flag = 1

print(flag)

Submission status: Wrong Answer

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]
    if d1==28:
        if m1==28:
            print(1)
    if d1==30:
        if (m1 in smksmri):
            print(1)
        else:
            print(0)
    elif d1==31:
        if (not (m1 in smksmri)):
            print(1)
        else:
            print(0)
    else:
        print(0)
        # try:
        #     raise Exception
        # except:
        #     traceback.print_exc("error!")


    return

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

else:
    print('0')

Submission status: Wrong Answer

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

elif b[0]==1:
    if a[1]==31 or a[1]==30:
        print('1')
    else:
        print('0')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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==29:
        print(1)
        return
    print(0)
    return



if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

if m1 == 2:
  if d1 == 28:
    print("1")
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: Wrong Answer

Solution code:
m1, d1 = input().strip().split(' ')
m2, d2 = 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: Wrong Answer

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

if m1 == 2:
  if d1 >= 28:
    print("1")
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: Wrong Answer

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

if m1 in (1, 3, 5, 7, 8, 10, 12) and d1 == 31:
    print('1')
elif m2 == 2 and d1 == 28:
    print('1')
elif m1 in (4,6,9,11) and d1 == 30:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
flag = 0
if a == 1 or 3 or 5 or 7 or 8 or 10 or 12:
    if b == 31:
        flag = 1
if a == 2:
    if b == 28:
        flag = 1

if a == 4 or 6 or 9 or 11:
    if b == 30:
        flag = 1

print(flag)

Submission status: Wrong Answer

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

if m1 == 2:
  if d1 >= 28:
    print("1")
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")
elif m1 == 4 or m1 == 6 or m1 == 9 or m1 == 11:
  if d1 == 30:
    print("1")
else:
  print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if m1 == 2:
  if d1 >= 28:
    print("1")
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")
elif m1 == 4 and m1 == 6 and m1 == 9 and m1 == 11:
  if d1 == 30:
    print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
import sys

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

    if(M1==2 and D1!=28):
        print('0')
        sys.exit()

    if(M1==4 or M1==6 or M1==9 or M1==11 and D1==30):
        print('0')
        sys.exit()

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

    print('1')

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
  M = []
  D = []
  for i in range(2):
    m, d = [int(i) for i in input().split()]
    M.append(m)
    D.append(d)

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

if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
flag = 0
if a == 1 or 3 or 5 or 6 or 7 or 8 or 10 or 12:
    if b == 31:
        flag = 1
if a == 2:
    if b == 28:
        flag = 1

if a == 4 or 6 or 9 or 11:
    if b == 30:
        flag = 1

print(flag)

Submission status: Wrong Answer

Solution code:
from datetime import date

M1=11
M2=12
D1=30
D2=1

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: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M1, D1 = (int(i) for i in input().split()) 
M2, D2 = (int(i) for i in input().split())
 
result = 0
 
if M2 == ((M1 + 1) % 12):
  if (D2 == 1) & (M2 != 1):
    result = 1
    
print(result)