Problem:


Score : 100 points

Problem Statement

You are given three integers, A, B and C.

Among them, two are the same, but the remaining one is different from the rest.

For example, when A=5,B=7,C=5, A and C are the same, but B is different.

Find the one that is different from the rest among the given three integers.  

Constraints

-100 \leq A,B,C \leq 100 

A, B and C are integers.

The input satisfies the condition in the statement.

Input

Input is given from Standard Input in the following format:  

A B C

Output

Among A, B and C, print the integer that is different from the rest.

Sample Input 1

5 7 5

Sample Output 1

7

This is the same case as the one in the statement.

Sample Input 2

1 1 7

Sample Output 2

7

In this case, C is the one we seek.

Sample Input 3

-100 100 100

Sample Output 3

-100



Sample input:
5 7 5


Sample output:
7

Submission status: Runtime Error

Solution code:
A, B, C = list(map(int, input().split()))

if A == B:
    print(C)
elif A == C
    print(B)
else:
    print(A)

Submission status: Runtime Error

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

x = [0 for _ in range(n)]
y = [0 for _ in range(n)]
for i in range(n):
    x[i], y[i] = map(int, input().split())

min_x = min(x)
min_y = min(y)
for i in range(n):
    x[i] -= min_x
    y[i] -= min_y

sx = sorted(x)
sy = sorted(y)

if n == k:
    print(sx[n - 1] * sy[n - 1])
    exit()

d = [[0 for _ in range(n + 1)] for _ in range(n + 1)]
for i in range(n):
    d[sx.index(x[i]) + 1][sy.index(y[i]) + 1] = 1

#for p in d: print(p)

for i in range(n + 1):
    for j in range(1, n + 1):
        d[i][j] += d[i][j - 1]

for i in range(n + 1):
    for j in range(1, n + 1):
        d[j][i] += d[j - 1][i]

sx = [0] + sx
sy = [0] + sy

a = 0
b = 1
ans = sx[n] * sy[n]
temp = 0
for p in range(n):
    for q in range(p + 1, n + 1):
        for a in range(n):
            for b in range(a + 1, n + 1):
                temp = d[q][b] - d[q][a] - d[p][b] + d[p][a]
                if temp >= k:
                    break
            if temp >= k:
                ans = min(ans, max(1, (sx[b] - sx[a + 1])) * max(1, (sy[q] - sy[p + 1])))

print(ans)

Submission status: Runtime Error

Solution code:
A,B,C=list(map(int,input()))
if A==B:
    print(C)
elif B==C:
    print(A)
else:
    print(B)

Submission status: Runtime Error

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

if a==b:
	print(c)
elif a==c:
	print(b)
else:
	print(a)

Submission status: Runtime Error

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

if a=b:
	print(c)
if a=c:
	print(b)
else:
	print(a)

Submission status: Runtime Error

Solution code:
a,b,c=map(jnt,input().split())
if a==b:
    print(c)
elif b==c:
    print(a)
else:
    print(b)

Submission status: Runtime Error

Solution code:
a,b,c=map(jnt,input().split())
if a=b:
    print(c)
elif b=c:
    print(a)
else:
    print(b)

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(1,4) ]

if a[1]==a[2]:
     print(a[3])
elif a[1]==a[3]:
     print(a[2])
else:
     print(a[1])

Submission status: Runtime Error

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

if a = b:
    print(c)
elif b = c:
    print(a)
elif c = a:
    print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
b = set(a)
for x in a:
  if a.count(x) == b.count(x):
    print(x)
    exit()

Submission status: Runtime Error

Solution code:
k,s=map(int,input().split(" "))
ans=0
for x in range(k+1):
  for y in range(x, k+1):
    for z in range(y, k+1):
      t = x+y+z
      if t == s:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
def solve():
    H, W = map(int, input().split())
    a = [list("."+input()+".") for _ in [0]*H]
    a.insert(0, list("."*(W+2)))
    a.append(list("."*(W+2)))
    result = []
 
    for y in range(1, H+1):
        for x in range(1, W+1):
            if a[y][x] == "#":
                result.append("#")
            else:
                result.append(str((a[y-1][x-1:x+2]+a[y][x-1:x+2]+a[y+1][x-1:x+2]).count("#")))
        result.append("\n")
 
    print("".join(result))
 
 
if __name__ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
a, b, c = map(int, inpu())
if a == b:
  print(c)
elif b == c:
  print(a)
else:
  print(b)

Submission status: Runtime Error

Solution code:
a = map(int, input())
a.sort()
if a == b:
    print(c)
else:
    print(a)

Submission status: Runtime Error

Solution code:
A,B,C=map(int,intpu().split())
if A==B:
    print(C)
if B==C:
    print(B)
if A==C:
    print(A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input().split()
a.sort()
print(a[4] if a[2]==a[3] else a[2])

Submission status: Runtime Error

Solution code:
a=list(input()).sort
print(a[0] if a[0]!=a[1] else a[2])

Submission status: Runtime Error

Solution code:
s=list(input)
a=[i for i in set(s) if s.count(i)>1]
print(a[0])

Submission status: Runtime Error

Solution code:
def connect(blist, a):
	x = []
	for i in range(len(blist)):
		if blist[i][0]==a:
			x.append(blist[i][1])
		elif blist[i][0]>a:
			break
	for j in range(len(blist)):
		if blist[j][1]==a:
			x.append(blist[j][0])
	return(x)

n,m = (int(i) for i in input().split())
y = [[int(i) for i in input().split()] for i in range(m)]
answer = 0
for j in range(len(y)):
	y2,z = [],set()
	for k in range(1,n+1):
		y2.append(connect(y[:j]+y[min(j+1,len(y)):],k))
	for j2 in y2[y[j][0]-1]:
		z.add(j2)
	num = 0
	while y[j][1] not in z and len(z) != num:
		num,z2 = len(z),list(z)
		for k in z2:
			for k2 in y2[k-1]:
				z.add(k2)
	if y[j][1] not in z:
		answer += 1
print(answer)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
XY = []
YX = []
for i in range(N):
    x, y = map(int, input().split())
    XY.append([x, y, i])
    YX.append([y, x, i])
XY.sort()
YX.sort()

x_order = {}
for xo, p in enumerate(XY):
    x, y, i = p
    x_order[i] = xo

cums = [[0 for j in range(N+1)] for i in range(N+1)]
for i in range(N):
    y, x, pi = YX[i]
    xo = x_order[pi]
    for j in range(N + 1):
        cums[i + 1][j] = cums[i][j] + (1 if j > xo else 0)

ans = float('inf')

for i in range(N-1):
    for j in range(i+1, N):
        for k in range(N-1):
            for l in range(k+1, N):
                if cums[l+1][j+1] - cums[l+1][i] - cums[k][j+1] + cums[k][i] >= K:
                        ans = min(ans, (XY[j][0]-XY[i][0]) * (YX[l][0]-YX[k][0]))

print(ans)

Submission status: Runtime Error

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

pair=[list(map(lambda x:int(x)-1,input().split())) for _ in range(M)]
graph=[[0]*N for _ in range(N)] #隣接行列の初期化


for p in pair:
	graph[p[0]][p[1]]= graph[p[1]][p[0]]=1
	
def DFS(v):
	if visited[v]:
		return 
	visited[v]=True
	for j in [j for j,v2 in enumerate(graph[v]) if v2==1]:
		DFS(j)
		
res = 0

for i in range(M):
	visited=[False for _ in range(N)] #訪問済みリストの初期化
	x,y=pair[i]
	graph[x][y]=graph[y][x]=0 #辺を取り除く
	DFS(0 if i>0 else 1)
	
	if not all(visited): #全ての頂点が訪問済みでなかった場合
		res+=1
	
	graph[x][y]=graph[y][x]=1

print(res)

Submission status: Runtime Error

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

pair=[list(map(lambda x:int(x)-1,input().split())) for _ in range(M)]
graph=[[0]*N for _ in range(N)] #隣接行列の初期化


for p in pair:
	graph[p[0]][p[1]]= graph[p[1]][p[0]]=1
	
def DFS(v):
	if visited[v]:
		return 
	visited[v]=True
	for i in [i for i,v2 in enumerate(graph[v]) if v2==1]:
		DFS(i)
		
res = 0

for i in range(M):
	visited=[False for _ in range(N)] #訪問済みリストの初期化
	x,y=pair[i]
	graph[x][y]=graph[y][x]=0 #辺を取り除く
	DFS(0 if i>0 else 1)
	
	if not all(visited): #全ての頂点が訪問済みでなかった場合
		res+=1
	
	graph[x][y]=graph[y][x]=1

print(res)

Submission status: Runtime Error

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

pair=[list(map(lambda x:int(x)-1,input().split())) for _ in range(M)]
graph=[[0]*N for _ in range(N)] #隣接行列の初期化

print(pair)

for p in pair:
	graph[p[0]][p[1]]= graph[p[1]][p[0]]=1
	
def DFS(v):
	if visited[v]:
		return 
	visited[v]=True
	for i in [i for i,v2 in enumerate(graph[v]) if v2==1]:
		DFS(i)
		
res = 0

for i in range(M):
	visited=[False for _ in range(N)] #訪問済みリストの初期化
	x,y=pair[i]
	graph[x][y]=graph[y][x]=0 #辺を取り除く
	DFS(0 if i>0 else 1)
	
	if not all(visited): #全ての頂点が訪問済みでなかった場合
		res+=1
	
	graph[x][y]=graph[y][x]=1

print(res)

Submission status: Runtime Error

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

pair=[list(map(lambda x:int(x)-1,input().split())) for _ in range(M)]
graph=[[0]*N for _ in range(N)] #隣接行列の初期化

print(pair)

for p in pair:
	graph[p[0]][p[1]]= graph[p[1]][p[0]]=1
	
def DFS(v):
	if visited[v]:
		return 
	visited[v]=True
	for i in [i for i,v2 in enumerate(graph[v]) if v2==1]:
		DFS(i)
		
res = 0

for i in range(M):
	visited=[False for _ in range(N)] #訪問済みリストの初期化
	x,y=pair[i]
	graph[x][y]=graph[y][x]=0 #辺を取り除く
	DFS(0)
#	DFS(0 if i>0 else 1)
	
	if not all(visited): #全ての頂点が訪問済みでなかった場合
		res+=1
	
	graph[x][y]=graph[y][x]=1

print(res)

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())
if l[0] != l[1] and l[0] == l[2]:
  print(l[1])
elif l[0] != l[1] and l[1] == l[2]:
  print(l[0])
elif l[0] == l[1] and l[1] != l[2]:
  print(l[2])

Submission status: Runtime Error

Solution code:
a = list(map(lambda x: int(x), input().split(" ")))
b = list(set(a))
print(a-b)

Submission status: Runtime Error

Solution code:
from itertools import combinations as comb
import numpy as np
N, K = map(int, input().split())
ans = 10 ** 18 + 1
choice = min(K, 4)
ps = np.array([list(map(int, input().split())) for i in range(N)])
for idxs in comb(range(N), choice):
	rep_ps = ps[idxs, :]
	x_max = rep_ps[:, 0].max()
	y_max = rep_ps[:, 1].max()
	x_min = rep_ps[:, 0].min()
	y_min = rep_ps[:, 1].min()
	in_num = sum((ps[:, 0] <= x_max) & (ps[:, 0] >= x_min) & (ps[:, 1] <= y_max) & (ps[:, 1] >= y_min))
	area = (y_max - y_min) * (x_max - x_min)
	if K >= in_num and area < ans:
		ans = area
print(area)

Submission status: Runtime Error

Solution code:
h, w = map(int, input().split())
S = [list(input()) for i in range(h)]
for i in range(h):
    for j in range(w):
        if S[i][j] == '#':
            continue
        cnt = 0
        for dx in [-1, 0, 1]:
            for dy in [-1, 0, 1]:
                if not 0 <= i+dy < h or not 0 <= j+dx < w:
                    continue
                if S[i+dy][j+dx] == '#':
                    cnt += 1
        S[i][j] = str(cnt)
for s in S:
    print("".join(s))

Submission status: Runtime Error

Solution code:
a,b,c = int(input().split())
if a==b:
    print(c)
elif b==c:
    print(a)
else:
    print(b)

Submission status: Runtime Error

Solution code:
# coding:utf-8
H,W = map(int,input().split())

A = [[0 for i in range(W)] for j in range(H)]
ans = [[0 for i in range(W)] for j in range(H)]
B = [0] * H

for i in range(H):
	B[i] = input()

for i in range(H):
	char = list(B[i])
	for j in range(W):
		A[i][j] = char[j]


for i in range(H):
	for j in range(W):
		if A[i][j] == '#':
			for h in range(-1,2):
				for k in range(-1,2):
					if h == 0 and k == 0:
						continue
					if (i == 0 and h == -1) or (i == H -1 and h == 1) or (j == 0 and k == -1) or (j == W-1 and k == 1):
						continue

					if (A[i+h][j+k]) != '#':
 						ans[i+h][j+k] += 1  
			ans[i][j] = '#'
		
print (ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import copy

def set(adjacent,edge):
    for x in edge:
        adjacent[x[0]].append(x[1])
        adjacent[x[1]].append(x[0])

    
def search(goal,path):
    n = path[len(path) - 1]
    if n == goal:
        print(path)
    else:
        for x in adjacent[n]:
            if x not in path:
                path.append(x)
                search(goal, path)
                path.pop()

def search_loop_node(adjacent,start,path,node_loops):
    n = path[len(path)-1]
    for x in adjacent[n]:
        if x == start and len(path) >=2 and path[-2] != start :
            path.append(x)
            node_loops.append(copy.deepcopy(path))
            path.pop()
        elif x not in path:
            path.append(x)
            search_loop_node(adjacent,start, path,node_loops)
            path.pop()

def main():
    #入力
    N, M = [int(i) for i in input().split()]
    edge = []
    for i in range(M):
        a,b = [int(i) for i in input().split()]
        edge.append([a,b])

    #辺の生成
    adjacent=[ [] for i in range(N+1)]
    loops=[]
    set(adjacent,edge)
    #ループの検索
    for i in range(N):
        search_loop_node(adjacent,i,[i],loops)
    #ループに属する辺(橋でない辺)の検索
    not_bridge = []
    for loop in loops:
        pre_node = loop[0]
        for node in loop:
            if pre_node < node and [pre_node, node] not in not_bridge:
                not_bridge.append([pre_node,node])
            pre_node = node
    #答えは全体の辺の数からループでないものを引いた数
    print(M-len(not_bridge))
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
if A == B:
  print(C)
 elif B == C:
  print(A)
 else:
  print(B)

Submission status: Runtime Error

Solution code:
N,K = map(int, raw_input().split(" "))

points = []
pointsx = []
pointsy = []

smin = 0

for i in range(N):
    x,y = map(int, raw_input().split(" "))
    pointsx.append(x)
    pointsy.append(y)

spx = sorted(pointsx)

for i in range(N-K+1):
    for h in range(N-K-i+1):
        yneed = []
        for k in range(N):
            if pointsx[k]>=spx[i] and pointsx[k]<=spx[i+K+h-1]:
                yneed.append(pointsy[k])
        spy = sorted(yneed)
        ylength = 0
        xlength = spx[i+K+h-1]-spx[i]
        for k in range(len(spy) - K + 1):
            if ylength < spy[k+K-1]-spy[k]: ylength = spy[k+K-1]-spy[k]
        if smin == 0: smin = ylength * xlength
        elif smin > ylength * xlength:
            smin = ylength * xlength


print smin

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
A,B,C = map(int, raw_input().split())
if A == B:
    print(C):
if A == C:
    print(B)
if B == C:
    print(A)

Submission status: Runtime Error

Solution code:
H, W = map(int, input().split())
S = [input() for i in range(H)]

ans = []
for i in S:
    ans.append(list(i))

dxy = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1)]

for y in range(H):
    for x in range(W):
        if S[y][x] == '#':
            continue
        c = 0
        for dx, dy in dxy:
            if x + dx < 0 or x + dx > W - 1 or y + dy < 0 or y + dy > H - 1:
                continue
            if S[y + dy][x + dx] == '#':
                c += 1
        ans[y][x] = c

for row in ans:
    print(''.join(list(map(str, row))))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy.optimize import linprog
from scipy import ceil, ifft
from scipy.fftpack import fft

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

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy.optimize import linprog
#from scipy import ceil, ifft
#from scipy.fftpack import fft

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

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy.optimize import linprog
from scipy import ceil, ifft
from scipy.fftpack import fft

# 読み込み
a = int( input() )
b, c = list( map(int, input().split() ) )
s = input()

print( str(a+b+c)+" "+s )

# 改行しない print
#print( str(a+b+c)+" "+s, end='' )

Submission status: Runtime Error

Solution code:
ary = map(int, input().split())
if ary[0] == ary[1]:
    print(ary[2])
elif ary[0] == ary[2]:
    print(ary[1])
else:
    print(ary[0])

Submission status: Runtime Error

Solution code:
HM = input().split()
H, M = [int(HM[i]) for i in range(len(HM))]

S = [input() for i in range(H)]
print(S)
#print(T[0][1])
#S2 = list([S[i] for i in range(H)] for j in range(M))
S2 = []
for i in range(H):
    S2.append(list(S[i]))
print(S2)

def minesweeper():
    for i in range(H):
        for j in range(M):
            if S[i][j] == ".":
                c = count(i, j)
                #print(c)
                S2[i][j] = c
    for i in range(H):
        for j in range(M-1):
            print(S2[i][j], end="")
        print(S2[i][M-1])
    return 0


def count(x,y):
    c = 0
    #print("x={}".format(x))
    if (x >= 1 and y >= 1):
        if S[x-1][y-1] == '#':
            c += 1
            #print('1')
    if (x >= 1):
        if S[x-1][y] == "#":
            c += 1
            #print('2')
    if x >= 1 and y <= M - 2:
        if S[x-1][y+1] == "#":
            c += 1
            #print("x={}".format(x))
            #print('3')
    if (y >= 1):
        if S[x][y-1] == "#":
            c += 1
            #print('4')
    if (y <= M - 2):
        if S[x][y+1] == "#":
            c += 1
            #print('5')
    if (x <= H-2 and y >= 1):
        if S[x+1][y-1] == "#":
            c += 1
            #print('6')
    if (x <= H-2):
        if S[x+1][y] == "#":
            c += 1
            #print('7')
    if (x <= H-2 and y <= M-2):
        if S[x+1][y+1] == "#":
            c += 1
            #print('8')
    return c

minesweeper()

Submission status: Runtime Error

Solution code:
t = input().split())

if t[0] == t[1]:
    print(t[2])
elif t[0] == t[2]:
    print(t[1])
else:
    print(t[0])

Submission status: Runtime Error

Solution code:
if A == B:
    print(C)
elif A == C:
    print(B)
else:
    print(A)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input(),split())
if a ==b:
	print(c)
elce:
if a == c:
	print(b)
	else:
		print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if (a == b):
    print(c)
    exit()
if (b == c):
    print(a)
    exit()
if (a == c):
    print(b)
    exit()

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

if A == B:
    print(C)
elif A == C:
    print(B)
else:
    print(A)

Submission status: Runtime Error

Solution code:
def check(t):
    return 1 if t is '#' else 0
    
def main(H, W, S):
    for i in range(H):
        for j in range(W):
            if S[i][j] is '.':
                S[i][j] = check(S[i][max(j-1, 0)]) + check(S[i][min(j+1, W-1)]) + check(S[max(i-1, 0)][j]) + check(S[min(i+1, H-1)][j])
    return S


H, W = map(int, input().split())
S = [input().split() for i in H]
print(main(H, W, S))

Submission status: Runtime Error

Solution code:
def main(argv):
    for v in argv:
        print(v)

main()

Submission status: Runtime Error

Solution code:
area=19000000000000000000
def check(x1,y1,x2,y2,x3,y3,x4,y4,k):
    global area
    atot = abs((x1-x3)*(y1-y3))
    cnt=0
    for i,j in a:
        a1=abs((x1-i)*(y1-j))
        a2 = abs((x2 - i) * (y2 - j))
        a3 = abs((x3 - i) * (y3 - j))
        a4 = abs((x4 - i) * (y4 - j))
        if a1+a2+a3+a4==atot:
            cnt+=1
    if cnt>=k:
        area=min(area,atot)
n,k=[int(i) for i in input().split()]
a=[]

for _ in range(n):
    a.append([int(i) for i in input().split()])
for i in range(n):
    for j in range(n):
        la=0
        check(a[i][0],a[i][1],a[j][0],a[i][1],a[j][0],a[j][1],a[i][0],a[j][1],k)
print(area)

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

Solution code:
#ABC075B

h,w=map(int,raw_input().split())
l=[]
for i in xrange(h):
 l.append(list(raw_input()))
for y in xrange(h):
 for x in xrange(w):
  if l[y][x]=='#':
   continue
  cnt=0
  for dy in [-1,0,1]:
   for dx in [-1,0,1]:
    ny=y+dy
    nx=x+dx
    if 0<=ny<h and 0<=nx<w:
     if l[ny][nx]=='#':
      cnt+=1
  l[y][x]=str(cnt)
for i in xrange(h):
 print ''.join(l[i])

Submission status: Runtime Error

Solution code:
N,M=map(int,raw_input().split(' '))

g=[[False for i in range(N)] for j in range(N)]
ab=[()]*N
v=[False]*N

def dfs(n):
    v[n]=True
    for i in range(N):
        if g[n][i]==True and v[i]==False:
            dfs(i)

for i in range(M):
    a,b=map(int,raw_input().split(' '))
    a-=1
    b-=1
    g[a][b]=g[b][a]=True
    ab[i]=(a,b)

ans=0
for i in range(M):
    a,b=ab[i]
    g[a][b]=g[b][a]=False

    dfs(0)

    if v!=[True]*N:
        ans+=1

    g[a][b]=g[b][a]=True
    v=[False]*N

print ans

Submission status: Runtime Error

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

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

if a == b:
    print(c)
elif b == c:
    print(a)
elif c == a:
    print(b)
else
    pass

Submission status: Runtime Error

Solution code:
H, W = map(int, input().split())
table = []
table.append(list("_" * (W + 2)))
for _ in range(H):
    table.append(list("_" + input() + "_"))
table.append(list("_" * (W + 2)))

for h in range(1, H + 1):
    for w in range(1, W + 1):
        if table[h][w] == "#":
            continue
        count = 0
        for _h in [-1, 0, +1]:
            for _w in [-1, 0, +1]:
                print(h + _h, w + _w)
                if table[h + _h][w + _w] == "#":
                    count += 1
        table[h][w] = str(count)

for h in range(1, H + 1):
    print("".join(table[h]).replace("_", ""))

Submission status: Runtime Error

Solution code:
H, W = map(int, input().split())
table = []
table.append(list("_" * (W + 2)))
for _ in range(H):
    table.append(list("_" + input() + "_"))
table.append(list("_" * (W + 2)))

for h in range(1, H + 1):
    for w in range(1, W + 1):
        if table[h][w] == "#":
            continue
        count = 0
        print(h, w, "---------")
        for _h in [-1, 0, +1]:
            for _w in [-1, 0, +1]:
                print(h + _h, w + _w)
                if table[h + _h][w + _w] == "#":
                    count += 1
        table[h][w] = str(count)

for h in range(1, H + 1):
    print("".join(table[h]).replace("_", ""))

Submission status: Runtime Error

Solution code:
import sys
from collections import Counter

sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


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


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n = read_int_list()
    c = Counter(n)
    for i in c:
        if c[i] == 1:
            print(i)


main()

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
c = Counter(n)
    for i in c:
        if c[i] == 1:
            res = i
            print(res)

Submission status: Runtime Error

Solution code:
import numpy as np

H, W = map(int, input().split())
arr=np.array([])
s=0
while s != H:
  li=list(input())
  li=np.array(li)
  arr=np.hstack((arr,li))

  s+=1
arr=arr.reshape((H,W))
count=0
def check(x,y):
    global count
    if arr[x,y] == "#":
        count+=1

for x in range(H):
    stri=""
    for y in range(W):
        if arr[x,y] == ".":
            count=0
            top= None
            right =None
            left=None
            if y != 0:
                top=True
                check(x,(y-1))
            if x != 0:
                if top:
                    check((x-1),(y-1))
                check((x-1),y)
                left=True
            if x != (W-1):
                if top:
                    check((x+1),(y-1))
                right=True
                check((x+1),y)
            if y != (H-1):
                if left:
                    check(x-1,y+1)
                if right:
                    check(x+1,y+1)
                check(x,(y+1))
            print(str(count),end="")
        else:
            print("#",end="")
    print("")

Submission status: Runtime Error

Solution code:
import numpy as np

H, W = map(int, raw_input().split())
arr=np.array([])
s=0
while s != H:
  li=list(raw_input())
  li=np.array(li)
  arr=np.hstack((arr,li))

  s+=1
arr=arr.reshape((H,W))
count=0

def check(x,y):
    import __main__
    if arr[x,y] == "#":
        __main__.count+=1

for x in range(H):
    stri=""
    for y in range(W):
        if arr[x,y] == ".":
            count=0
            top= None
            right =None
            left=None
            if y != 0:
                top=True
                check(x,(y-1))
            if x != 0:
                if top:
                    check((x-1),(y-1))
                check((x-1),y)
                left=True
            if x != (W-1):
                if top:
                    check((x+1),(y-1))
                right=True
                check((x+1),y)
            if y != (H-1):
                if left:
                    check(x-1,y+1)
                if right:
                    check(x+1,y+1)
                check(x,(y+1))
            stri=stri+str(count)
        else:
            stri=stri+"#"
    print(stri)

Submission status: Runtime Error

Solution code:
import sys
from collections import Counter

sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


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


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n = read_int_list()
    c = Counter(n)
    for i in c:
        if c[i] == 1:
            res = i
            print(res)


main()

Submission status: Runtime Error

Solution code:
import sys


sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


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


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    a, b, c = read_int_list()
    if a != b and a == c:
        print(b)
    elif a != c and b == c:
        print(a)
    else:
        print(c)


main()

Submission status: Runtime Error

Solution code:
#https://beta.atcoder.jp/contests/abc075
# -*- coding: utf-8 -*-
from collections import Counter
import sys

n,m = map(int,input().split())
line = []
for _ in range(m):
    line.append(list(map(int,input().split())))

line_count = []
for i in line:
    line_count.append(i[0])
    line_count.append(i[1])
line_count = Counter(line_count)

start_point = []
for k,v in line_count.items():
    if v == 1: start_point.append(k)
if len(start_point) == 0:
    print(0)
    sys.exit()

counter = 0
while(True):
    start_point_bu = start_point
    start_point = []
    for i in start_point_bu:
        for index,j in enumerate(line):
            if i in j:
                if j[0] == i : start_point.append(j[1])
                if j[1] == i : start_point.append(j[0])
                line.pop(index)
                counter+=1
            break
    if len(start_point)==0: break
print(counter)

Submission status: Runtime Error

Solution code:
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
INF = float("inf")


memo1 = {}
memo2 = {}

def ok(y1, y2, x1, x2, yd, yd2, xd, xd2, K):
    global memo1, memo2
    if (y1, y2) in memo1:
        a, b = memo1[(y1, y2)]
    else:
        a = yd2[y1]
        b = yd[y2]
        memo1[(y1, y2)] = (a, b)
    y = b.difference(a)

    if (x1, x2) in memo2:
        c, d =memo2[(x1, x2)]
    else:
        c = xd2[x1]
        d = xd[x2]
        memo2[(x1, x2)] = (c, d)

    x = d.difference(c)
    # print(a, b, c, d)
    # print(y, x)

    n = len(y & x)

    return n >= K


def main():
    N, K = map(int, input().split())
    f = []
    ys, xs = [], []
    for i in range(N):
        x, y = map(int, input().split())
        f.append((y, x))
        ys.append((y, i))
        xs.append((x, i))

    ys.sort()
    yd = defaultdict(set)
    yd2 = defaultdict(set)
    old = set()
    for y, i in ys:
        yd2[y] = old.copy()
        old.add(i)
        yd[y] = old.copy()

    xs.sort()
    xd = defaultdict(set)
    xd2 = defaultdict(set)
    old = set()
    for x, i in xs:
        xd2[x] = old.copy()
        old.add(i)
        xd[x] = old.copy()

    ans = INF

    # print(yd)
    # print(xd)
    #
    # print(ok(1, 4, 1, 8, yd, yd2, xd, xd2, K))
    for i, j in combinations(range(N), 2):
        for k, l in combinations(range(N), 2):
            a, b, c, d = ys[i], ys[j], xs[k], xs[l]
            y1 = min([a[0], b[0]])
            y2 = max([a[0], b[0]])

            x1 = min([c[0], d[0]])
            x2 = max([c[0], d[0]])

            # print(i, j)
            # print(x1, x2, abs(x1 - x2))
            # print(y1, y2, abs(y1 - y2))
            # print(ok(y1, y2, x1, x2, yd, yd2, xd, xd2, K))
            if ok(y1, y2, x1, x2, yd, yd2, xd, xd2, K):
                ans = min(ans, abs(x1 - x2) * abs(y1 - y2))

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys


sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


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


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    a, b, c = read_int_list()
    if a == b:
        print(c)
    elif a == c:
        print(b)
    else:
        print(a)


main()

Submission status: Runtime Error

Solution code:
import sys


sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


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


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    a, b, c = read_int_list()
    if a == b:
        print(c)
    if a == c:
        print(b)
    if b == c:
        print(a)


main()

Submission status: Runtime Error

Solution code:
import numpy as np

l = map(int, input().split())
if l[0]==l[1]:
	print(l[2])
elif l[0] ==l[2]:
	print(l[1])
elif l[1] ==l[2]:
	print(l[0])

Submission status: Runtime Error

Solution code:
import numpy as np

l = map(int, raw_input().split())
if l[0]==l[1]:
	print(l[2])
elif l[0] ==l[2]:
	print(l[1])
elif l[1] ==l[2]:
	print(l[0])

Submission status: Runtime Error

Solution code:
import numpy as np

l = map(int, raw_input().split())
if l[0]==l[1]:
  print(l[2])
elif l[0] ==l[2]:
  print(l[1])
elif l[1] ==l[2]:
  print(l[0])

Submission status: Runtime Error

Solution code:
from sys import stdin
n,k = map(int,stdin.readline().split())
a = []
for i in xrange(n):
 a.append(map(int,stdin.readline().split()))
def solve(i,j):
 cnt = 0
 minx = min(a[i][0],a[j][0])
 maxx =  max(a[i][0],a[j][0])
 miny = min(a[i][1],a[j][1])
 maxy = max(a[i][1],a[j][1])
 #print "solving",i,j,minx,maxx,miny,maxy
 for m in xrange(n):
  if a[m][0]>=minx and a[m][0]<=maxx and a[m][1]>=miny and a[m][1]<=maxy:
   cnt+=1
 #print "has",cnt
 if cnt>=k:
  return (maxx-minx)*(maxy-miny)
 return 10**100
ans = 10**50
for i in xrange(n):
 for j in xrange(i+1,n):
  ans = min(ans,solve(i,j))
print ans

Submission status: Runtime Error

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

nums = input().split()
set_nums = list(set(nums))
other = sum(nums) - sum(set_nums)
set_nums.remove(other)
print(set_nums[0])