node_ids
sequencelengths 4
1.4k
| edge_index
sequencelengths 1
2.22k
| text
sequencelengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
4,
13,
13,
41,
28,
13,
4,
13,
17,
2,
17,
13,
17,
4,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
13,
4,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
13,
13
] | [
[
57,
2
],
[
10,
9
],
[
9,
18
],
[
54,
20
],
[
27,
26
],
[
58,
32
],
[
55,
38
],
[
26,
39
],
[
55,
41
],
[
26,
43
],
[
60,
46
],
[
61,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"n = int(input())\nl = sorted([int(i) for i in input().split()])\n\nl2 = [min(l[i],l[i-1]) for i in range(1,2*n,2)]\n\nprint(sum(l2))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"l = sorted([int(i) for i in input().split()])",
"l",
"sorted([int(i) for i in input().split()])",
"sorted",
"[int(i) for i in input().split()]",
"min(l[i],l[i-1]) for i in range(1,2*n,2)",
"for i in range(1,2*n,2)",
"i",
"range(1,2*n,2)",
"range",
"1",
"2*n",
"2",
"n",
"2",
"for i in range(1,2*n,2)",
"min(l[i],l[i-1])",
"min",
"l[i]",
"l",
"i",
"l[i-1]",
"l",
"i-1",
"i",
"1",
"l2 = [min(l[i],l[i-1]) for i in range(1,2*n,2)]",
"l2",
"[min(l[i],l[i-1]) for i in range(1,2*n,2)]",
"print(sum(l2))",
"print",
"sum(l2)",
"sum",
"l2",
"l = sorted([int(i) for i in input().split()])",
"sorted([int(i) for i in input().split()])",
"l",
"n = int(input())",
"int(input())",
"n",
"l2 = [min(l[i],l[i-1]) for i in range(1,2*n,2)]",
"[min(l[i],l[i-1]) for i in range(1,2*n,2)]",
"l2"
] | n = int(input())
l = sorted([int(i) for i in input().split()])
l2 = [min(l[i],l[i-1]) for i in range(1,2*n,2)]
print(sum(l2))
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
4,
13,
18,
13,
39,
13,
2,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
13,
13,
10,
4,
13
] | [
[
62,
2
],
[
10,
9
],
[
9,
18
],
[
59,
20
],
[
60,
24
],
[
53,
27
],
[
31,
30
],
[
60,
36
],
[
56,
39
],
[
60,
43
],
[
30,
47
],
[
57,
51
],
[
54,
51
],
[
53,
54
],
[
56,
57
],
[
59,
60
],
[
62,
63
]
] | [
"n=int(input())\na=[int(x) for x in input().split()]\na.sort()\nss=0\nfor i in range(0,len(a),2):\n ss+=min(a[i:i+2])\nprint(ss)",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split()",
"for x in input().split()",
"x",
"input().split()",
"().split",
"()",
"input",
"split",
"for x in input().split()",
"int(x)",
"int",
"x",
"a=[int(x) for x in input().split()]",
"a",
"[int(x) for x in input().split()]",
"a.sort()",
"a.sort",
"a",
"sort",
"ss=0",
"ss",
"0",
"for i in range(0,len(a),2):\n ss+=min(a[i:i+2])",
"i",
"range(0,len(a),2)",
"range",
"0",
"len(a)",
"len",
"a",
"2",
"ss+=min(a[i:i+2])",
"ss",
"min(a[i:i+2])",
"min",
"a[i:i+2]",
"a",
"i:i+2",
"i",
"i+2",
"i",
"2",
"print(ss)",
"print",
"ss",
"ss=0",
"0",
"ss",
"ss+=min(a[i:i+2])",
"min(a[i:i+2])",
"ss",
"a=[int(x) for x in input().split()]",
"[int(x) for x in input().split()]",
"a",
"n=int(input())",
"int(input())",
"n"
] | n=int(input())
a=[int(x) for x in input().split()]
a.sort()
ss=0
for i in range(0,len(a),2):
ss+=min(a[i:i+2])
print(ss) |
[
7,
15,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
4,
18,
13,
13,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13
] | [
[
51,
4
],
[
63,
11
],
[
52,
15
],
[
57,
17
],
[
52,
26
],
[
54,
29
],
[
58,
33
],
[
37,
36
],
[
64,
39
],
[
60,
41
],
[
58,
43
],
[
36,
46
],
[
61,
49
],
[
55,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
]
] | [
"import sys\ninput = sys.stdin.readline\n\nn = int(input())\nl = list(map(int, input().split()))\nsum = 0\nl.sort()\nfor i in range(n):\n sum += l[2*i]\nprint(sum)",
"import sys",
"sys",
"input = sys.stdin.readline",
"input",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"sum = 0",
"sum",
"0",
"l.sort()",
"l.sort",
"l",
"sort",
"for i in range(n):\n sum += l[2*i]",
"i",
"range(n)",
"range",
"n",
"sum += l[2*i]",
"sum",
"l[2*i]",
"l",
"2*i",
"2",
"i",
"print(sum)",
"print",
"sum",
"input = sys.stdin.readline",
"sys.stdin.readline",
"input",
"sum = 0",
"0",
"sum",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l",
"sum += l[2*i]",
"l[2*i]",
"sum",
"n = int(input())",
"int(input())",
"n"
] | import sys
input = sys.stdin.readline
n = int(input())
l = list(map(int, input().split()))
sum = 0
l.sort()
for i in range(n):
sum += l[2*i]
print(sum) |
[
7,
15,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
2,
2,
17,
17,
17,
0,
13,
4,
13,
17,
4,
18,
13,
13,
2,
17,
17,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
2,
13,
10,
18,
13,
10,
4,
13
] | [
[
74,
4
],
[
71,
11
],
[
77,
18
],
[
33,
32
],
[
75,
36
],
[
39,
38
],
[
75,
47
],
[
38,
51
],
[
38,
58
],
[
69,
66
],
[
71,
72
],
[
74,
75
],
[
77,
78
]
] | [
"import sys\n\nreadline = sys.stdin.readline\nMOD = 10 ** 9 + 7\nINF = float('INF')\nsys.setrecursionlimit(10 ** 5)\n\n\ndef main():\n n = int(readline())\n l = list(map(int, readline().split()))\n l.sort()\n\n print(sum(l[::2]))\n\n\nif __name__ == '__main__':\n main()",
"import sys",
"sys",
"readline = sys.stdin.readline",
"readline",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"MOD = 10 ** 9 + 7",
"MOD",
"10 ** 9 + 7",
"10 ** 9",
"10",
"9",
"7",
"INF = float('INF')",
"INF",
"float('INF')",
"float",
"'INF'",
"sys.setrecursionlimit(10 ** 5)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"10 ** 5",
"10",
"5",
"def main():\n n = int(readline())\n l = list(map(int, readline().split()))\n l.sort()\n\n print(sum(l[::2]))",
"main",
"n = int(readline())",
"n",
"int(readline())",
"int",
"readline()",
"readline",
"l = list(map(int, readline().split()))",
"l",
"list(map(int, readline().split()))",
"list",
"map(int, readline().split())",
"map",
"int",
"readline().split()",
"().split",
"()",
"readline",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"print(sum(l[::2]))",
"print",
"sum(l[::2])",
"sum",
"l[::2]",
"l",
"::2",
"2",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def main():\n n = int(readline())\n l = list(map(int, readline().split()))\n l.sort()\n\n print(sum(l[::2]))",
"def main():\n n = int(readline())\n l = list(map(int, readline().split()))\n l.sort()\n\n print(sum(l[::2]))",
"main",
"MOD = 10 ** 9 + 7",
"10 ** 9 + 7",
"MOD",
"readline = sys.stdin.readline",
"sys.stdin.readline",
"readline",
"INF = float('INF')",
"float('INF')",
"INF"
] | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
n = int(readline())
l = list(map(int, readline().split()))
l.sort()
print(sum(l[::2]))
if __name__ == '__main__':
main()
|
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
17,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
12,
11
],
[
11,
20
],
[
23,
22
],
[
22,
26
],
[
22,
33
],
[
45,
42
]
] | [
"def main():\n n = int(input())\n l = [int(x) for x in input().split()]\n l.sort()\n print(sum(l[0::2]))\n\n\nif __name__ == '__main__':\n main()\n",
"def main():\n n = int(input())\n l = [int(x) for x in input().split()]\n l.sort()\n print(sum(l[0::2]))",
"main",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split()",
"for x in input().split()",
"x",
"input().split()",
"().split",
"()",
"input",
"split",
"for x in input().split()",
"int(x)",
"int",
"x",
"l = [int(x) for x in input().split()]",
"l",
"[int(x) for x in input().split()]",
"l.sort()",
"l.sort",
"l",
"sort",
"print(sum(l[0::2]))",
"print",
"sum(l[0::2])",
"sum",
"l[0::2]",
"l",
"0::2",
"0",
"2",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def main():\n n = int(input())\n l = [int(x) for x in input().split()]\n l.sort()\n print(sum(l[0::2]))",
"def main():\n n = int(input())\n l = [int(x) for x in input().split()]\n l.sort()\n print(sum(l[0::2]))",
"main"
] | def main():
n = int(input())
l = [int(x) for x in input().split()]
l.sort()
print(sum(l[0::2]))
if __name__ == '__main__':
main()
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
51,
2
],
[
57,
8
],
[
58,
21
],
[
54,
24
],
[
28,
27
],
[
52,
31
],
[
27,
36
],
[
48,
40
],
[
58,
42
],
[
27,
43
],
[
49,
46
],
[
55,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nl.sort()\nres = 0\nfor i in range(n*2):\n if i%2==0:\n res += l[i]\nprint(res)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"res = 0",
"res",
"0",
"for i in range(n*2):\n if i%2==0:\n res += l[i]",
"i",
"range(n*2)",
"range",
"n*2",
"n",
"2",
"if i%2==0:\n res += l[i]",
"i%2==0",
"i%2",
"i",
"2",
"0",
"res += l[i]",
"res",
"l[i]",
"l",
"i",
"print(res)",
"print",
"res",
"res += l[i]",
"l[i]",
"res",
"n = int(input())",
"int(input())",
"n",
"res = 0",
"0",
"res",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l"
] | n = int(input())
l = list(map(int,input().split()))
l.sort()
res = 0
for i in range(n*2):
if i%2==0:
res += l[i]
print(res) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
39,
28,
13,
4,
13,
13,
4,
18,
13,
13,
18,
13,
2,
17,
13,
4,
13,
4,
13,
13,
10,
39,
13,
10,
4,
13,
10,
4,
13
] | [
[
47,
2
],
[
50,
8
],
[
44,
22
],
[
26,
25
],
[
48,
28
],
[
45,
31
],
[
51,
34
],
[
25,
37
],
[
45,
42
],
[
44,
45
],
[
47,
48
],
[
50,
51
]
] | [
"N = int(input())\na = sorted(list(map(int, input().split())))\n\nres =[]\nfor i in range(N):\n res.append(a[2*i])\n\nprint(sum(res))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"a = sorted(list(map(int, input().split())))",
"a",
"sorted(list(map(int, input().split())))",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"res =[]",
"res",
"[]",
"for i in range(N):\n res.append(a[2*i])",
"i",
"range(N)",
"range",
"N",
"res.append(a[2*i])",
"res.append",
"res",
"append",
"a[2*i]",
"a",
"2*i",
"2",
"i",
"print(sum(res))",
"print",
"sum(res)",
"sum",
"res",
"res =[]",
"[]",
"res",
"N = int(input())",
"int(input())",
"N",
"a = sorted(list(map(int, input().split())))",
"sorted(list(map(int, input().split())))",
"a"
] | N = int(input())
a = sorted(list(map(int, input().split())))
res =[]
for i in range(N):
res.append(a[2*i])
print(sum(res)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
13,
17,
0,
13,
18,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
18,
13,
10,
17,
13
] | [
[
61,
2
],
[
64,
8
],
[
65,
21
],
[
73,
24
],
[
28,
27
],
[
62,
31
],
[
70,
34
],
[
65,
36
],
[
27,
37
],
[
65,
40
],
[
44,
43
],
[
47,
46
],
[
62,
50
],
[
67,
53
],
[
65,
55
],
[
46,
56
],
[
68,
59
],
[
71,
59
],
[
74,
59
],
[
61,
62
],
[
64,
65
],
[
67,
68
],
[
70,
71
],
[
73,
74
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\nL.sort()\nans = 0\nfor i in range(0,N,2):\n ans += L[i]\nL.sort(reverse=True)\nfor i in range(1,N,2):\n ans += L[i]\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0,N,2):\n ans += L[i]",
"i",
"range(0,N,2)",
"range",
"0",
"N",
"2",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"L.sort(reverse=True)",
"L.sort",
"L",
"sort",
"reverse=True",
"reverse",
"True",
"for i in range(1,N,2):\n ans += L[i]",
"i",
"range(1,N,2)",
"range",
"1",
"N",
"2",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"print(ans)",
"print",
"ans",
"N = int(input())",
"int(input())",
"N",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"ans += L[i]",
"L[i]",
"ans",
"ans += L[i]",
"L[i]",
"ans",
"ans = 0",
"0",
"ans"
] | N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
for i in range(0,N,2):
ans += L[i]
L.sort(reverse=True)
for i in range(1,N,2):
ans += L[i]
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
17,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
57,
2
],
[
54,
8
],
[
66,
11
],
[
67,
24
],
[
63,
27
],
[
31,
30
],
[
55,
35
],
[
58,
35
],
[
60,
39
],
[
67,
43
],
[
30,
44
],
[
67,
46
],
[
30,
48
],
[
61,
52
],
[
64,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
],
[
66,
67
]
] | [
"n = int(input())\nn *= 2\nskewers = list(map(int, input().split()))\n\nskewers.sort()\neats = 0\nfor i in range(0, n-1, 2):\n eats += min(skewers[i], skewers[i + 1])\n \n \nprint(eats)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"n *= 2",
"n",
"2",
"skewers = list(map(int, input().split()))",
"skewers",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"skewers.sort()",
"skewers.sort",
"skewers",
"sort",
"eats = 0",
"eats",
"0",
"for i in range(0, n-1, 2):\n eats += min(skewers[i], skewers[i + 1])\n \n ",
"i",
"range(0, n-1, 2)",
"range",
"0",
"n-1",
"n",
"1",
"2",
"eats += min(skewers[i], skewers[i + 1])",
"eats",
"min(skewers[i], skewers[i + 1])",
"min",
"skewers[i]",
"skewers",
"i",
"skewers[i + 1]",
"skewers",
"i + 1",
"i",
"1",
"print(eats)",
"print",
"eats",
"n *= 2",
"2",
"n",
"n = int(input())",
"int(input())",
"n",
"eats += min(skewers[i], skewers[i + 1])",
"min(skewers[i], skewers[i + 1])",
"eats",
"eats = 0",
"0",
"eats",
"skewers = list(map(int, input().split()))",
"list(map(int, input().split()))",
"skewers"
] | n = int(input())
n *= 2
skewers = list(map(int, input().split()))
skewers.sort()
eats = 0
for i in range(0, n-1, 2):
eats += min(skewers[i], skewers[i + 1])
print(eats) |
[
7,
38,
5,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
40,
2,
13,
17,
17,
4,
18,
13,
13,
18,
13,
13,
4,
13,
4,
13,
13,
10,
39,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
65,
4
],
[
62,
10
],
[
59,
20
],
[
63,
23
],
[
26,
25
],
[
56,
28
],
[
32,
31
],
[
60,
36
],
[
31,
40
],
[
57,
45
],
[
60,
48
],
[
31,
49
],
[
57,
54
],
[
56,
57
],
[
59,
60
],
[
62,
63
],
[
65,
66
]
] | [
"try:\n N = int(input())\n a = map(int, input().split())\n a_ = sorted(a, reverse=True)\n b = []\n for i in range(len(a_)):\n if i%2!=0:\n b.append(a_[i])\n print(sum(b))\nexcept EOFError:\n pass",
"try:\n N = int(input())\n a = map(int, input().split())\n a_ = sorted(a, reverse=True)\n b = []\n for i in range(len(a_)):\n if i%2!=0:\n b.append(a_[i])\n print(sum(b))\nexcept EOFError:\n pass",
"except EOFError:\n pass",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"a = map(int, input().split())",
"a",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"a_ = sorted(a, reverse=True)",
"a_",
"sorted(a, reverse=True)",
"sorted",
"a",
"reverse=True",
"reverse",
"True",
"b = []",
"b",
"[]",
"for i in range(len(a_)):\n if i%2!=0:\n b.append(a_[i])\n ",
"i",
"range(len(a_))",
"range",
"len(a_)",
"len",
"a_",
"if i%2!=0:\n b.append(a_[i])\n ",
"i%2!=0",
"i%2",
"i",
"2",
"0",
"b.append(a_[i])",
"b.append",
"b",
"append",
"a_[i]",
"a_",
"i",
"print(sum(b))",
"print",
"sum(b)",
"sum",
"b",
"b = []",
"[]",
"b",
"a_ = sorted(a, reverse=True)",
"sorted(a, reverse=True)",
"a_",
"a = map(int, input().split())",
"map(int, input().split())",
"a",
"N = int(input())",
"int(input())",
"N"
] | try:
N = int(input())
a = map(int, input().split())
a_ = sorted(a, reverse=True)
b = []
for i in range(len(a_)):
if i%2!=0:
b.append(a_[i])
print(sum(b))
except EOFError:
pass |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
42,
2,
13,
2,
4,
13,
13,
17,
0,
13,
18,
13,
13,
0,
13,
17,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
54,
2
],
[
45,
6
],
[
51,
20
],
[
57,
23
],
[
52,
27
],
[
61,
27
],
[
46,
31
],
[
48,
34
],
[
46,
36
],
[
52,
37
],
[
61,
37
],
[
60,
39
],
[
49,
43
],
[
58,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nn = input()\nl = sorted(list(map(int, input().split())))\ni = 0\nsum = 0\nwhile (i < len(l) - 1):\n sum += l[i]\n i += 2\nprint(sum)",
"n = input()",
"n",
"input()",
"input",
"l = sorted(list(map(int, input().split())))",
"l",
"sorted(list(map(int, input().split())))",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"i = 0",
"i",
"0",
"sum = 0",
"sum",
"0",
"while (i < len(l) - 1):\n sum += l[i]\n i += 2",
"i < len(l) - 1",
"i",
"len(l) - 1",
"len(l)",
"len",
"l",
"1",
"sum += l[i]",
"sum",
"l[i]",
"l",
"i",
"i += 2",
"i",
"2",
"print(sum)",
"print",
"sum",
"l = sorted(list(map(int, input().split())))",
"sorted(list(map(int, input().split())))",
"l",
"sum += l[i]",
"l[i]",
"sum",
"i = 0",
"0",
"i",
"n = input()",
"input()",
"n",
"sum = 0",
"0",
"sum",
"i += 2",
"2",
"i"
] | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
n = input()
l = sorted(list(map(int, input().split())))
i = 0
sum = 0
while (i < len(l) - 1):
sum += l[i]
i += 2
print(sum)
|
[
7,
15,
13,
0,
13,
18,
18,
18,
13,
13,
13,
13,
0,
13,
18,
18,
18,
13,
13,
13,
13,
0,
13,
18,
18,
18,
13,
13,
13,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
31,
13,
4,
18,
13,
13,
0,
13,
4,
13,
18,
13,
39,
17,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
18,
13,
10,
4,
13
] | [
[
58,
4
],
[
64,
13
],
[
67,
22
],
[
61,
31
],
[
59,
38
],
[
61,
40
],
[
70,
47
],
[
71,
56
],
[
58,
59
],
[
61,
62
],
[
64,
65
],
[
67,
68
],
[
70,
71
]
] | [
"import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN,*L = map(int,read().split())\n\nL.sort()\nanswer = sum(L[::2])\nprint(answer)",
"import sys",
"sys",
"read = sys.stdin.buffer.read",
"read",
"sys.stdin.buffer.read",
"sys.stdin.buffer",
"sys.stdin",
"sys",
"stdin",
"buffer",
"read",
"readline = sys.stdin.buffer.readline",
"readline",
"sys.stdin.buffer.readline",
"sys.stdin.buffer",
"sys.stdin",
"sys",
"stdin",
"buffer",
"readline",
"readlines = sys.stdin.buffer.readlines",
"readlines",
"sys.stdin.buffer.readlines",
"sys.stdin.buffer",
"sys.stdin",
"sys",
"stdin",
"buffer",
"readlines",
"N,*L = map(int,read().split())",
"N",
"map(int,read().split())",
"map",
"int",
"read().split()",
"().split",
"()",
"read",
"split",
"*L",
"L",
"L.sort()",
"L.sort",
"L",
"sort",
"answer = sum(L[::2])",
"answer",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"print(answer)",
"print",
"answer",
"read = sys.stdin.buffer.read",
"sys.stdin.buffer.read",
"read",
"N,*L = map(int,read().split())",
"map(int,read().split())",
"N",
"readline = sys.stdin.buffer.readline",
"sys.stdin.buffer.readline",
"readline",
"readlines = sys.stdin.buffer.readlines",
"sys.stdin.buffer.readlines",
"readlines",
"answer = sum(L[::2])",
"sum(L[::2])",
"answer"
] | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N,*L = map(int,read().split())
L.sort()
answer = sum(L[::2])
print(answer) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
4,
13,
13,
42,
2,
13,
13,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
63,
2
],
[
66,
8
],
[
67,
21
],
[
69,
24
],
[
75,
27
],
[
57,
30
],
[
67,
33
],
[
76,
36
],
[
73,
36
],
[
58,
37
],
[
60,
39
],
[
67,
43
],
[
76,
44
],
[
73,
44
],
[
67,
46
],
[
76,
48
],
[
73,
48
],
[
72,
51
],
[
61,
55
],
[
70,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
],
[
66,
67
],
[
69,
70
],
[
72,
73
],
[
75,
76
]
] | [
"n = int(input())\n \narr = list(map(int, input().split()))\n\narr.sort()\n\nres = 0\ni=0\nl = len(arr)\nwhile i<l:\n res+=min(arr[i], arr[i+1])\n i+=2\n \nprint(res)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"arr = list(map(int, input().split()))",
"arr",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"arr.sort()",
"arr.sort",
"arr",
"sort",
"res = 0",
"res",
"0",
"i=0",
"i",
"0",
"l = len(arr)",
"l",
"len(arr)",
"len",
"arr",
"while i<l:\n res+=min(arr[i], arr[i+1])\n i+=2\n ",
"i<l",
"i",
"l",
"res+=min(arr[i], arr[i+1])",
"res",
"min(arr[i], arr[i+1])",
"min",
"arr[i]",
"arr",
"i",
"arr[i+1]",
"arr",
"i+1",
"i",
"1",
"i+=2",
"i",
"2",
"print(res)",
"print",
"res",
"l = len(arr)",
"len(arr)",
"l",
"res+=min(arr[i], arr[i+1])",
"min(arr[i], arr[i+1])",
"res",
"n = int(input())",
"int(input())",
"n",
"arr = list(map(int, input().split()))",
"list(map(int, input().split()))",
"arr",
"res = 0",
"0",
"res",
"i+=2",
"2",
"i",
"i=0",
"0",
"i"
] | n = int(input())
arr = list(map(int, input().split()))
arr.sort()
res = 0
i=0
l = len(arr)
while i<l:
res+=min(arr[i], arr[i+1])
i+=2
print(res)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
47,
2
],
[
50,
8
],
[
51,
21
],
[
53,
24
],
[
28,
27
],
[
51,
33
],
[
44,
36
],
[
51,
38
],
[
27,
39
],
[
45,
42
],
[
54,
42
],
[
44,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
]
] | [
"# -*- coding: utf-8 -*-\n\nn = int(input())\nl = list(map(int,input().split()))\n\nl.sort()\n\nans = 0\nfor i in range(0,len(l),2):\n ans += l[i]\n\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0,len(l),2):\n ans += l[i]",
"i",
"range(0,len(l),2)",
"range",
"0",
"len(l)",
"len",
"l",
"2",
"ans += l[i]",
"ans",
"l[i]",
"l",
"i",
"print(ans)",
"print",
"ans",
"ans += l[i]",
"l[i]",
"ans",
"n = int(input())",
"int(input())",
"n",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"ans = 0",
"0",
"ans"
] | # -*- coding: utf-8 -*-
n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0
for i in range(0,len(l),2):
ans += l[i]
print(ans)
|
[
7,
15,
0,
13,
17,
0,
13,
4,
13,
4,
18,
4,
18,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
18,
4,
18,
13,
13,
13,
13,
4,
18,
13,
13,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
68,
3
],
[
62,
6
],
[
65,
17
],
[
66,
35
],
[
39,
38
],
[
63,
41
],
[
71,
43
],
[
66,
47
],
[
38,
50
],
[
66,
52
],
[
38,
56
],
[
72,
60
],
[
69,
60
],
[
62,
63
],
[
65,
66
],
[
68,
69
],
[
71,
72
]
] | [
"from sys import stdin\npoint = 0\nn = int(stdin.readline().rstrip())\nli = list(map(int,stdin.readline().rstrip().split()))\nli.sort()\nfor i in range(n):\n point += min(li[2*i],li[2*i+1])\nprint(point)",
"from sys import stdin",
"point = 0",
"point",
"0",
"n = int(stdin.readline().rstrip())",
"n",
"int(stdin.readline().rstrip())",
"int",
"stdin.readline().rstrip()",
"stdin.readline().rstrip",
"stdin.readline()",
"stdin.readline",
"stdin",
"readline",
"rstrip",
"li = list(map(int,stdin.readline().rstrip().split()))",
"li",
"list(map(int,stdin.readline().rstrip().split()))",
"list",
"map(int,stdin.readline().rstrip().split())",
"map",
"int",
"stdin.readline().rstrip().split()",
"stdin.readline().rstrip().split",
"stdin.readline().rstrip()",
"stdin.readline().rstrip",
"stdin.readline()",
"stdin.readline",
"stdin",
"readline",
"rstrip",
"split",
"li.sort()",
"li.sort",
"li",
"sort",
"for i in range(n):\n point += min(li[2*i],li[2*i+1])",
"i",
"range(n)",
"range",
"n",
"point += min(li[2*i],li[2*i+1])",
"point",
"min(li[2*i],li[2*i+1])",
"min",
"li[2*i]",
"li",
"2*i",
"2",
"i",
"li[2*i+1]",
"li",
"2*i+1",
"2*i",
"2",
"i",
"1",
"print(point)",
"print",
"point",
"n = int(stdin.readline().rstrip())",
"int(stdin.readline().rstrip())",
"n",
"li = list(map(int,stdin.readline().rstrip().split()))",
"list(map(int,stdin.readline().rstrip().split()))",
"li",
"point = 0",
"0",
"point",
"point += min(li[2*i],li[2*i+1])",
"min(li[2*i],li[2*i+1])",
"point"
] | from sys import stdin
point = 0
n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
li.sort()
for i in range(n):
point += min(li[2*i],li[2*i+1])
print(point) |
[
7,
17,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13
] | [
[
46,
3
],
[
58,
9
],
[
49,
21
],
[
59,
24
],
[
55,
26
],
[
30,
29
],
[
47,
35
],
[
52,
38
],
[
50,
40
],
[
59,
40
],
[
29,
41
],
[
53,
44
],
[
56,
44
],
[
46,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
]
] | [
"\"#!/usr/bin/env python3\"\n\nN = int(input())\nL = list(map(int,input().split()))\n\nL = sorted(L)\n\nans = 0\nfor i in range(0, 2*N, 2) :\n ans += L[i]\n\nprint(ans)",
"\"#!/usr/bin/env python3\"",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L = sorted(L)",
"L",
"sorted(L)",
"sorted",
"L",
"ans = 0",
"ans",
"0",
"for i in range(0, 2*N, 2) :\n ans += L[i]",
"i",
"range(0, 2*N, 2)",
"range",
"0",
"2*N",
"2",
"N",
"2",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"print(ans)",
"print",
"ans",
"N = int(input())",
"int(input())",
"N",
"L = sorted(L)",
"sorted(L)",
"L",
"ans += L[i]",
"L[i]",
"ans",
"ans = 0",
"0",
"ans",
"L = list(map(int,input().split()))",
"list(map(int,input().split()))",
"L"
] | "#!/usr/bin/env python3"
N = int(input())
L = list(map(int,input().split()))
L = sorted(L)
ans = 0
for i in range(0, 2*N, 2) :
ans += L[i]
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13
] | [
[
51,
2
],
[
45,
8
],
[
46,
21
],
[
42,
24
],
[
28,
27
],
[
52,
30
],
[
48,
32
],
[
46,
34
],
[
27,
37
],
[
49,
40
],
[
43,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\n \nL.sort()\ns = 0\n \nfor n in range(N):\n s += L[2*n]\n \nprint(s)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"s = 0",
"s",
"0",
"for n in range(N):\n s += L[2*n]\n ",
"n",
"range(N)",
"range",
"N",
"s += L[2*n]",
"s",
"L[2*n]",
"L",
"2*n",
"2",
"n",
"print(s)",
"print",
"s",
"s = 0",
"0",
"s",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"s += L[2*n]",
"L[2*n]",
"s",
"N = int(input())",
"int(input())",
"N"
] | N = int(input())
L = list(map(int, input().split()))
L.sort()
s = 0
for n in range(N):
s += L[2*n]
print(s)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
41,
28,
13,
4,
13,
13,
4,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
0,
13,
13,
4,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
13,
13
] | [
[
56,
2
],
[
53,
8
],
[
54,
21
],
[
26,
25
],
[
57,
28
],
[
54,
33
],
[
25,
36
],
[
54,
38
],
[
25,
42
],
[
59,
45
],
[
60,
51
],
[
53,
54
],
[
56,
57
],
[
59,
60
]
] | [
"n = int(input())\nkushi = list(map(int, input().split()))\nkushi.sort()\nsetkushi = [min(kushi[2*i], kushi[2*i+1]) for i in range(n)]\nprint(sum(setkushi))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"kushi = list(map(int, input().split()))",
"kushi",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"kushi.sort()",
"kushi.sort",
"kushi",
"sort",
"min(kushi[2*i], kushi[2*i+1]) for i in range(n)",
"for i in range(n)",
"i",
"range(n)",
"range",
"n",
"for i in range(n)",
"min(kushi[2*i], kushi[2*i+1])",
"min",
"kushi[2*i]",
"kushi",
"2*i",
"2",
"i",
"kushi[2*i+1]",
"kushi",
"2*i+1",
"2*i",
"2",
"i",
"1",
"setkushi = [min(kushi[2*i], kushi[2*i+1]) for i in range(n)]",
"setkushi",
"[min(kushi[2*i], kushi[2*i+1]) for i in range(n)]",
"print(sum(setkushi))",
"print",
"sum(setkushi)",
"sum",
"setkushi",
"kushi = list(map(int, input().split()))",
"list(map(int, input().split()))",
"kushi",
"n = int(input())",
"int(input())",
"n",
"setkushi = [min(kushi[2*i], kushi[2*i+1]) for i in range(n)]",
"[min(kushi[2*i], kushi[2*i+1]) for i in range(n)]",
"setkushi"
] | n = int(input())
kushi = list(map(int, input().split()))
kushi.sort()
setkushi = [min(kushi[2*i], kushi[2*i+1]) for i in range(n)]
print(sum(setkushi)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
14,
2,
2,
13,
17,
17,
4,
18,
13,
13,
17,
4,
13,
4,
13,
18,
13,
39,
17,
10,
4,
13,
10,
4,
13
] | [
[
41,
2
],
[
44,
8
],
[
42,
24
],
[
45,
29
],
[
45,
37
],
[
41,
42
],
[
44,
45
]
] | [
"N=int(input())\nM=sorted(list(map(int,input().split())))\nif N%2==1:\n M.pop(-1)\nprint(sum(M[::2]))",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"M=sorted(list(map(int,input().split())))",
"M",
"sorted(list(map(int,input().split())))",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"if N%2==1:\n M.pop(-1)",
"N%2==1",
"N%2",
"N",
"2",
"1",
"M.pop(-1)",
"M.pop",
"M",
"pop",
"-1",
"print(sum(M[::2]))",
"print",
"sum(M[::2])",
"sum",
"M[::2]",
"M",
"::2",
"2",
"N=int(input())",
"int(input())",
"N",
"M=sorted(list(map(int,input().split())))",
"sorted(list(map(int,input().split())))",
"M"
] | N=int(input())
M=sorted(list(map(int,input().split())))
if N%2==1:
M.pop(-1)
print(sum(M[::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
41,
28,
13,
4,
18,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
84,
2
],
[
72,
8
],
[
14,
13
],
[
73,
16
],
[
13,
21
],
[
75,
23
],
[
63,
26
],
[
76,
29
],
[
32,
31
],
[
81,
34
],
[
78,
37
],
[
41,
40
],
[
85,
43
],
[
66,
45
],
[
64,
49
],
[
76,
49
],
[
79,
50
],
[
70,
50
],
[
64,
52
],
[
76,
52
],
[
79,
54
],
[
70,
54
],
[
69,
57
],
[
67,
61
],
[
82,
61
],
[
63,
64
],
[
66,
67
],
[
69,
70
],
[
72,
73
],
[
75,
76
],
[
78,
79
],
[
81,
82
],
[
84,
85
]
] | [
"N=int(input())\ninp=input()\nL=[int(val) for val in inp.split()]\nL=sorted(L,reverse=True)\ntotal=0\nstart=0\nfor _ in range(N):\n total+=min(L[start],L[start+1])\n start+=2\nprint(total)",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"inp=input()",
"inp",
"input()",
"input",
"int(val) for val in inp.split()",
"for val in inp.split()",
"val",
"inp.split()",
"inp.split",
"inp",
"split",
"for val in inp.split()",
"int(val)",
"int",
"val",
"L=[int(val) for val in inp.split()]",
"L",
"[int(val) for val in inp.split()]",
"L=sorted(L,reverse=True)",
"L",
"sorted(L,reverse=True)",
"sorted",
"L",
"reverse=True",
"reverse",
"True",
"total=0",
"total",
"0",
"start=0",
"start",
"0",
"for _ in range(N):\n total+=min(L[start],L[start+1])\n start+=2",
"_",
"range(N)",
"range",
"N",
"total+=min(L[start],L[start+1])",
"total",
"min(L[start],L[start+1])",
"min",
"L[start]",
"L",
"start",
"L[start+1]",
"L",
"start+1",
"start",
"1",
"start+=2",
"start",
"2",
"print(total)",
"print",
"total",
"L=sorted(L,reverse=True)",
"sorted(L,reverse=True)",
"L",
"total+=min(L[start],L[start+1])",
"min(L[start],L[start+1])",
"total",
"start+=2",
"2",
"start",
"inp=input()",
"input()",
"inp",
"L=[int(val) for val in inp.split()]",
"[int(val) for val in inp.split()]",
"L",
"start=0",
"0",
"start",
"total=0",
"0",
"total",
"N=int(input())",
"int(input())",
"N"
] | N=int(input())
inp=input()
L=[int(val) for val in inp.split()]
L=sorted(L,reverse=True)
total=0
start=0
for _ in range(N):
total+=min(L[start],L[start+1])
start+=2
print(total)
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
10,
4,
13,
10,
13,
13
] | [
[
35,
2
],
[
10,
9
],
[
9,
18
],
[
38,
20
],
[
39,
24
],
[
39,
31
],
[
35,
36
],
[
38,
39
]
] | [
"# AGC 001: A – BBQ Easy\nN = int(input())\nL = [int(s) for s in input().split()]\nL.sort()\n\nprint(sum(L[::2]))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(s) for s in input().split()",
"for s in input().split()",
"s",
"input().split()",
"().split",
"()",
"input",
"split",
"for s in input().split()",
"int(s)",
"int",
"s",
"L = [int(s) for s in input().split()]",
"L",
"[int(s) for s in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"print(sum(L[::2]))",
"print",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"N = int(input())",
"int(input())",
"N",
"L = [int(s) for s in input().split()]",
"[int(s) for s in input().split()]",
"L"
] | # AGC 001: A – BBQ Easy
N = int(input())
L = [int(s) for s in input().split()]
L.sort()
print(sum(L[::2])) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
4,
13,
18,
13,
2,
13,
17,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
13,
13,
10,
4,
13,
10,
17,
13
] | [
[
60,
2
],
[
10,
9
],
[
9,
18
],
[
57,
20
],
[
58,
24
],
[
63,
27
],
[
31,
30
],
[
58,
36
],
[
54,
39
],
[
58,
43
],
[
30,
45
],
[
58,
48
],
[
30,
49
],
[
55,
52
],
[
64,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
]
] | [
"n = int(input())\nl = [int(i) for i in input().split()]\nl.sort()\n\nans = 0\nfor i in range(1, len(l), 2):\n ans += min(l[i-1], l[i])\n\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"l = [int(i) for i in input().split()]",
"l",
"[int(i) for i in input().split()]",
"l.sort()",
"l.sort",
"l",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(1, len(l), 2):\n ans += min(l[i-1], l[i])",
"i",
"range(1, len(l), 2)",
"range",
"1",
"len(l)",
"len",
"l",
"2",
"ans += min(l[i-1], l[i])",
"ans",
"min(l[i-1], l[i])",
"min",
"l[i-1]",
"l",
"i-1",
"i",
"1",
"l[i]",
"l",
"i",
"print(ans)",
"print",
"ans",
"ans += min(l[i-1], l[i])",
"min(l[i-1], l[i])",
"ans",
"l = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"l",
"n = int(input())",
"int(input())",
"n",
"ans = 0",
"0",
"ans"
] | n = int(input())
l = [int(i) for i in input().split()]
l.sort()
ans = 0
for i in range(1, len(l), 2):
ans += min(l[i-1], l[i])
print(ans) |
[
7,
0,
13,
2,
4,
13,
4,
13,
17,
0,
13,
17,
0,
13,
4,
13,
0,
13,
39,
28,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
13,
17,
0,
13,
4,
13,
18,
13,
13,
0,
13,
13,
4,
13,
13,
10,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
39,
13,
10,
4,
13,
10,
2,
13,
10,
17,
13
] | [
[
79,
2
],
[
70,
10
],
[
64,
13
],
[
73,
17
],
[
21,
20
],
[
65,
23
],
[
74,
27
],
[
20,
31
],
[
67,
33
],
[
74,
36
],
[
82,
38
],
[
42,
41
],
[
71,
45
],
[
80,
45
],
[
76,
48
],
[
68,
52
],
[
74,
52
],
[
41,
53
],
[
61,
55
],
[
77,
56
],
[
62,
59
],
[
83,
59
],
[
77,
61
],
[
61,
62
],
[
64,
65
],
[
67,
68
],
[
70,
71
],
[
73,
74
],
[
76,
77
],
[
79,
80
],
[
82,
83
]
] | [
"N = int(input())*2\nN -= 1\ninp = input()\nskewers=[]\nfor num in inp.split():\n skewers.append(int(num))\nskewers = sorted(skewers)\ntotal = 0\nfor i in range(0,N,2):\n num = int(skewers[i])\n total+=num\nprint(total)",
"N = int(input())*2",
"N",
"int(input())*2",
"int(input())",
"int",
"input()",
"input",
"2",
"N -= 1",
"N",
"1",
"inp = input()",
"inp",
"input()",
"input",
"skewers=[]",
"skewers",
"[]",
"for num in inp.split():\n skewers.append(int(num))",
"num",
"inp.split()",
"inp.split",
"inp",
"split",
"skewers.append(int(num))",
"skewers.append",
"skewers",
"append",
"int(num)",
"int",
"num",
"skewers = sorted(skewers)",
"skewers",
"sorted(skewers)",
"sorted",
"skewers",
"total = 0",
"total",
"0",
"for i in range(0,N,2):\n num = int(skewers[i])\n total+=num",
"i",
"range(0,N,2)",
"range",
"0",
"N",
"2",
"num = int(skewers[i])",
"num",
"int(skewers[i])",
"int",
"skewers[i]",
"skewers",
"i",
"total+=num",
"total",
"num",
"print(total)",
"print",
"total",
"total+=num",
"num",
"total",
"inp = input()",
"input()",
"inp",
"skewers = sorted(skewers)",
"sorted(skewers)",
"skewers",
"N -= 1",
"1",
"N",
"skewers=[]",
"[]",
"skewers",
"num = int(skewers[i])",
"int(skewers[i])",
"num",
"N = int(input())*2",
"int(input())*2",
"N",
"total = 0",
"0",
"total"
] | N = int(input())*2
N -= 1
inp = input()
skewers=[]
for num in inp.split():
skewers.append(int(num))
skewers = sorted(skewers)
total = 0
for i in range(0,N,2):
num = int(skewers[i])
total+=num
print(total)
|
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
17,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
17,
13,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
12,
11
],
[
11,
21
],
[
24,
23
],
[
23,
27
],
[
31,
30
],
[
34,
33
],
[
4,
38
],
[
33,
42
],
[
47,
46
],
[
23,
48
],
[
33,
49
],
[
46,
52
],
[
30,
52
],
[
57,
54
]
] | [
"# 2n = n * 2 pairs optimal greedy contradiction 1 is paired with k 2 is with j if we move 1 to 2 and k to j\ndef main():\n n = int(input())\n\n arr = [int(x) for x in input().split(\" \")]\n\n arr.sort()\n\n ans = 0\n\n for i in range(2*n):\n\n if (i % 2) == 0:\n ans += arr[i]\n\n print(ans)\n\nmain()",
"def main():\n n = int(input())\n\n arr = [int(x) for x in input().split(\" \")]\n\n arr.sort()\n\n ans = 0\n\n for i in range(2*n):\n\n if (i % 2) == 0:\n ans += arr[i]\n\n print(ans)",
"main",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split(\" \")",
"for x in input().split(\" \")",
"x",
"input().split(\" \")",
"().split",
"()",
"input",
"split",
"\" \"",
"for x in input().split(\" \")",
"int(x)",
"int",
"x",
"arr = [int(x) for x in input().split(\" \")]",
"arr",
"[int(x) for x in input().split(\" \")]",
"arr.sort()",
"arr.sort",
"arr",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(2*n):\n\n if (i % 2) == 0:\n ans += arr[i]\n\n ",
"i",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"if (i % 2) == 0:\n ans += arr[i]\n\n ",
"(i % 2) == 0",
"i % 2",
"i",
"2",
"0",
"ans += arr[i]",
"ans",
"arr[i]",
"arr",
"i",
"print(ans)",
"print",
"ans",
"main()",
"main",
"def main():\n n = int(input())\n\n arr = [int(x) for x in input().split(\" \")]\n\n arr.sort()\n\n ans = 0\n\n for i in range(2*n):\n\n if (i % 2) == 0:\n ans += arr[i]\n\n print(ans)",
"def main():\n n = int(input())\n\n arr = [int(x) for x in input().split(\" \")]\n\n arr.sort()\n\n ans = 0\n\n for i in range(2*n):\n\n if (i % 2) == 0:\n ans += arr[i]\n\n print(ans)",
"main"
] | # 2n = n * 2 pairs optimal greedy contradiction 1 is paired with k 2 is with j if we move 1 to 2 and k to j
def main():
n = int(input())
arr = [int(x) for x in input().split(" ")]
arr.sort()
ans = 0
for i in range(2*n):
if (i % 2) == 0:
ans += arr[i]
print(ans)
main()
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
52,
2
],
[
55,
8
],
[
23,
22
],
[
58,
25
],
[
29,
28
],
[
53,
33
],
[
61,
37
],
[
56,
41
],
[
28,
42
],
[
56,
44
],
[
28,
46
],
[
62,
50
],
[
59,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
],
[
61,
62
]
] | [
"n = int(input())\nl = sorted(list(map(int, input().split())), reverse=True)\nt = 0\nfor i in range(1, n * 2, 2):\n t += min(l[i], l[i-1])\nprint(t)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = sorted(list(map(int, input().split())), reverse=True)",
"l",
"sorted(list(map(int, input().split())), reverse=True)",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"reverse=True",
"reverse",
"True",
"t = 0",
"t",
"0",
"for i in range(1, n * 2, 2):\n t += min(l[i], l[i-1])",
"i",
"range(1, n * 2, 2)",
"range",
"1",
"n * 2",
"n",
"2",
"2",
"t += min(l[i], l[i-1])",
"t",
"min(l[i], l[i-1])",
"min",
"l[i]",
"l",
"i",
"l[i-1]",
"l",
"i-1",
"i",
"1",
"print(t)",
"print",
"t",
"n = int(input())",
"int(input())",
"n",
"l = sorted(list(map(int, input().split())), reverse=True)",
"sorted(list(map(int, input().split())), reverse=True)",
"l",
"t = 0",
"0",
"t",
"t += min(l[i], l[i-1])",
"min(l[i], l[i-1])",
"t"
] | n = int(input())
l = sorted(list(map(int, input().split())), reverse=True)
t = 0
for i in range(1, n * 2, 2):
t += min(l[i], l[i-1])
print(t)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
35,
2
],
[
44,
8
],
[
41,
20
],
[
45,
23
],
[
38,
25
],
[
42,
29
],
[
45,
29
],
[
39,
33
],
[
35,
36
],
[
38,
39
],
[
41,
42
],
[
44,
45
]
] | [
"n = int(input())\nl = list(map(int, input().split()))\n\nl = sorted(l)\ncount = sum(l[i] for i in range(0, 2 * n, 2))\nprint(count)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l = sorted(l)",
"l",
"sorted(l)",
"sorted",
"l",
"count = sum(l[i] for i in range(0, 2 * n, 2))",
"count",
"sum(l[i] for i in range(0, 2 * n, 2))",
"sum",
"l[i]",
"l",
"i",
"print(count)",
"print",
"count",
"n = int(input())",
"int(input())",
"n",
"count = sum(l[i] for i in range(0, 2 * n, 2))",
"sum(l[i] for i in range(0, 2 * n, 2))",
"count",
"l = sorted(l)",
"sorted(l)",
"l",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l"
] | n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
count = sum(l[i] for i in range(0, 2 * n, 2))
print(count)
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
46,
2
],
[
10,
9
],
[
9,
18
],
[
52,
20
],
[
49,
25
],
[
29,
28
],
[
47,
31
],
[
43,
33
],
[
53,
35
],
[
28,
37
],
[
44,
41
],
[
50,
41
],
[
43,
44
],
[
46,
47
],
[
49,
50
],
[
52,
53
]
] | [
"n = int(input())\nL = sorted([int(i) for i in input().split()])\ncount = 0\nfor i in range(n):\n count += L[i*2]\nprint(count)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"L = sorted([int(i) for i in input().split()])",
"L",
"sorted([int(i) for i in input().split()])",
"sorted",
"[int(i) for i in input().split()]",
"count = 0",
"count",
"0",
"for i in range(n):\n count += L[i*2]",
"i",
"range(n)",
"range",
"n",
"count += L[i*2]",
"count",
"L[i*2]",
"L",
"i*2",
"i",
"2",
"print(count)",
"print",
"count",
"count += L[i*2]",
"L[i*2]",
"count",
"n = int(input())",
"int(input())",
"n",
"count = 0",
"0",
"count",
"L = sorted([int(i) for i in input().split()])",
"sorted([int(i) for i in input().split()])",
"L"
] | n = int(input())
L = sorted([int(i) for i in input().split()])
count = 0
for i in range(n):
count += L[i*2]
print(count) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
13,
17,
18,
13,
2,
2,
13,
17,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
13,
13,
10,
4,
13
] | [
[
57,
2
],
[
10,
9
],
[
9,
18
],
[
60,
20
],
[
61,
24
],
[
54,
27
],
[
31,
30
],
[
58,
33
],
[
63,
35
],
[
61,
39
],
[
30,
41
],
[
61,
44
],
[
30,
47
],
[
64,
52
],
[
55,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
]
] | [
"n =int(input())\na = [int(i) for i in input().split()]\na.sort()\ncount =0\nfor i in range(n):\n\tcount+=min(a[i*2],a[i*2+1])\nprint(count)",
"n =int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"a = [int(i) for i in input().split()]",
"a",
"[int(i) for i in input().split()]",
"a.sort()",
"a.sort",
"a",
"sort",
"count =0",
"count",
"0",
"for i in range(n):\n\tcount+=min(a[i*2],a[i*2+1])",
"i",
"range(n)",
"range",
"n",
"count+=min(a[i*2],a[i*2+1])",
"count",
"min(a[i*2],a[i*2+1])",
"min",
"a[i*2]",
"a",
"i*2",
"i",
"2",
"a[i*2+1]",
"a",
"i*2+1",
"i*2",
"i",
"2",
"1",
"print(count)",
"print",
"count",
"count =0",
"0",
"count",
"n =int(input())",
"int(input())",
"n",
"a = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"a",
"count+=min(a[i*2],a[i*2+1])",
"min(a[i*2],a[i*2+1])",
"count"
] | n =int(input())
a = [int(i) for i in input().split()]
a.sort()
count =0
for i in range(n):
count+=min(a[i*2],a[i*2+1])
print(count) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
13,
13,
0,
13,
17,
13,
4,
13,
18,
13,
39,
17,
17,
10,
4,
13,
10,
4,
13
] | [
[
34,
2
],
[
37,
8
],
[
24,
23
],
[
38,
29
],
[
34,
35
],
[
37,
38
]
] | [
"N = int(raw_input())\nL = sorted(map(int, raw_input().strip().split()), reverse=True)\nprint sum(L[1::2])",
"N = int(raw_input())",
"N",
"int(raw_input())",
"int",
"raw_input()",
"raw_input",
"L = sorted(map(int, raw_input().strip().split()), reverse=True)",
"L",
"sorted(map(int, raw_input().strip().split()), reverse=True)",
"sorted",
"map(int, raw_input().strip().split())",
"map",
"int",
"raw_input().strip().split()",
"().strip().split",
"().strip()",
"().strip",
"()",
"raw_input",
"strip",
"split",
"reverse=True",
"reverse",
"True",
"print",
"sum(L[1::2])",
"sum",
"L[1::2]",
"L",
"1::2",
"1",
"2",
"N = int(raw_input())",
"int(raw_input())",
"N",
"L = sorted(map(int, raw_input().strip().split()), reverse=True)",
"sorted(map(int, raw_input().strip().split()), reverse=True)",
"L"
] | N = int(raw_input())
L = sorted(map(int, raw_input().strip().split()), reverse=True)
print sum(L[1::2]) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
18,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
39,
17,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
61,
2
],
[
52,
8
],
[
55,
25
],
[
29,
28
],
[
62,
34
],
[
58,
37
],
[
53,
41
],
[
28,
42
],
[
53,
44
],
[
28,
46
],
[
59,
50
],
[
56,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
],
[
61,
62
]
] | [
"N = int(input())\nLlist = sorted(list(map(int, input().split())))[::-1]\nans = 0\nfor i in range(0, 2*N, 2):\n ans += min(Llist[i], Llist[i+1])\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"Llist = sorted(list(map(int, input().split())))[::-1]",
"Llist",
"sorted(list(map(int, input().split())))[::-1]",
"(list(map(int, input().split())))",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"::-1",
"-1",
"ans = 0",
"ans",
"0",
"for i in range(0, 2*N, 2):\n ans += min(Llist[i], Llist[i+1])",
"i",
"range(0, 2*N, 2)",
"range",
"0",
"2*N",
"2",
"N",
"2",
"ans += min(Llist[i], Llist[i+1])",
"ans",
"min(Llist[i], Llist[i+1])",
"min",
"Llist[i]",
"Llist",
"i",
"Llist[i+1]",
"Llist",
"i+1",
"i",
"1",
"print(ans)",
"print",
"ans",
"Llist = sorted(list(map(int, input().split())))[::-1]",
"sorted(list(map(int, input().split())))[::-1]",
"Llist",
"ans = 0",
"0",
"ans",
"ans += min(Llist[i], Llist[i+1])",
"min(Llist[i], Llist[i+1])",
"ans",
"N = int(input())",
"int(input())",
"N"
] | N = int(input())
Llist = sorted(list(map(int, input().split())))[::-1]
ans = 0
for i in range(0, 2*N, 2):
ans += min(Llist[i], Llist[i+1])
print(ans)
|
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
41,
28,
13,
4,
13,
2,
17,
13,
2,
2,
13,
17,
17,
4,
18,
13,
13,
0,
13,
13,
4,
13,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
11,
10
],
[
26,
25
],
[
4,
30
],
[
25,
33
],
[
10,
38
],
[
25,
39
],
[
42,
41
],
[
41,
47
],
[
56,
53
]
] | [
"def main():\n N = int(input())\n L = sorted(list(map(int,input().split())))\n LL = [L[i] for i in range(2*N) if i%2 == 0]\n print(sum(LL))\n\nif __name__ == '__main__':\n main()",
"def main():\n N = int(input())\n L = sorted(list(map(int,input().split())))\n LL = [L[i] for i in range(2*N) if i%2 == 0]\n print(sum(LL))",
"main",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = sorted(list(map(int,input().split())))",
"L",
"sorted(list(map(int,input().split())))",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L[i] for i in range(2*N) if i%2 == 0",
"for i in range(2*N) if i%2 == 0",
"i",
"range(2*N)",
"range",
"2*N",
"2",
"N",
"i%2 == 0",
"i%2",
"i",
"2",
"0",
"if i%2 == 0",
"L[i]",
"L",
"i",
"LL = [L[i] for i in range(2*N) if i%2 == 0]",
"LL",
"[L[i] for i in range(2*N) if i%2 == 0]",
"print(sum(LL))",
"print",
"sum(LL)",
"sum",
"LL",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def main():\n N = int(input())\n L = sorted(list(map(int,input().split())))\n LL = [L[i] for i in range(2*N) if i%2 == 0]\n print(sum(LL))",
"def main():\n N = int(input())\n L = sorted(list(map(int,input().split())))\n LL = [L[i] for i in range(2*N) if i%2 == 0]\n print(sum(LL))",
"main"
] | def main():
N = int(input())
L = sorted(list(map(int,input().split())))
LL = [L[i] for i in range(2*N) if i%2 == 0]
print(sum(LL))
if __name__ == '__main__':
main() |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
39,
28,
13,
4,
13,
2,
17,
13,
28,
13,
4,
13,
2,
17,
13,
14,
2,
18,
13,
13,
4,
13,
13,
4,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
39,
13,
10,
18,
13
] | [
[
78,
2
],
[
81,
8
],
[
75,
20
],
[
84,
23
],
[
27,
26
],
[
79,
31
],
[
34,
33
],
[
79,
38
],
[
55,
41
],
[
82,
42
],
[
33,
43
],
[
82,
46
],
[
85,
49
],
[
55,
51
],
[
82,
52
],
[
33,
53
],
[
58,
55
],
[
82,
56
],
[
33,
57
],
[
61,
60
],
[
79,
63
],
[
87,
65
],
[
85,
67
],
[
60,
70
],
[
88,
73
],
[
76,
73
],
[
75,
76
],
[
78,
79
],
[
81,
82
],
[
84,
85
],
[
87,
88
]
] | [
"n=int(input())\na=list(map(int,input().split()))\nans=0\nb=[]\nfor k in range(2*n):\n for i in range(2*n):\n if a[i]==min(a):\n b.append(a[i])\n a[i]=101\nfor s in range(n):\n ans+=b[2*s]\nprint(ans)",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"a=list(map(int,input().split()))",
"a",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ans=0",
"ans",
"0",
"b=[]",
"b",
"[]",
"for k in range(2*n):\n for i in range(2*n):\n if a[i]==min(a):\n b.append(a[i])\n a[i]=101",
"k",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"for i in range(2*n):\n if a[i]==min(a):\n b.append(a[i])\n a[i]=101",
"i",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"if a[i]==min(a):\n b.append(a[i])\n a[i]=101",
"a[i]==min(a)",
"a[i]",
"a",
"i",
"min(a)",
"min",
"a",
"b.append(a[i])",
"b.append",
"b",
"append",
"a[i]",
"a",
"i",
"a[i]=101",
"a[i]",
"a",
"i",
"101",
"for s in range(n):\n ans+=b[2*s]",
"s",
"range(n)",
"range",
"n",
"ans+=b[2*s]",
"ans",
"b[2*s]",
"b",
"2*s",
"2",
"s",
"print(ans)",
"print",
"ans",
"ans=0",
"0",
"ans",
"n=int(input())",
"int(input())",
"n",
"a=list(map(int,input().split()))",
"list(map(int,input().split()))",
"a",
"b=[]",
"[]",
"b",
"ans+=b[2*s]",
"b[2*s]",
"ans"
] | n=int(input())
a=list(map(int,input().split()))
ans=0
b=[]
for k in range(2*n):
for i in range(2*n):
if a[i]==min(a):
b.append(a[i])
a[i]=101
for s in range(n):
ans+=b[2*s]
print(ans) |
[
7,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13
] | [
[
40,
4
],
[
41,
17
],
[
43,
20
],
[
24,
23
],
[
41,
29
],
[
46,
32
],
[
41,
34
],
[
23,
35
],
[
47,
38
],
[
44,
38
],
[
40,
41
],
[
43,
44
],
[
46,
47
]
] | [
"input()\nA=list(map(int,input().split()))\nA.sort()\nr = 0\nfor i in range(0,len(A),2):\n r+=A[i]\n \nprint(r)",
"input()",
"input",
"A=list(map(int,input().split()))",
"A",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"A.sort()",
"A.sort",
"A",
"sort",
"r = 0",
"r",
"0",
"for i in range(0,len(A),2):\n r+=A[i]\n ",
"i",
"range(0,len(A),2)",
"range",
"0",
"len(A)",
"len",
"A",
"2",
"r+=A[i]",
"r",
"A[i]",
"A",
"i",
"print(r)",
"print",
"r",
"A=list(map(int,input().split()))",
"list(map(int,input().split()))",
"A",
"r = 0",
"0",
"r",
"r+=A[i]",
"A[i]",
"r"
] | input()
A=list(map(int,input().split()))
A.sort()
r = 0
for i in range(0,len(A),2):
r+=A[i]
print(r) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
4,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
38,
2
],
[
41,
8
],
[
42,
21
],
[
35,
24
],
[
42,
28
],
[
36,
33
],
[
35,
36
],
[
38,
39
],
[
41,
42
]
] | [
"n = int(input())\nl = list(map(int, input().split()))\n\nl.sort()\nans = sum(l[::2])\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"ans = sum(l[::2])",
"ans",
"sum(l[::2])",
"sum",
"l[::2]",
"l",
"::2",
"2",
"print(ans)",
"print",
"ans",
"ans = sum(l[::2])",
"sum(l[::2])",
"ans",
"n = int(input())",
"int(input())",
"n",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l"
] | n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = sum(l[::2])
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
54,
2
],
[
60,
8
],
[
61,
21
],
[
51,
24
],
[
28,
27
],
[
55,
33
],
[
57,
36
],
[
61,
40
],
[
27,
41
],
[
61,
43
],
[
27,
45
],
[
58,
49
],
[
52,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"n = int(input())\nl = list(map(int, input().split()))\nl.sort()\nnum = 0\nfor i in range(0,2*n,2):\n num += min(l[i],l[i+1])\nprint(num)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"num = 0",
"num",
"0",
"for i in range(0,2*n,2):\n num += min(l[i],l[i+1])",
"i",
"range(0,2*n,2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"num += min(l[i],l[i+1])",
"num",
"min(l[i],l[i+1])",
"min",
"l[i]",
"l",
"i",
"l[i+1]",
"l",
"i+1",
"i",
"1",
"print(num)",
"print",
"num",
"num = 0",
"0",
"num",
"n = int(input())",
"int(input())",
"n",
"num += min(l[i],l[i+1])",
"min(l[i],l[i+1])",
"num",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l"
] | n = int(input())
l = list(map(int, input().split()))
l.sort()
num = 0
for i in range(0,2*n,2):
num += min(l[i],l[i+1])
print(num) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
41,
28,
13,
13,
4,
13,
13,
2,
2,
13,
17,
17,
4,
13,
0,
13,
4,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
56,
2
],
[
50,
8
],
[
53,
20
],
[
51,
23
],
[
54,
30
],
[
47,
39
],
[
48,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
]
] | [
"n = int(input())\nskewers = list(map(int,input().split()))\ns = sorted(skewers)\nans = sum([val for i,val in enumerate(s) if i % 2 == 0])\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"skewers = list(map(int,input().split()))",
"skewers",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"s = sorted(skewers)",
"s",
"sorted(skewers)",
"sorted",
"skewers",
"val for i,val in enumerate(s) if i % 2 == 0",
"for i,val in enumerate(s) if i % 2 == 0",
"i",
"val",
"enumerate(s)",
"enumerate",
"s",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"if i % 2 == 0",
"val",
"ans = sum([val for i,val in enumerate(s) if i % 2 == 0])",
"ans",
"sum([val for i,val in enumerate(s) if i % 2 == 0])",
"sum",
"[val for i,val in enumerate(s) if i % 2 == 0]",
"print(ans)",
"print",
"ans",
"ans = sum([val for i,val in enumerate(s) if i % 2 == 0])",
"sum([val for i,val in enumerate(s) if i % 2 == 0])",
"ans",
"skewers = list(map(int,input().split()))",
"list(map(int,input().split()))",
"skewers",
"s = sorted(skewers)",
"sorted(skewers)",
"s",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
skewers = list(map(int,input().split()))
s = sorted(skewers)
ans = sum([val for i,val in enumerate(s) if i % 2 == 0])
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
4,
13,
18,
13,
39,
17,
2,
17,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
42,
2
],
[
39,
8
],
[
40,
21
],
[
45,
24
],
[
40,
28
],
[
43,
33
],
[
46,
37
],
[
39,
40
],
[
42,
43
],
[
45,
46
]
] | [
"N=int(input())\nL=list(map(int,input().split()))\n\nL.sort()\n\nans=sum(L[0:2*N:2])\nprint(ans)",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L=list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"ans=sum(L[0:2*N:2])",
"ans",
"sum(L[0:2*N:2])",
"sum",
"L[0:2*N:2]",
"L",
"0:2*N:2",
"0",
"2*N",
"2",
"N",
"2",
"print(ans)",
"print",
"ans",
"L=list(map(int,input().split()))",
"list(map(int,input().split()))",
"L",
"N=int(input())",
"int(input())",
"N",
"ans=sum(L[0:2*N:2])",
"sum(L[0:2*N:2])",
"ans"
] | N=int(input())
L=list(map(int,input().split()))
L.sort()
ans=sum(L[0:2*N:2])
print(ans) |
[
7,
12,
13,
4,
18,
13,
13,
29,
4,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
23,
13,
23,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
13,
4,
13,
13,
13,
10,
4,
13,
10,
4,
13,
10,
12,
13
] | [
[
27,
5
],
[
27,
13
],
[
27,
18
],
[
25,
25
],
[
27,
27
],
[
53,
29
],
[
56,
35
],
[
60,
49
],
[
54,
50
],
[
57,
51
],
[
53,
54
],
[
56,
57
]
] | [
"def solve(n, L):\n L.sort()\n return sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))\n\n_n = int(input())\n_L = list(map(int, input().split()))\nprint(solve(_n, _L))",
"def solve(n, L):\n L.sort()\n return sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))",
"solve",
"L.sort()",
"L.sort",
"L",
"sort",
"return sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))",
"sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))",
"sum",
"min(L[2 * i], L[2 * i + 1])",
"min",
"L[2 * i]",
"L",
"2 * i",
"2",
"i",
"L[2 * i + 1]",
"L",
"2 * i + 1",
"2 * i",
"2",
"i",
"1",
"n",
"n",
"L",
"L",
"_n = int(input())",
"_n",
"int(input())",
"int",
"input()",
"input",
"_L = list(map(int, input().split()))",
"_L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"print(solve(_n, _L))",
"print",
"solve(_n, _L)",
"solve",
"_n",
"_L",
"_n = int(input())",
"int(input())",
"_n",
"_L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"_L",
"def solve(n, L):\n L.sort()\n return sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))",
"def solve(n, L):\n L.sort()\n return sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))",
"solve"
] | def solve(n, L):
L.sort()
return sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))
_n = int(input())
_L = list(map(int, input().split()))
print(solve(_n, _L))
|
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
17,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13
] | [
[
46,
2
],
[
43,
6
],
[
44,
20
],
[
52,
23
],
[
27,
26
],
[
44,
32
],
[
49,
35
],
[
44,
37
],
[
26,
38
],
[
50,
41
],
[
53,
41
],
[
43,
44
],
[
46,
47
],
[
49,
50
],
[
52,
53
]
] | [
"n=input()\nl=list(map(int,input().split(\" \")))\nl.sort()\nans=0\nfor i in range(0,len(l),2):\n ans+=l[i]\nprint(ans)",
"n=input()",
"n",
"input()",
"input",
"l=list(map(int,input().split(\" \")))",
"l",
"list(map(int,input().split(\" \")))",
"list",
"map(int,input().split(\" \"))",
"map",
"int",
"input().split(\" \")",
"().split",
"()",
"input",
"split",
"\" \"",
"l.sort()",
"l.sort",
"l",
"sort",
"ans=0",
"ans",
"0",
"for i in range(0,len(l),2):\n ans+=l[i]",
"i",
"range(0,len(l),2)",
"range",
"0",
"len(l)",
"len",
"l",
"2",
"ans+=l[i]",
"ans",
"l[i]",
"l",
"i",
"print(ans)",
"print",
"ans",
"l=list(map(int,input().split(\" \")))",
"list(map(int,input().split(\" \")))",
"l",
"n=input()",
"input()",
"n",
"ans+=l[i]",
"l[i]",
"ans",
"ans=0",
"0",
"ans"
] | n=input()
l=list(map(int,input().split(" ")))
l.sort()
ans=0
for i in range(0,len(l),2):
ans+=l[i]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
42,
40,
13,
2,
2,
13,
17,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
59,
2
],
[
68,
8
],
[
69,
21
],
[
56,
24
],
[
71,
27
],
[
72,
31
],
[
66,
31
],
[
60,
34
],
[
62,
38
],
[
69,
42
],
[
72,
43
],
[
66,
43
],
[
69,
45
],
[
72,
47
],
[
66,
47
],
[
65,
50
],
[
63,
54
],
[
57,
54
],
[
56,
57
],
[
59,
60
],
[
62,
63
],
[
65,
66
],
[
68,
69
],
[
71,
72
]
] | [
"n = int(input())\nl = list(map(int, input().split()))\nl.sort()\nans = 0\ni = 0\nwhile i <= n * 2 - 1:\n ans += min(l[i], l[i+1])\n i += 2\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"ans = 0",
"ans",
"0",
"i = 0",
"i",
"0",
"while i <= n * 2 - 1:\n ans += min(l[i], l[i+1])\n i += 2",
"i <= n * 2 - 1",
"i",
"n * 2 - 1",
"n * 2",
"n",
"2",
"1",
"ans += min(l[i], l[i+1])",
"ans",
"min(l[i], l[i+1])",
"min",
"l[i]",
"l",
"i",
"l[i+1]",
"l",
"i+1",
"i",
"1",
"i += 2",
"i",
"2",
"print(ans)",
"print",
"ans",
"ans = 0",
"0",
"ans",
"n = int(input())",
"int(input())",
"n",
"ans += min(l[i], l[i+1])",
"min(l[i], l[i+1])",
"ans",
"i += 2",
"2",
"i",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l",
"i = 0",
"0",
"i"
] | n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
i = 0
while i <= n * 2 - 1:
ans += min(l[i], l[i+1])
i += 2
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
4,
13,
18,
13,
39,
17,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
39,
2
],
[
36,
8
],
[
37,
21
],
[
42,
24
],
[
37,
28
],
[
43,
34
],
[
36,
37
],
[
39,
40
],
[
42,
43
]
] | [
"N = int(input())\nLs = list(map(int, input().split()))\nLs.sort()\nr = sum(Ls[0::2])\nprint(r)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"Ls = list(map(int, input().split()))",
"Ls",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"Ls.sort()",
"Ls.sort",
"Ls",
"sort",
"r = sum(Ls[0::2])",
"r",
"sum(Ls[0::2])",
"sum",
"Ls[0::2]",
"Ls",
"0::2",
"0",
"2",
"print(r)",
"print",
"r",
"Ls = list(map(int, input().split()))",
"list(map(int, input().split()))",
"Ls",
"N = int(input())",
"int(input())",
"N",
"r = sum(Ls[0::2])",
"sum(Ls[0::2])",
"r"
] | N = int(input())
Ls = list(map(int, input().split()))
Ls.sort()
r = sum(Ls[0::2])
print(r)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
51,
2
],
[
60,
8
],
[
61,
21
],
[
54,
24
],
[
28,
27
],
[
52,
33
],
[
57,
36
],
[
61,
40
],
[
27,
41
],
[
61,
43
],
[
27,
45
],
[
58,
49
],
[
55,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"N = int(input())\nkushi = list(map(int,input().split()))\nkushi.sort()\nans = 0\nfor i in range(0,2*N,2):\n ans += min(kushi[i],kushi[i+1])\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"kushi = list(map(int,input().split()))",
"kushi",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"kushi.sort()",
"kushi.sort",
"kushi",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0,2*N,2):\n ans += min(kushi[i],kushi[i+1])",
"i",
"range(0,2*N,2)",
"range",
"0",
"2*N",
"2",
"N",
"2",
"ans += min(kushi[i],kushi[i+1])",
"ans",
"min(kushi[i],kushi[i+1])",
"min",
"kushi[i]",
"kushi",
"i",
"kushi[i+1]",
"kushi",
"i+1",
"i",
"1",
"print(ans)",
"print",
"ans",
"N = int(input())",
"int(input())",
"N",
"ans = 0",
"0",
"ans",
"ans += min(kushi[i],kushi[i+1])",
"min(kushi[i],kushi[i+1])",
"ans",
"kushi = list(map(int,input().split()))",
"list(map(int,input().split()))",
"kushi"
] | N = int(input())
kushi = list(map(int,input().split()))
kushi.sort()
ans = 0
for i in range(0,2*N,2):
ans += min(kushi[i],kushi[i+1])
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
18,
13
] | [
[
44,
2
],
[
50,
8
],
[
51,
21
],
[
47,
24
],
[
28,
27
],
[
45,
32
],
[
53,
36
],
[
51,
38
],
[
27,
39
],
[
54,
42
],
[
48,
42
],
[
44,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
]
] | [
"N = int(input())\nL = list(map(int,input().split()))\nL.sort()\nSum = 0\nfor i in range(0,N*2,2):\n Sum += L[i]\nprint(Sum)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"Sum = 0",
"Sum",
"0",
"for i in range(0,N*2,2):\n Sum += L[i]",
"i",
"range(0,N*2,2)",
"range",
"0",
"N*2",
"N",
"2",
"2",
"Sum += L[i]",
"Sum",
"L[i]",
"L",
"i",
"print(Sum)",
"print",
"Sum",
"N = int(input())",
"int(input())",
"N",
"Sum = 0",
"0",
"Sum",
"L = list(map(int,input().split()))",
"list(map(int,input().split()))",
"L",
"Sum += L[i]",
"L[i]",
"Sum"
] | N = int(input())
L = list(map(int,input().split()))
L.sort()
Sum = 0
for i in range(0,N*2,2):
Sum += L[i]
print(Sum) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
13,
4,
13,
18,
4,
13,
13,
39,
17,
10,
4,
13,
10,
4,
13
] | [
[
30,
2
],
[
33,
8
],
[
34,
26
],
[
30,
31
],
[
33,
34
]
] | [
"N=int(input())\nLn=list(map(int,input().split()))\nprint(sum(sorted(Ln)[::2]))",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"Ln=list(map(int,input().split()))",
"Ln",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"print(sum(sorted(Ln)[::2]))",
"print",
"sum(sorted(Ln)[::2])",
"sum",
"sorted(Ln)[::2]",
"(Ln)",
"sorted",
"Ln",
"::2",
"2",
"N=int(input())",
"int(input())",
"N",
"Ln=list(map(int,input().split()))",
"list(map(int,input().split()))",
"Ln"
] | N=int(input())
Ln=list(map(int,input().split()))
print(sum(sorted(Ln)[::2]))
|
[
7,
15,
13,
0,
13,
39,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
12,
40,
13,
23,
0,
13,
12,
4,
13,
13,
13,
13,
23,
23,
17,
23,
12,
8,
13,
4,
13,
13,
18,
13,
39,
17,
2,
13,
18,
13,
17,
4,
13,
13,
23,
23,
23,
4,
13,
13,
10,
39,
13,
10,
4,
13,
10,
12,
13
] | [
[
65,
4
],
[
68,
9
],
[
24,
23
],
[
71,
29
],
[
72,
62
],
[
69,
63
],
[
66,
63
],
[
65,
66
],
[
68,
69
],
[
71,
72
]
] | [
"#!/usr/bin/python\n# -*- Coding: utf-8 -*-\nimport sys\n\nL = [input()]\nL = sorted(list(map(int,input().split())), key= lambda x: -x)\ntest = lambda L, S=0, f=lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S): f(f, L, S)\ntest(L)",
"import sys",
"sys",
"L = [input()]",
"L",
"[input()]",
"input()",
"input",
"L = sorted(list(map(int,input().split())), key= lambda x: -x)",
"L",
"sorted(list(map(int,input().split())), key= lambda x: -x)",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"key= lambda x: -x",
"key",
"lambda x: -x",
"-x",
"x",
"x",
"test = lambda L, S=0, f=lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S): f(f, L, S)",
"test",
"lambda L, S=0, f=lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S): f(f, L, S)",
"f(f, L, S)",
"f",
"f",
"L",
"S",
"L",
"S=0",
"0",
"f=lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S)",
"lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S)",
"f(f,L[2:],S+L[1]) if L else print(S)",
"L",
"f(f,L[2:],S+L[1])",
"f",
"f",
"L[2:]",
"L",
"2:",
"2",
"S+L[1]",
"S",
"L[1]",
"L",
"1",
"print(S)",
"print",
"S",
"f",
"L",
"S",
"test(L)",
"test",
"L",
"L = [input()]",
"[input()]",
"L",
"L = sorted(list(map(int,input().split())), key= lambda x: -x)",
"sorted(list(map(int,input().split())), key= lambda x: -x)",
"L",
"test = lambda L, S=0, f=lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S): f(f, L, S)",
"lambda L, S=0, f=lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S): f(f, L, S)",
"test"
] | #!/usr/bin/python
# -*- Coding: utf-8 -*-
import sys
L = [input()]
L = sorted(list(map(int,input().split())), key= lambda x: -x)
test = lambda L, S=0, f=lambda f, L, S : f(f,L[2:],S+L[1]) if L else print(S): f(f, L, S)
test(L) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13
] | [
[
42,
2
],
[
48,
8
],
[
51,
22
],
[
26,
25
],
[
43,
31
],
[
45,
34
],
[
49,
36
],
[
25,
37
],
[
46,
40
],
[
52,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"n=int(input())\nL=sorted(list(map(int, input().split())))\n\nall_sum=0\nfor i in range(0,2*n,2):\n all_sum+=L[i]\nprint(all_sum)",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"L=sorted(list(map(int, input().split())))",
"L",
"sorted(list(map(int, input().split())))",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"all_sum=0",
"all_sum",
"0",
"for i in range(0,2*n,2):\n all_sum+=L[i]",
"i",
"range(0,2*n,2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"all_sum+=L[i]",
"all_sum",
"L[i]",
"L",
"i",
"print(all_sum)",
"print",
"all_sum",
"n=int(input())",
"int(input())",
"n",
"all_sum+=L[i]",
"L[i]",
"all_sum",
"L=sorted(list(map(int, input().split())))",
"sorted(list(map(int, input().split())))",
"L",
"all_sum=0",
"0",
"all_sum"
] | n=int(input())
L=sorted(list(map(int, input().split())))
all_sum=0
for i in range(0,2*n,2):
all_sum+=L[i]
print(all_sum) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
4,
13,
18,
13,
39,
17,
4,
13,
13,
10,
13,
13,
10,
4,
13,
10,
4,
13
] | [
[
41,
2
],
[
10,
9
],
[
9,
18
],
[
38,
20
],
[
39,
24
],
[
44,
27
],
[
39,
31
],
[
45,
36
],
[
38,
39
],
[
41,
42
],
[
44,
45
]
] | [
"N = int(input())\nL = [int(x) for x in input().split()]\nL.sort()\nanswer = sum(L[::2])\nprint(answer)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split()",
"for x in input().split()",
"x",
"input().split()",
"().split",
"()",
"input",
"split",
"for x in input().split()",
"int(x)",
"int",
"x",
"L = [int(x) for x in input().split()]",
"L",
"[int(x) for x in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"answer = sum(L[::2])",
"answer",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"print(answer)",
"print",
"answer",
"L = [int(x) for x in input().split()]",
"[int(x) for x in input().split()]",
"L",
"N = int(input())",
"int(input())",
"N",
"answer = sum(L[::2])",
"sum(L[::2])",
"answer"
] | N = int(input())
L = [int(x) for x in input().split()]
L.sort()
answer = sum(L[::2])
print(answer) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13
] | [
[
51,
2
],
[
42,
8
],
[
43,
21
],
[
48,
24
],
[
28,
27
],
[
52,
30
],
[
45,
32
],
[
43,
34
],
[
27,
36
],
[
46,
40
],
[
49,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"N = int(input())\nli = list(map(int, input().split()))\nli.sort()\nP = 0\nfor i in range(N):\n P += li[i*2]\nprint(P)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"li = list(map(int, input().split()))",
"li",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"li.sort()",
"li.sort",
"li",
"sort",
"P = 0",
"P",
"0",
"for i in range(N):\n P += li[i*2]",
"i",
"range(N)",
"range",
"N",
"P += li[i*2]",
"P",
"li[i*2]",
"li",
"i*2",
"i",
"2",
"print(P)",
"print",
"P",
"li = list(map(int, input().split()))",
"list(map(int, input().split()))",
"li",
"P += li[i*2]",
"li[i*2]",
"P",
"P = 0",
"0",
"P",
"N = int(input())",
"int(input())",
"N"
] | N = int(input())
li = list(map(int, input().split()))
li.sort()
P = 0
for i in range(N):
P += li[i*2]
print(P) |
[
7,
15,
13,
12,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
4,
18,
4,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
13,
17,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
7,
6
],
[
14,
13
],
[
6,
19
],
[
24,
23
],
[
6,
27
],
[
23,
32
],
[
35,
34
],
[
34,
38
],
[
42,
41
],
[
45,
44
],
[
13,
47
],
[
50,
49
],
[
34,
51
],
[
44,
53
],
[
49,
57
],
[
41,
57
],
[
66,
63
]
] | [
"import sys\n\ndef main():\n sinputl = sys.stdin.readline\n\n num_skewer = int(sinputl().strip())\n input = [int(x) for x in sinputl().split()]\n input.sort()\n\n count = 0\n\n for i in range(num_skewer):\n count += input[i * 2]\n\n print(count)\n\n\nif __name__ == \"__main__\":\n main()",
"import sys",
"sys",
"def main():\n sinputl = sys.stdin.readline\n\n num_skewer = int(sinputl().strip())\n input = [int(x) for x in sinputl().split()]\n input.sort()\n\n count = 0\n\n for i in range(num_skewer):\n count += input[i * 2]\n\n print(count)",
"main",
"sinputl = sys.stdin.readline",
"sinputl",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"num_skewer = int(sinputl().strip())",
"num_skewer",
"int(sinputl().strip())",
"int",
"sinputl().strip()",
"().strip",
"()",
"sinputl",
"strip",
"int(x) for x in sinputl().split()",
"for x in sinputl().split()",
"x",
"sinputl().split()",
"().split",
"()",
"sinputl",
"split",
"for x in sinputl().split()",
"int(x)",
"int",
"x",
"input = [int(x) for x in sinputl().split()]",
"input",
"[int(x) for x in sinputl().split()]",
"input.sort()",
"input.sort",
"input",
"sort",
"count = 0",
"count",
"0",
"for i in range(num_skewer):\n count += input[i * 2]\n\n ",
"i",
"range(num_skewer)",
"range",
"num_skewer",
"count += input[i * 2]",
"count",
"input[i * 2]",
"input",
"i * 2",
"i",
"2",
"print(count)",
"print",
"count",
"if __name__ == \"__main__\":\n main()",
"__name__ == \"__main__\"",
"__name__",
"\"__main__\"",
"main()",
"main",
"def main():\n sinputl = sys.stdin.readline\n\n num_skewer = int(sinputl().strip())\n input = [int(x) for x in sinputl().split()]\n input.sort()\n\n count = 0\n\n for i in range(num_skewer):\n count += input[i * 2]\n\n print(count)",
"def main():\n sinputl = sys.stdin.readline\n\n num_skewer = int(sinputl().strip())\n input = [int(x) for x in sinputl().split()]\n input.sort()\n\n count = 0\n\n for i in range(num_skewer):\n count += input[i * 2]\n\n print(count)",
"main"
] | import sys
def main():
sinputl = sys.stdin.readline
num_skewer = int(sinputl().strip())
input = [int(x) for x in sinputl().split()]
input.sort()
count = 0
for i in range(num_skewer):
count += input[i * 2]
print(count)
if __name__ == "__main__":
main() |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
17,
10,
4,
13,
10,
4,
13
] | [
[
40,
2
],
[
37,
8
],
[
38,
21
],
[
38,
25
],
[
38,
32
],
[
37,
38
],
[
40,
41
]
] | [
"n=int(input())\nl=list(map(int,input().split()))\nl.sort()\nl.reverse()\nprint(sum(l[1::2]))",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l=list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"l.reverse()",
"l.reverse",
"l",
"reverse",
"print(sum(l[1::2]))",
"print",
"sum(l[1::2])",
"sum",
"l[1::2]",
"l",
"1::2",
"1",
"2",
"l=list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"n=int(input())",
"int(input())",
"n"
] | n=int(input())
l=list(map(int,input().split()))
l.sort()
l.reverse()
print(sum(l[1::2])) |
[
7,
15,
13,
13,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
12,
13,
12,
13,
12,
13,
12,
13,
41,
28,
13,
4,
13,
13,
4,
4,
13,
12,
13,
23,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
4,
13,
17,
0,
13,
2,
2,
17,
17,
17,
0,
13,
4,
13,
0,
13,
4,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
10,
2,
13,
10,
12,
13,
10,
12,
13,
10,
4,
13,
10,
12,
13,
10,
12,
13,
10,
12,
13,
10,
4,
13,
10,
4,
13
] | [
[
25,
24
],
[
82,
30
],
[
34,
34
],
[
96,
43
],
[
75,
48
],
[
99,
55
],
[
91,
57
],
[
84,
59
],
[
94,
61
],
[
85,
64
],
[
85,
71
],
[
75,
76
],
[
84,
85
],
[
96,
97
],
[
99,
100
]
] | [
"import sys, re\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians\nfrom itertools import accumulate, permutations, combinations, product\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, digits\nfrom bisect import bisect, bisect_left\nfrom fractions import gcd\nfrom heapq import heappush, heappop\nfrom functools import reduce\ndef input(): return sys.stdin.readline().strip()\ndef INT(): return int(input())\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\ndef ZIP(n): return zip(*(MAP() for _ in range(n)))\nsys.setrecursionlimit(10 ** 9)\nINF = float('inf')\nmod = 10 ** 9 + 7\n\nN = INT()\nL = LIST()\n\nL.sort()\n\nprint(sum(L[::2]))",
"import sys, re",
"sys",
"re",
"from collections import deque, defaultdict, Counter",
"from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians",
"from itertools import accumulate, permutations, combinations, product",
"from operator import itemgetter, mul",
"from copy import deepcopy",
"from string import ascii_lowercase, ascii_uppercase, digits",
"from bisect import bisect, bisect_left",
"from fractions import gcd",
"from heapq import heappush, heappop",
"from functools import reduce",
"def input(): return sys.stdin.readline().strip()",
"input",
"def INT(): return int(input())",
"INT",
"def MAP(): return map(int, input().split())",
"MAP",
"def LIST(): return list(map(int, input().split()))",
"LIST",
"MAP() for _ in range(n)",
"for _ in range(n)",
"_",
"range(n)",
"range",
"n",
"for _ in range(n)",
"MAP()",
"MAP",
"def ZIP(n): return zip(*(MAP() for _ in range(n)))",
"ZIP",
"n",
"n",
"sys.setrecursionlimit(10 ** 9)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"10 ** 9",
"10",
"9",
"INF = float('inf')",
"INF",
"float('inf')",
"float",
"'inf'",
"mod = 10 ** 9 + 7",
"mod",
"10 ** 9 + 7",
"10 ** 9",
"10",
"9",
"7",
"N = INT()",
"N",
"INT()",
"INT",
"L = LIST()",
"L",
"LIST()",
"LIST",
"L.sort()",
"L.sort",
"L",
"sort",
"print(sum(L[::2]))",
"print",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"mod = 10 ** 9 + 7",
"10 ** 9 + 7",
"mod",
"def ZIP(n): return zip(*(MAP() for _ in range(n)))",
"def ZIP(n): return zip(*(MAP() for _ in range(n)))",
"ZIP",
"def MAP(): return map(int, input().split())",
"def MAP(): return map(int, input().split())",
"MAP",
"L = LIST()",
"LIST()",
"L",
"def input(): return sys.stdin.readline().strip()",
"def input(): return sys.stdin.readline().strip()",
"input",
"def INT(): return int(input())",
"def INT(): return int(input())",
"INT",
"def LIST(): return list(map(int, input().split()))",
"def LIST(): return list(map(int, input().split()))",
"LIST",
"INF = float('inf')",
"float('inf')",
"INF",
"N = INT()",
"INT()",
"N"
] | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
N = INT()
L = LIST()
L.sort()
print(sum(L[::2]))
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
39,
28,
13,
4,
13,
13,
4,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
4,
13,
13,
10,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
55,
2
],
[
10,
9
],
[
9,
18
],
[
49,
20
],
[
50,
24
],
[
52,
27
],
[
31,
30
],
[
56,
33
],
[
53,
36
],
[
50,
39
],
[
30,
41
],
[
53,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
]
] | [
"N=int(input())\nL=[int(i) for i in input().split()]\nL.sort()\nK=[]\nfor i in range(N):\n K.append(L[i*2])\n\nprint(sum(K))\n\n",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"L=[int(i) for i in input().split()]",
"L",
"[int(i) for i in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"K=[]",
"K",
"[]",
"for i in range(N):\n K.append(L[i*2])",
"i",
"range(N)",
"range",
"N",
"K.append(L[i*2])",
"K.append",
"K",
"append",
"L[i*2]",
"L",
"i*2",
"i",
"2",
"print(sum(K))",
"print",
"sum(K)",
"sum",
"K",
"L=[int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"L",
"K=[]",
"[]",
"K",
"N=int(input())",
"int(input())",
"N"
] | N=int(input())
L=[int(i) for i in input().split()]
L.sort()
K=[]
for i in range(N):
K.append(L[i*2])
print(sum(K))
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
4,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
10,
4,
13,
10,
4,
13
] | [
[
33,
2
],
[
10,
9
],
[
9,
18
],
[
36,
20
],
[
37,
29
],
[
33,
34
],
[
36,
37
]
] | [
"N = int(input())\nL = sorted([int(i) for i in input().split()])\n\nprint(sum(L[::2]))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"L = sorted([int(i) for i in input().split()])",
"L",
"sorted([int(i) for i in input().split()])",
"sorted",
"[int(i) for i in input().split()]",
"print(sum(L[::2]))",
"print",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"N = int(input())",
"int(input())",
"N",
"L = sorted([int(i) for i in input().split()])",
"sorted([int(i) for i in input().split()])",
"L"
] | N = int(input())
L = sorted([int(i) for i in input().split()])
print(sum(L[::2]))
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
13,
17,
17,
9,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13
] | [
[
49,
2
],
[
55,
8
],
[
56,
21
],
[
58,
24
],
[
28,
27
],
[
50,
31
],
[
27,
36
],
[
52,
41
],
[
56,
43
],
[
27,
44
],
[
53,
47
],
[
59,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\n\nl.sort()\nans = 0\nfor i in range(n*2):\n if i%2 != 0:\n continue\n ans +=l[i]\n\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(n*2):\n if i%2 != 0:\n continue\n ans +=l[i]",
"i",
"range(n*2)",
"range",
"n*2",
"n",
"2",
"if i%2 != 0:\n continue\n ",
"i%2 != 0",
"i%2",
"i",
"2",
"0",
"continue",
"ans +=l[i]",
"ans",
"l[i]",
"l",
"i",
"print(ans)",
"print",
"ans",
"n = int(input())",
"int(input())",
"n",
"ans +=l[i]",
"l[i]",
"ans",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"ans = 0",
"0",
"ans"
] | n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0
for i in range(n*2):
if i%2 != 0:
continue
ans +=l[i]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13
] | [
[
50,
2
],
[
47,
8
],
[
48,
18
],
[
21,
20
],
[
53,
23
],
[
27,
26
],
[
51,
30
],
[
26,
35
],
[
56,
39
],
[
48,
41
],
[
26,
42
],
[
57,
45
],
[
54,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
]
] | [
"N = int(input())\na = list(int(i) for i in input().split())\nlist.sort(a, reverse=True)\nans = 0\nfor i in range(N*2):\n if i%2 == 1:\n ans += a[i]\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"a = list(int(i) for i in input().split())",
"a",
"list(int(i) for i in input().split())",
"list",
"int(i)",
"int",
"i",
"list.sort(a, reverse=True)",
"list.sort",
"list",
"sort",
"a",
"reverse=True",
"reverse",
"True",
"ans = 0",
"ans",
"0",
"for i in range(N*2):\n if i%2 == 1:\n ans += a[i]",
"i",
"range(N*2)",
"range",
"N*2",
"N",
"2",
"if i%2 == 1:\n ans += a[i]",
"i%2 == 1",
"i%2",
"i",
"2",
"1",
"ans += a[i]",
"ans",
"a[i]",
"a",
"i",
"print(ans)",
"print",
"ans",
"a = list(int(i) for i in input().split())",
"list(int(i) for i in input().split())",
"a",
"N = int(input())",
"int(input())",
"N",
"ans = 0",
"0",
"ans",
"ans += a[i]",
"a[i]",
"ans"
] | N = int(input())
a = list(int(i) for i in input().split())
list.sort(a, reverse=True)
ans = 0
for i in range(N*2):
if i%2 == 1:
ans += a[i]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
4,
18,
13,
13,
28,
13,
4,
13,
2,
4,
13,
13,
17,
4,
13,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13
] | [
[
51,
2
],
[
57,
8
],
[
48,
20
],
[
58,
24
],
[
28,
27
],
[
58,
33
],
[
58,
37
],
[
54,
40
],
[
58,
42
],
[
27,
43
],
[
55,
46
],
[
49,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\nres = 0\nL.sort()\nfor i in range(len(L)%2, len(L), 2):\n res += L[i]\n\nprint(res)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"res = 0",
"res",
"0",
"L.sort()",
"L.sort",
"L",
"sort",
"for i in range(len(L)%2, len(L), 2):\n res += L[i]",
"i",
"range(len(L)%2, len(L), 2)",
"range",
"len(L)%2",
"len(L)",
"len",
"L",
"2",
"len(L)",
"len",
"L",
"2",
"res += L[i]",
"res",
"L[i]",
"L",
"i",
"print(res)",
"print",
"res",
"res = 0",
"0",
"res",
"N = int(input())",
"int(input())",
"N",
"res += L[i]",
"L[i]",
"res",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L"
] | N = int(input())
L = list(map(int, input().split()))
res = 0
L.sort()
for i in range(len(L)%2, len(L), 2):
res += L[i]
print(res)
|
[
7,
15,
15,
15,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
8,
7
],
[
14,
13
],
[
13,
26
],
[
30,
29
],
[
33,
32
],
[
7,
38
],
[
41,
40
],
[
13,
42
],
[
32,
44
],
[
50,
47
],
[
13,
48
],
[
32,
49
],
[
13,
51
],
[
32,
53
],
[
40,
57
],
[
29,
57
],
[
66,
63
]
] | [
"#!/usr/bin/env python3\nfrom collections import deque, Counter\nfrom heapq import heappop, heappush\nfrom bisect import bisect_right\n\ndef main():\n N = int(input())\n L = list(map(int, input().split()))\n L.sort()\n ans = 0\n for i in range(1,2*N):\n ans += L[i-1]\n L[i] -= L[i-1]\n print(ans)\n\nif __name__ == \"__main__\":\n main()",
"from collections import deque, Counter",
"from heapq import heappop, heappush",
"from bisect import bisect_right",
"def main():\n N = int(input())\n L = list(map(int, input().split()))\n L.sort()\n ans = 0\n for i in range(1,2*N):\n ans += L[i-1]\n L[i] -= L[i-1]\n print(ans)",
"main",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(1,2*N):\n ans += L[i-1]\n L[i] -= L[i-1]\n ",
"i",
"range(1,2*N)",
"range",
"1",
"2*N",
"2",
"N",
"ans += L[i-1]",
"ans",
"L[i-1]",
"L",
"i-1",
"i",
"1",
"L[i] -= L[i-1]",
"L[i]",
"L",
"i",
"L[i-1]",
"L",
"i-1",
"i",
"1",
"print(ans)",
"print",
"ans",
"if __name__ == \"__main__\":\n main()",
"__name__ == \"__main__\"",
"__name__",
"\"__main__\"",
"main()",
"main",
"def main():\n N = int(input())\n L = list(map(int, input().split()))\n L.sort()\n ans = 0\n for i in range(1,2*N):\n ans += L[i-1]\n L[i] -= L[i-1]\n print(ans)",
"def main():\n N = int(input())\n L = list(map(int, input().split()))\n L.sort()\n ans = 0\n for i in range(1,2*N):\n ans += L[i-1]\n L[i] -= L[i-1]\n print(ans)",
"main"
] | #!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
def main():
N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
for i in range(1,2*N):
ans += L[i-1]
L[i] -= L[i-1]
print(ans)
if __name__ == "__main__":
main()
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
54,
2
],
[
63,
8
],
[
64,
21
],
[
25,
24
],
[
57,
27
],
[
31,
30
],
[
55,
33
],
[
60,
35
],
[
64,
39
],
[
30,
42
],
[
64,
44
],
[
30,
48
],
[
61,
52
],
[
58,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
]
] | [
"N = int(input())\nlist = list(map(int, input().split()))\nlist.sort(reverse = True)\n\nresult = 0\nfor i in range(N):\n result += min(list[2 * i], list[2 * i + 1])\n\nprint(result)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"list = list(map(int, input().split()))",
"list",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"list.sort(reverse = True)",
"list.sort",
"list",
"sort",
"reverse = True",
"reverse",
"True",
"result = 0",
"result",
"0",
"for i in range(N):\n result += min(list[2 * i], list[2 * i + 1])",
"i",
"range(N)",
"range",
"N",
"result += min(list[2 * i], list[2 * i + 1])",
"result",
"min(list[2 * i], list[2 * i + 1])",
"min",
"list[2 * i]",
"list",
"2 * i",
"2",
"i",
"list[2 * i + 1]",
"list",
"2 * i + 1",
"2 * i",
"2",
"i",
"1",
"print(result)",
"print",
"result",
"N = int(input())",
"int(input())",
"N",
"result = 0",
"0",
"result",
"result += min(list[2 * i], list[2 * i + 1])",
"min(list[2 * i], list[2 * i + 1])",
"result",
"list = list(map(int, input().split()))",
"list(map(int, input().split()))",
"list"
] | N = int(input())
list = list(map(int, input().split()))
list.sort(reverse = True)
result = 0
for i in range(N):
result += min(list[2 * i], list[2 * i + 1])
print(result) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
36,
2
],
[
33,
8
],
[
39,
20
],
[
34,
23
],
[
40,
29
],
[
34,
29
],
[
33,
34
],
[
36,
37
],
[
39,
40
]
] | [
"N = int(input())\nL = list(map(int,input().split()))\nL = sorted(L)\n\nprint(sum(L[::2]))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L = sorted(L)",
"L",
"sorted(L)",
"sorted",
"L",
"print(sum(L[::2]))",
"print",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"L = list(map(int,input().split()))",
"list(map(int,input().split()))",
"L",
"N = int(input())",
"int(input())",
"N",
"L = sorted(L)",
"sorted(L)",
"L"
] | N = int(input())
L = list(map(int,input().split()))
L = sorted(L)
print(sum(L[::2])) |
Subsets and Splits