Problem:


Score : 100 points

Problem Statement

Two students of AtCoder Kindergarten are fighting over candy packs.

There are three candy packs, each of which contains a, b, and c candies, respectively.

Teacher Evi is trying to distribute the packs between the two students so that each student gets the same number of candies. Determine whether it is possible.

Note that Evi cannot take candies out of the packs, and the whole contents of each pack must be given to one of the students.

Constraints

1 ≦ a, b, c ≦ 100

Input

The input is given from Standard Input in the following format:

a b c

Output

If it is possible to distribute the packs so that each student gets the same number of candies, print Yes. Otherwise, print No.

Sample Input 1

10 30 20

Sample Output 1

Yes

Give the pack with 30 candies to one student, and give the two packs with 10 and 20 candies to the other. Then, each gets 30 candies.

Sample Input 2

30 30 100

Sample Output 2

No

In this case, the student who gets the pack with 100 candies always has more candies than the other.

Note that every pack must be given to one of them.

Sample Input 3

56 25 31

Sample Output 3

Yes



Sample input:
10 30 20


Sample output:
Yes

Submission status: Runtime Error

Solution code:
import sys
W,H,N=map(int,input().split())
wide=[0,W]
height=[0,H]
# white sphere calculate
for i in range(N):
    x,y,a=map(int,input().split())
    if a==1:
        wide[0]=max(wide[0],x)
    elif a==2:
        wide[1]=min(wide[1],x)
    elif a==3:
        height[0]=max(height[0],y)
    elif a==4:
        height[1]=min(height[1],y)
w_len=wide[1]-wide[0]
h_len=height[1]-height[0]
s=w_len*h_len
if h_len<0 or w_len<0:
    print(0)
else:
    print(s)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a+b==c || a+c==b || b+c==a:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:

for i in range(3):
  sum += input()
  
if sum % 3 == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
l = list(map(int,input().split()))
if l % 2 == 1:
  print('No')
else:
  if l//2 in l:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
s=input().split()
p=[0,0,0]
for n in range(3):
    p[n]=int(s[n])
if p[0]+p[1]==p[2]:
    print("Yes")
elif p[1]+p[2]==p[0]:
    print("Yes")
elif p[2]+p[0]==p[1]:
    print("Yes")
else
    print("No")

Submission status: Runtime Error

Solution code:
w, h, n = map(int, input().split())
W = [0, w]
H = [0, h]
for i in range(n):
    x, y, a = map(int, input().split())
    if a == 1:
        if W[0] < x:
            W[0] = x
    elif a == 2:
        if W[1] > x:
            W[1] = x
    elif a == 3:
        if H[0] < y:
            H[0] = y
    else:
        if H[1] > y:
            H[1] = y
if W[0] > W[1] or H[0] > H[1]:
    print(0)
else:
    print((W[1] - W[0]) * (H[1] - H[0]))

Submission status: Runtime Error

Solution code:
li = map(int, input().split())
li.sort()
if li[0] + li[1] == li[2]:
	print('Yes')
else:
	print('No')

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print('YES' if a=b+c or b=a+c or c=a+b else 'NO')

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print("Yes" if a+b=c or b+c=a or c+a=b else "No")

Submission status: Runtime Error

Solution code:
W, H, N = map(int,input().split())
dx, dy = 0, 0

for i in range(N):
  x, y, a = map(int,input().split())
  if(a == 1):
    dx = max(dx, x)
  elif(a == 2):
    W = min(W, x)
  elif(a == 3):
    dy = max(dy, y)
  else:
    H = min(H, y)
if(dx <= W or dy <= H):
  print(0)
else:
  print((dx-W) * (dy-H))

Submission status: Runtime Error

Solution code:
a,b,c=map(int, input().split())
if(a+b==c)||(b+c==a)||(a+c==b):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b,c=map(int, input().split())
if((a+b+c)%3=0):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
pack = list(map(int,input().split())).sort()
if pack[0] + pack[1] == pack[2]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
A, B, C=map(int(input().split()))
if A+B==C or A+C==B or B+C==A:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
A, B, C=map(int(input().split()))
if (A+B+C)%2==0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

if (sum(a,b,c) == max(a,b,c) * 2) :
	print("Yes")
else :
	print("No")

Submission status: Runtime Error

Solution code:
A=list(map(int,input().split()))
if( sum(A) == 2*max(A) ) print("Yes")
else print( "No" )

Submission status: Runtime Error

Solution code:
print "Yes" if (a + b + c) % 2 == 0 else "No"

Submission status: Runtime Error

Solution code:
*a=map(int,input().split());print('YNeos'[sum(a)/2!=max(a)::2])

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
a=int(a)
b=int(b)
c=int(c)
avarage=(a+b+c)/2
if a!=avarage and b!=avarage and c!=avarage:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
avarage=(a+b+c)/2
if a==avarage or b==avarage or c==avarage:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		sc.close();
		if(a + b == c || a + c == b || b + c == a) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}

Submission status: Runtime Error

Solution code:
a,b,c=map(int.input().split())
total=a+b+c
if total%2==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
total=a+b+c
if total%2=0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
b = max(a)
a.remove(b)
if sum(a) == b:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
abc = sorted(list(map(int, input().split())))
print(`Yes` if abc[0]+abc[1] == abc[2] else `No`)

Submission status: Runtime Error

Solution code:
abc = sorted(map(int, input().split()))
print(`Yes` if abc[0]+abc[1] == abc[2] else `No`)

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input())
if max(a,b,c) == (a+b+c -max(a,b,c)):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
a.sort(reverse=True)
if a[0] = a[1] + a[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
if a+b==c or b+c==a or c+a==b:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

s = [a, b, c]
ld = sorted(s, reverse=True)

if ld[0] = ld[1] + ld[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

s = [a, b, c]
ld = sorted(s, reverse=True)

if ld[0] = ld[1] + ld[2]:
    print(Yes)
else:
    print(No)

Submission status: Runtime Error

Solution code:
x = [int(i) for i input().split()]
x.sort()
print("Yes" if x[0]+x[1]==x[2] else "No")

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][bool(a==b+c)+bool(b==a+c)+bool(c==a+b)])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][(a==b+c)+(b==a+c)+(c==a+b)])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][bool(bool(a==b+c)or(bool(b==a+c))or(bool(c==a+b)))])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][bool((a==b+c)or(b==a+c)or(c==a+b))])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][bool(a==b+c or b==a+c or c==a+b)])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][(a==b+c or b==a+c or c==a+b)])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][a==b+c or b==a+c or c==a+b])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input.split());print(["No","Yes"][a==b+c or b=a+c or c==a+b])

Submission status: Runtime Error

Solution code:
split())
print("Yes" if 2*max(a,b,c)==a+b+c else "No")

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

#print(args)
#print('第１引数：' + args[1])
#print('第２引数：' + args[2])
#print('第３引数：' + args[3])

ck(args[2])

list = [args[1], args[2], args[3]]

# 一番大きいやつ
l = 0;
for s in list:
    #print(s);
    if int(s) > l:
        l = int(s)

print(l)

if l == (int(args[1]) + int(args[2])):
    print("YES");
else:
    print("NO");


def ck(x,y):
    if x <= 1 && x <=100:
        #print("ok")

Submission status: Runtime Error

Solution code:
a=map(int,input().split())
a.sort()
if a[0]+a[1]==a[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
num = list(map(int, input().split()))
if max(num) == sum(num.remove(max(num))): print('Yes')
else: print('No')

Submission status: Runtime Error

Solution code:
def solve():
    a, b, c = LI()
    if a + b == c or a + c == b or b + c == a:
        print("Yes")
    else:
        print("No")


solve()

Submission status: Runtime Error

Solution code:
a, b, c = map((int, input().split()))
if (a==b+c) or (b==c+a) or (c==a+b):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a, b, c = [int(i) for i in input().split()]
if(max(a,b,c)*2 == sum(a,b,c)):
 print("Yes")
else:
 print("No")

Submission status: Runtime Error

Solution code:
n= (int(i) for i in input().split())
n.sort()
if n[0]+n[1]==n[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = list(int(i) in input().split())
n.sort()
if n[0]+n[1]==n[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
candy = int(input())
x = candy.split()
i = 0
for v in x
    if max(x) == v and (i+1)%3 + (i+2)%3 = v:
            print('YES')
            break
    i ++
if i >= 2
    print('NO')

Submission status: Runtime Error

Solution code:
#prepare
f = True
List = []
#input
List.append(map(int,raw_input().split()))

#evaluate
List.sort()
if not List[0]+List[1] == List[2]:
    f = False

#output
if f:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
if (a+b+c)%3==0:
    print "Yes"
else:
    print "No"

Submission status: Runtime Error

Solution code:
# -*- config: utf-8 -*-
 
 
 
while(1):
    a,b,c = map(int,raw_input().split())
    j = 0
 
 
    if a + b == c or a + c == b or b + c== a:
        j=1
 
    if(j == 1):
        print 'Yes'
    else:
        print 'No'

Submission status: Runtime Error

Solution code:
# -*- config: utf-8 -*-
 
 
 
for i in range(10):
    a,b,c = map(int,raw_input().split())
    j = 0
 
 
    if a + b == c or a + c == b or b + c== a:
        j=1
 
    if(j == 1):
        print 'Yes'
    else:
        print 'No'

Submission status: Runtime Error

Solution code:
input()
A=list(map(int,input().split()))
d,c,s=0,0,A[0]
for x in A[1:]:
 if x-s<d:
  d,c=x-s,c
 elif x-s==d:
  c+=1
 s=min(s,x)
print(c)

Submission status: Runtime Error

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



for i in range(10):
    a,b,c = map(int,raw_input().split())
    j = 0


    if a + b == c or a + c == b or b + c== a:
        j=1

    if(j == 1):
        print 'YES'
    else:
        print 'NO'

Submission status: Runtime Error

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



while(1):
    a,b,c = map(int,raw_input().split())
    j = 0


    if a + b == c or a + c == b or b + c== a:
        j=1

    if(j == 1):
        print 'YES'
    else:
        print 'NO'

Submission status: Runtime Error

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


a = 0
b = 0
c = 0

a = input('>>>')
b = input('>>>')
c = input('>>>')

if a+b == c:
    j=1
if a+c == b:
    j=1
if b+c == a:
    j=1

if(j == 1):
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
candy = map(int, raw_input().split())
mx = max(candy)
total = 0
for n in candy:
    if n != mx:
        total += n
if total == mx:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
l = sum(map(int, input().split()))
n = sum(l)%3
if n == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
l = sum(map(int, input().split()))
n = sum(l)%3
if n == 0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
W, H, N = [int(x) for x in input().strip().split()]
x_min = 0
y_min = 0

for i in range(N):
    x, y, a = [int(x) for x in input().strip().split()]
    result = 0
    if W < x_min or H < y_min:
        W - x_min == 0
        break

    if a == 1 and x_min < x:
        x_min = x
    elif a == 2 and W > x:
        W = x
    elif a == 3 and y_min < y:
        y_min = y
    elif a == 4 and H > y:
        H = y
    
print((W - x_min)*(H - y_min))

Submission status: Runtime Error

Solution code:
W, H, N = [int(x) for x in input().strip().split()]
x_min = 0
y_min = 0

for i in range(N):
    x, y, a = [int(x) for x in input().strip().split()]
    result = 0
    if W < x_min or H < y_min:
        W - x_min == 0
        continue

    if a == 1 and x_min < x:
        x_min = x
    elif a == 2 and W > x:
        W = x
    elif a == 3 and y_min < y:
        y_min = y
    elif a == 4 and H > y:
        H = y
    
print((W - x_min)*(H - y_min))

Submission status: Runtime Error

Solution code:
N, T= list(map(int, input().split()))
A = [int(x) for x in input().strip().split()]

result = 0
diff = 0
for i in range(N - 1):
    counter = 0
    if max(A[i+1:]) - A[i] < 0:
        continue
    elif max(A[i+1:]) - A[i] > diff:
        diff = max(A[i+1:]) - A[i]
        result += 1
    counter += 1

print(result)

Submission status: Runtime Error

Solution code:
#coding: utf-8

def solve(a, b, c):
  if a == b + c:
    return "Yes"
  elif b == c + a:
    return "Yes"
  elif c == a + b:
    return "Yes"
  return "No"

print(solve(list(map(int, input().split()))))

Submission status: Runtime Error

Solution code:
from itertools import combinations

N,T=[int(x) for x in input().split()]
towns=list([int(x) for x in input().split()])

com=combinations(list(range(0,N)),2)

bene=[]
for c in com:
    bene.append(towns[c[1]]-towns[c[0]])

max_bene=max(bene)
print(len([item for item in [x for x in bene if x==max_bene]]))

Submission status: Runtime Error

Solution code:
print(len(re.sub("B+","B",re.sub("W+","W",input())))-1)

Submission status: Runtime Error

Solution code:
i = list(map(lambda x:int(x),list(input().split(' ')))).sort()
if i[0] is i[1]+i[2]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
i = list(input().split(' ')).map(lambda x:int(x)
x,y,z = i
a =x+y+z
if a%3 is 0:

Submission status: Runtime Error

Solution code:
# coding: utf-8
"""Fighting over Candies

@author: hijiri.n
@modified: 11-19-2016

"""


def solve():
    candies = list(map(int, input().split()))
    ach = sum(candies) // 2
    for c in candies:
        if c == ach:
            return "Yes"
    return "No"
 

print(solve_a())

Submission status: Runtime Error

Solution code:
# coding: utf-8

w, h, N = list(map(int, input().split()))

rect = [0, w, 0, h]
for i in range(N):
    x, y, a = list(map(int, input().split()))
    rect[a - 1] = (lambda c, r, p: [r, c][p * (c - r) < 0])([x, y][a > 2], rect[a - 1], int(not a % 2) - int(a % 2))

length = lambda x: [x, 0][x < 0]
print(length(rect[1] - rect[0]) * length(rect[3] - rect[2]))

Submission status: Runtime Error

Solution code:
# coding: utf-8

w, h, N = list(map(int, input().split()))

rect = [0, w, 0, h]
for i in range(N):
    x, y, a = list(map(int, input().split()))
    rect[a - 1] = (lambda c, r, p: [r, c][p * (c - r) < 0])([x, y][a > 2], rect[a - 1], [1, -1][a % 2])

length = lambda x: [x, 0][x < 0]
print(length(rect[1] - rect[0]) * length(rect[3] - rect[2]))

Submission status: Runtime Error

Solution code:
line=input()
line.split(" ")
 
a=int(line[0])
b=int(line[1])
c=int(line[2])
 
if a+b==c:
 print("Yes")
elif b+c==a:
 print("Yes")
elif c+a==b:
 print("Yes")
else:
 print("No")

Submission status: Runtime Error

Solution code:
if a+b==c:
 print("yes")
elif b+c==a:
 print("yes")
elif a+c==b:
 print("yes")
else:
 print("no")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力

import sys

for line in sys.stdin:
    a,b,c = type(int(line.split()))

    # 判定
    if (a+b==c) or (a+c==b) or (b+c== a) :

        print("Yes")

    else :

        print("No")

Submission status: Runtime Error

Solution code:
# 整数の入力

import sys

for line in sys.stdin:
    a,b,c = type(int(input().split()))

    # 判定
    if (a+b==c) or (a+c==b) or (b+c== a) :

        print("Yes")

    else :

        print("No")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力

a,b,c = map(int, raw_input().split())

# 判定

if (a+b==c) or (a+c==b) or (b+c==a):
    print("Yes")
else :
    print("No")

Submission status: Runtime Error

Solution code:
w, h, n = list(map(int, input().split()))
xya = []
for i in range(n):
    xya.append(list(map(int, input().split())))

min_x_1 = w
max_x_2 = 0
min_y_3 = h
max_y_4 = 0
for i in range(n):
    ai = xya[i][2]
    if ai == 1:
        if xya[i][0] < min_x_1:
            min_x_1 = xya[i][0]
    if ai == 2:
        if xya[i][0] > max_x_2:
            max_x_2 = xya[i][0]
    if ai == 3:
        if xya[i][1] < min_y_3:
            min_y_3 = xya[i][1]
    if ai == 4:
        if xya[i][1] > max_y_4:
            max_y_4 = xya[i][1]

x = min_x_1 - max_x_2
if x <= 0:
    print("0")
else:
    y = min_y_3 - max_y_4
    if y <= 0:
        print("0")
    else:
        print(str(x * y))

Submission status: Runtime Error

Solution code:
w, h, n = list(map(int, input().split()))
xya = []
for i in range(n):
    xya.append(list(map(int, input().split())))

min_x_1 = w
max_x_2 = 0
min_y_3 = h
max_y_4 = 0
for i in range(n):
    ai = xya[i][2]
    if ai == 1:
        if xya[i][0] < min_x_1:
            min_x_1 = xya[i][0]
    if ai == 2:
        if xya[i][0] > max_x_2:
            max_x_2 = xya[i][0]
    if ai == 3:
        if xya[i][1] < min_y_3:
            min_y_3 = xya[i][1]
    if ai == 4:
        if xya[i][1] > max_y_4:
            max_y_4 = xya[i][1]

x = max_x_2 - min_x_1
if x <= 0:
    print("0")
else:
    y = max_y_4 - min_y_3
    if y <= 0:
        print("0")
    else:
        print(str(x * y))

Submission status: Runtime Error

Solution code:
a,b,c = [int(x) for x input().split()]
print('Yes' if (a+b+c)%2 else 'No')

Submission status: Runtime Error

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

seq.sort()

a, b, c = seq

if a + b == c:
    print('Yes')
    
else:
    print('No')

Submission status: Runtime Error

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

if a + b == c or b + c == a or c + a == b:
    print('Yes')
    
else:
    print('No')

Submission status: Runtime Error

Solution code:
input = raw_input()

a,b,c = map(int,raw_input.split())

if (a + b + c) % 3 == 0:
    return 'Yes'
else:
    return 'No'

Submission status: Runtime Error

Solution code:
N,_=map(int,raw_input().split())
A=map(int,raw_input().split())
difflist=[A[i]-A[j] for i in range(0,len(A)) for j in range(0,len(A)) if i>j]
print len([1 for x in difflist if x==max(difflist)])

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()

if (a+b+c) % 2 == 0:
 print('Yes\n')
else:
 print('No\n')

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
if (a+b+c) % 2 == 0:
    print('Yes')
else:
     print('No')

Submission status: Runtime Error

Solution code:
print 'No' if sum(map(int, raw_input().split())9 else 'Yes'

Submission status: Runtime Error

Solution code:
# coding: UTF8

#input = "10 49 30"
l = map(int, input().split())
# l = map(int, input.split())
l.sort()
a = l[0]
b = l[1]
c = l[2]

if a + b == c:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
w, h, n = input().split()              
w, h, n = int(w), int(h), int(n)       
x = []                                 
y = []                                 
a = []                                 
                                       
for _ in range(n):                     
    x_, y_, a_ = input().split()       
    x.append(int(x_))                  
    y.append(int(y_))                  
    a.append(int(a_))                  
W = w                                  
H = h                                  
w_r = w                                
w_l = 0                                
h_u = h                                
h_l = 0                                
for i in range(n):                     
    if a[i] is 1 and x[i]>w_l:         
        w_l = x[i]                     
    if a[i] is 2 and x[i]<w_r:         
        w_r = x[i]                     
    if a[i] is 3 and y[i]>h_l:         
        h_l = y[i]                     
    if a[i] is 4 and y[i]<h_u:         
        h_u = y[i]                     
                                       
ans = (w_r - w_l)*(h_u - h_l)          
if (w_r - w_l) < 0 or (h_u - h_l) < 0: 
    ans = 0                            
print(ans)

Submission status: Runtime Error

Solution code:
dat = raw_input()
(N,T) = dat.split(" ")

N = int(N)
T = int(T)

dat = raw_input()
A = map(int,dat.split(" "))

diffno = 0

mind = A[0]
maxd = 0

for x in range(1,len(A)):
  if maxd < (A[x] - mind):
    maxd = A[x] - mind
    diffno = 1
  elif maxd == (A[x] - mind):
    diffno += 1

  if mind > A[x]:
    mind = A[x]

print diffno

Submission status: Runtime Error

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

benefit = -1
cost = 1

for i in range(N - 1):
    for j in range(i + 1, N):
        if benefit == A[j] - A[i]:
            cost += 1
        if benefit < A[j] - A[i]:
            cost = 1
            benefit = A[j] - A[i]

print(cost)

Submission status: Runtime Error

Solution code:
list1 = input().split()
n = int(list1[0])
t = int(list1[1])
a = input().split()

list = []
l = 0
i = 0
while l < n:
   i = l + 1
   if i == n:
       list.append(int(a[i-1])-int(a[l]))     
       break
      else: 
       while i < n:
        if a[i-1]<a[i]:
           i += 1
        else:
           list.append(int(a[i-1])-int(a[l]))
           break
   l += 1

print(list.count(max(list)))

Submission status: Runtime Error

Solution code:
W, H, N = list(map(int, input().split()))

min_x = 0
min_y = 0
max_x = W
max_y = H

for i in range(N):
    x, y, a = list(map(int, input().split()))
    if a == 1:
        min_x = max(min_x, x)
    if a == 2:
        max_x = min(max_x, x)
    if a == 3:
        min_y = max(min_y, y)
    if a == 4:
        max_y = min(max_y, y)

ans_W = max(0, (max_x - min_x))
ans_H = max(0, (max_y - min_y))

print(ans_W * ans_H)

Submission status: Runtime Error

Solution code:
W, H, N = list(map(int, input().split()))

min_x = 0
min_y = 0
max_x = W
max_y = H

for i in range(N):
    x, y, a = list(map(int, input().split()))
    if a == 1:
        min_x = max(min_x, x)
    if a == 2:
        max_x = min(max_x, x)
    if a == 3:
        min_y = max(min_y, y)
    if a == 4:
        max_y = min(max_y, y)

print(max(0, (max_x - min_x)) * max(0, (max_y - min_y)))

Submission status: Runtime Error

Solution code:
W, H, N = list(map(int, input().split()))

min_x = 0
min_y = 0
max_x = W
max_y = H

for i in range(N):
    x, y, a = list(map(int, input().split()))
    if a == 1:
        min_x = max(min_x, min(max_x, x))
    if a == 2:
        max_x = min(max_x, max(min_x, x))
    if a == 3:
        min_y = max(min_y, min(max_y, y))
    if a == 4:
        max_y = min(max_y, max(min_y, y))

print((max_x - min_x) * (max_y - min_y))

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
if a>b:
    temp = a
    a = b
    b = temp

if b>c:
    temp = b
    b = c
    c = temp


if (a+b)==c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def read():
	return [int(i) for i in input().split(' ')]
L = read()
if(L[0] + L[1] == L[2] or L[0] + L[2] == L[1] or L[1] + L[2] == L[3]):
	print('Yes')
else:
	print('No')