DO YOU EXPECT ME TO FIND THIS OUT?

WHAT BASE AND/XOR LANGUAGE INCLUDES string?

DON'T BYTE OF MORE THAN YOU CAN CHEW

YOU CAN ONLY DISTORT THE LARGEST OF MATHEMATICS SO FAR

SAYING "ABRACADABRA" WITHOUT A MAGIC AND WON'T DO YOU ANY GOOD

THE LAST STACK RUPTURES. ALL DIE. OH, THE EMBARRASSMENT!

I HAVE NO ARRAY AND I MUST SCREAM

ELEMENTS MAY NOT BE STORED IN WEST HYPERSPACE


-----Input-----

The first line of input data contains a single integer n (1 ≤ n ≤ 10).

The second line of input data contains n space-separated integers a_{i} (1 ≤ a_{i} ≤ 11).


-----Output-----

Output a single integer.


-----Example-----
Input
4
2 5 3 1

Output
4

Difficulty: MEDIUM_HARD
Tags: Implementation

Starter code:

Solutions:
n = int(input())
s = input().split()
x = int(s[len(s) - 1])
s = list(map(int, s))
print(max(s) ^ x)


a = list(map(int, [input() for _ in range(2)][1].split()))
print(a[-1] ^ max(a))


input()
l = list(map(int, input().split()))
x = max(l) ^ l[-1]
print(x)


a = int(input())
ar = [0 for i in range(a)]
ar = input().split(' ')
for i in range(a):
	ar[i] = int(ar[i])
print(max(ar) ^ ar[a - 1])


N = int(input())
A = list(map(int, input().split()))
print(max(A) ^ A[N - 1])


input()
a = list(map(int, input().split()))
print(max(a) ^ a[-1])


input()
a = [int(x) for x in input().split()]
print(max(a) ^ a[-1])


_ = int(input())
a = [int(i) for i in input().split()]
print(max(a) ^ a[-1])


n = int(input())
l = list(map(int, input().split()))
print(max(l) ^ l[-1])


n = int(input())
L = [int(_) for _ in input().split()]
print(L[n - 1] ^ max(L))


n = int(input())
lis = [*map(int, input().split())]
print(max(lis) ^ lis[-1])


n = int(input())
l = tuple(map(int, input().split()))
print(max(l) ^ l[len(l) - 1])


n = int(input())
a = list(map(int, input().strip().split()))
print(max(a) ^ a[len(a) - 1])


n = int(input())
a = list(map(int, input().split()))
x = max(a)
print(x ^ a[-1])


n = int(input())
A = [int(x) for x in input().split()]
print(A[-1] ^ max(A))


import sys
vec = []
for line in sys.stdin:
	vec.extend(line.split())
vec = [int(x) for x in vec[1:]]
a = int(max(vec))
b = int(vec[-1])
print(a ^ b)


n = int(input())
a = [int(x) for x in input().split()]
ans = max(a) ^ a[-1]
print(ans)


n = int(input())
l = [int(x) for x in input().split(' ')]
print(l[-1] ^ max(l))


n = int(input())
m = list(map(int, input().split()))
print(max(m) ^ m[-1])


input()
l = [int(i) for i in input().split()]
print(max(l) ^ l[-1])


x = int(input())
arr = input().split()
arri = []
for i in range(len(arr)):
	arri.append(int(arr[i]))
print(max(arri) ^ arri[-1])


n = int(input())
a = [int(x) for x in input().split()]
k = max(a)
print(k ^ a[-1])


n = int(input())
a1 = input().split()
a = [int(a1[i]) for i in range(len(a1))]
print(max(a) ^ a[-1])


input()
arr = list(map(int, input().split()))
print(max(arr) ^ arr[-1])


_ = input()
n = list(map(int, input().split()))
print(n[-1] ^ max(n))


def main():
	try:
		while True:
			input()
			a = list(map(int, input().split()))
			print(max(a) ^ a[-1])
	except EOFError:
		pass
main()


input()
ls = list(map(int, input().split()))
print(max(ls) ^ ls[-1])


def intercalc(lst):
	return max(lst) ^ lst[-1]
n = int(input())
a = [int(i) for i in input().split()]
print(intercalc(a))


def mp():
	return map(int, input().split())
n = int(input())
a = list(mp())
print(max(a) ^ a[-1])


n = int(input())
c = list(map(int, input().split()))
print(max(c) ^ c[-1])


size = int(input())
a = [int(i) for i in input().split()]
print(max(a) ^ a[-1])