-
Notifications
You must be signed in to change notification settings - Fork 0
/
b.py
38 lines (32 loc) · 785 Bytes
/
b.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#Problem : Giga Ball++
#Language : Python
#Compiled Using : py_compile
#Version : Python 2.7.1
#Input for your program will be provided from STDIN
#Print out all output from your program to STDOUT
import sys
l = int(raw_input())
m = int(raw_input())
n = int(raw_input())
a = []
b = []
c = []
for i in range(l):
a.append(int(raw_input())
for i in range(m):
b.append(int(raw_input())
for i in range(n):
c.append(int(raw_input())
mm = {}
maxs = -1
for x in range(l):
for y in range(m):
for z in range(n):
s = a[x]+b[y]+c[z]
if s in mm:
mm[s] += 1
else:
mm[s] = 1
if (maxs == -1) or (mm[maxs] < mm[s]):
maxs = s
print maxs