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 = 12
D1 = 31
M2 = 1
D2 = 1

result = 0
 
if M2 == ((M1 + 1) % 12):
  if (D2 == 1) & (M2 != 1):
    result = 1
    
print(result)

Submission status: Wrong Answer

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

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

if d2 == 1 and m2 == m1 + 1:
    if d1 == 30:
        for i in range(len(b)):
            if m1 == b[i]:
                print(1)
        for i in range(len(a)):
            if m1 == a[i]:
                print(0)
    elif d1 == 31:
        for i in range(len(a)):
            if m1 == a[i]:
                print(1)
        for i in range(len(b)):
            if m1 == b[i]:
                print(0)
    else:
        print(0)
else:
    print(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) & (M1 != 12):
    result = 1
    
print(result)

Submission status: Wrong Answer

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

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

if D1[0]!=D2[0]:

  if D1[0]%2==0:

    if D1[0]==2:

      print(int(D1[1]==28))

    else:

      print(int(D1[1]==31))

  else:

    if D1[0]==7:

      print(int(D1[1]==31))

    else:

      print(int(D1[1]==30))

else:

  print(0)

Submission status: Wrong Answer

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

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

if d2 == 1 and m2 == m1 + 1:
    if d1 == 30:
        for i in range(len(b)):
            if m1 == b[i]:
                print(1)
        for i in range(len(a)):
            if m1 == a[i]:
                print(0)
    elif d2 == 31:
        for i in range(len(a)):
            if m1 == a[i]:
                print(1)
        for i in range(len(a)):
            if m1 == b[i]:
                print(0)
    else:
        print(0)
else:
    print(0)

Submission status: Wrong Answer

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

if d1 >= 30:
  print("1")
if m1 == 2:
  if d1 >= 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==c:
	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 s1[1] > s2[1]:
  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 6 or 7 or 8 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:
D1=[int(i) for i in input().split(" ")]

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

if D1[0]!=D2[0]:

  if D1[0]%2==0:

    print(int(D1[1]==31))

  else:

    if D1[0]==2:

      print(int(D1[1]==28))

    elif D1[0]==7:

      print(int(D1[1]==31))

    else:

      print(int(D1[1]==30))

else:

  print(0)

Submission status: Wrong Answer

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

if m1 + 1 != m2:
    print("0")
else:
    if m1 == (11 or 4 or 6 or 9):
        if d1 != 30:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    elif m1 == (1 or 3 or 5 or 7 or 8 or 10):
        if d1 != 31:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    elif m1 == 2:
        if d1 != 28:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    elif m1 == 12:
        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:
m1,d1=(int(x) for x in input().split())
m2,d2=(int(x) for x in input().split())
math1 = [1,3,5,7,8,10,12]
math2 = [4,6,9,11]
math3 = [2]
a = 0
if m1 in math1:
    if d1 == 31:
        a += 1
elif m1 in math2:
    if d1 == 30:
        a += 1
elif m1 in math3:
    if d1 == 28:
        a += 1
else:
    pass
if m2 in math1:
    if d2 == 31:
        a += 1
elif m2 in math2:
    if d2 == 30:
        a += 1
elif m2 in math3:
    if d2 == 28:
        a += 1
else:
    pass
print(a)

Submission status: Wrong Answer

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

if m1 == 2:
  if d1 >= 29:
    print("1")
elif d1 >= 30:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
m1,d1=(int(x) for x in input().split())
m2,d2=(int(x) for x in input().split())
math1 = [1,3,5,7,8,10,12]
math2 = [4,6,9,11]
math3 = [2],12
a = 0
if m1 in math1:
    if d1 == 31:
        a += 1
elif m1 in math2:
    if d1 == 30:
        a += 1
elif m1 in math3:
    if d1 == 28:
        a += 1
else:
    pass
if m2 in math1:
    if d2 == 31:
        a += 1
elif m2 in math2:
    if d2 == 30:
        a += 1
elif m2 in math3:
    if d2 == 28:
        a += 1
else:
    pass
print(a)

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:
    result = 1
    
print(result)

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

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 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 + 1 != m2:
    print("0")
else:
    if m1 == (11 or 4 or 6 or 9):
        if d1 != 30:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    elif m1 == (1 or 3 or 5 or 7 or 8 or 10 or 12):
        if d1 != 31:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    else:
        if d1 != 28:
            print("0")
        else:
            if d2 == 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 != m2:
  if d1 == 30:
    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==1 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 + 1 != m2:
    print("0")
else:
    if m1 == (11 or 4 or 6 or 9):
        if d1 != 30:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    elif m1 == (1 or 3 or 5 or 7 or 8 or 10 or 12):
        if d1 != 31:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    else:
        if d1 != 27:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("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 M2 == 1:
    result = 1
    
print(result)

Submission status: Wrong Answer

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

if M1==1 or M1==3 or M1==5 or M1==7 or M1==8 or M1==10 or M1==12:
    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')
elif M1==2:
    if D1==28:
        if D2-D1==1:
            print('0')
        else:
            print('1')
    if D1==29:
        print('1')
    else:
        print('0')

Submission status: Wrong Answer

Solution code:
M,D = map(int,input().split())
N,S = map(int,input().split())
if M==1 or M==3 or M==5 or M==7 or M==8 or M==10 or M==12:
    if D == 31 and S==1:
        if M+1==N or M-11==N:
            print(1)
        else:
            print(0)
    else:
            print(0)
elif M==2 or M==4 or M==6 or M==9 or M==11:
    if D==30 and S==1:
        if M+1==N or M-11==N:
            print(1)
        else:
            print(0)
    else:
            print(0)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if M2 % M1 == 1:
    if M2 == 1:
        if M1 == 12:
            print(1)
        else:
            print(0)
            exit()
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
a = input().split()
c = input().split
if a != c:
	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 + 1 != m2:
    print("0")
else:
    if m1 == (11 or 4 or 6 or 9):
        if d1 != 30:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")
    elif m1 == (1 or 3 or 5 or 7 or 8 or 10 or 12):
        if d1 != 31:
            print("0")
        else:
            if d2 == 1:
                print("1")
            else:
                print("0")

Submission status: Wrong Answer

Solution code:
import sys
m,d = input().split()
if m in ('1','3','5','7','8','10','12'):
  if d == '31':
    print('1')
  else:
    print('0')
elif m == '2':
  if d == '28':
    print('1')
  else:
    print('0')
else:
  print('0')

Submission status: Wrong Answer

Solution code:
month_1, day_1 = input().split()
month_2, day_2 = input().split()

int_month_1 = int(month_1)
int_month_2 = int(month_2)

if int_month_1 == int_month_2:
  print('1')
else:
  print('0')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if M1==1 or M1==3 or M1==5 or M1==7 or M1==8 or M1==10 or M1==12:
    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')
elif M1==2:
    if D1==28:
        if D2-D1!=1:
            print('0')
        else:
            print('1')
    if D1==29:
        print('1')
    else:
        print('0')

Submission status: Wrong Answer

Solution code:
ld={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if ld[m1]==d1 or ld[m2]==d2:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import sys
m,d = input().split()
if m in ('1','3','5','7','8','10','12'):
  if d == '31':
    print('1')
elif m == '2':
  if d == '28':
    print('1')
else:
  print('0')

Submission status: Wrong Answer

Solution code:
hoge=input()
a,b=input().split(" ")
if b==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 == 4 or 6 or 9 or 11) and d1 ==30:
    print(1)
elif m1 == 2 and d1 ==28:
    print(1)
elif d1 == 31:
    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 % 12 + 1 == m2:
  if m1 in [2,4,6,9,11]:
    if d1 == 30 and d2 == 1:
      print('1')
    else:
      print('0')
  elif m1 in [1,3,5,7,8,10,12]:
    if d1 == 31 and d2 == 1:
      print('1')
    else:
      print('0')
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 6 or 7 or 8 or 12:
    if b == 31:
        flag = 1
if c == 1 or 3 or 5 or 6 or 7 or 8 or 12:
    if d == 31:
        flag = 1
if a == 2:
    if b == 28:
        flag = 1
if c == 2:
    if d == 28:
        flag = 1
if a == 4 or 6 or 9 or 11:
    if b == 30:
        flag = 1
if c == 4 or 6 or 9 or 11:
    if d == 30:
        flag = 1
print(flag)

Submission status: Wrong Answer

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

if d1 >= 30:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
def fetch_int_input():
    return [int(s) for s in input().strip().split()]

pre_input = fetch_int_input()
nxt_input = fetch_int_input()

echo_str = ""
if pre_input[0] != nxt_input[0]:
  echo_str = "月末日です。"
 
else:
  echo_str = "月末日ではありません。"
  
print(str(pre_input[0]) + "月" + str(pre_input[1]) + "日は" + echo_str)

Submission status: Wrong Answer

Solution code:
m1, d1 = input().split()
m1 = int(m1)
d1 = int(d1)
result = 0

if (m1 == 4 or m1 == 6 or m1 == 9 or m1 == 11) and d1 == 30:
  result = 1
elif m1 == 2 and d1 ==28:
  result == 1
elif d1 == 31:
  result = 1
print(result)

Submission status: Wrong Answer

Solution code:
month_1, day_1 = input().split()
month_2, day_2 = input().split()

int_month_1 = int(month_1)
int_month_2 = int(month_2)

if int_month_1 == int_month_2:
  print(1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if d1 == 31:
    if m1 == 1 or m1 == 3 or m1 == 5 or m1 == 7 or m1 == 8 or m1 == 10 or m1 == 12:
        print(1)
elif d1 == 30:
    if m1 == 4 or m1 == 6 or m1 == 9 or m1 == 11:
        print(1)
elif d1 == 28:
    if m1 == 2:
        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 - November 30
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

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

Submission status: Wrong Answer

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

ans = 0
if m2 == m1+1:
    if d1 == 30 and d2 == 1:
        ans = 1
    elif d1 == 31 and d2 == 1:
        ans = 1
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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


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

Submission status: Wrong Answer

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

if (D1 > D2):
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m = []
d = []
for _ in range(2):
    temp = list(map(int, input().split()))
    m.append(temp[0])
    d.append(temp[1])
if m[0] == 12:
    if m[1] == 1:
        print(1)
elif m[1] == m[0] + 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 != m2 :print(0)
else:print(1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
a, b = (int(i) for i in input().split()) 
c, d= (int(i) for i in input().split()) 
#a = [int(i) for i in input().split()] 
#e = [[int(i) for i in input().split()] for i in range(n)] 

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m,n=input().split()
ma,na=input().split()
if m==ma:
  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==c:
    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 = [int(_) for _ in input().split()]
m2, d2 = [int(_) for _ in input().split()]
if d1 + 1 == d2:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Accepted

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

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:
m,d = map(int,input().split())
m2,d2 = map(int,input().split())
print(1 if m != m2 else 0)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
print([0,1][a==c-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, _ = map(int, input().split())
M2, _ = map(int, input().split())
ans = 1 if M1 != M2 else 0
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:
n,m = map(int,input().split())
x,y = map(int,input().split())
if n!=x:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
MD = [map(int, input().split()) for _ in range(2)]
M, D = [list(i) for i in zip(*MD)]

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

Submission status: Accepted

Solution code:
md = [list(map(int, input().split())) for i in range(2)]
print(0) if md[0][0] == md[1][0] else print(1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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:

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:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


def main():
    solve()


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=[31,28,31,30,31,30,31,31,30,31,30,31]
s=list(map(int,input().split()))
d=list(map(int,input().split()))
x=l[s[0]-1]
if(x!=s[1]):
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c, d = map(int, input().split())
print(1 if c != a 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())
print(1 if m1 +1 == 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:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

a,b = MI()
c,d = MI()

print(1 if d == 1 else 0)

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

a,b = MI()
c,d = MI()

print(1 if b+1 != d else 0)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
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(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()

md1 = inl()
md2 = inl()


def solve():
    return md1[0] < md2[0]


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

Submission status: Accepted

Solution code:
a=input().split()
b=input().split()
print(int(b[1]=="1"))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
if ((a+1)==c or (a==12 and c==1)):
  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:
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
ok = False
if d1+1 != d2:
    ok = True
if ok:
    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:
x=input().split()
y=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())
ans = 0 if m1 == m2 else 1
print(ans)

Submission status: Accepted

Solution code:
#create date: 2020-08-11 09:28

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    a, _ = na()
    b, _ = na()
    print(b-a)

if __name__ == "__main__":
    main()