submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s173291530 | p04046 | Runtime Error | import scipy.misc as scm
h, w, a, b = [int(i) for i in input().split()]
p = 10 * * 9 + 7
s = 0
for i in range(w-b):
s += scm.comb(h+w-a-2-i, w-1-i, 1) * scm.comb(a-1+i, a-1, 1)
print(s%p)
| 2 3 1 1
| 2
| <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a large square grid with <var>H</var> rows and <var>W</var> columns.
Iroha is now standing in the top-left cell.
She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.</p>
<p>However, she cannot enter the cells in the intersection of the bottom <var>A</var> rows and the leftmost <var>B</var> columns. (That is, there are <var>A×B</var> forbidden cells.) There is no restriction on entering the other cells.</p>
<p>Find the number of ways she can travel to the bottom-right cell.</p>
<p>Since this number can be extremely large, print the number modulo <var>10^9+7</var>.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var> 1 ≦ H, W ≦ 100,000</var></li>
<li><var> 1 ≦ A < H</var></li>
<li><var> 1 ≦ B < W</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>H</var> <var>W</var> <var>A</var> <var>B</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the number of ways she can travel to the bottom-right cell, modulo <var>10^9+7</var>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2 3 1 1
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>2
</pre>
<p>We have a <var>2×3</var> grid, but entering the bottom-left cell is forbidden. The number of ways to travel is two: "Right, Right, Down" and "Right, Down, Right".</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>10 7 3 4
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>3570
</pre>
<p>There are <var>12</var> forbidden cells.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 3</h3><pre>100000 100000 99999 99999
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 3</h3><pre>1
</pre>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 4</h3><pre>100000 100000 44444 55555
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 4</h3><pre>738162020
</pre></section>
</div>
</span> |
s999587523 | p04046 | Runtime Error | import numpy as np
h, w, a, b = list(map(int, input().split()))
nmod = 10**9+7
board = np.zeros((h+1, w+1), dtype=int)
board[1,1] = 1
for x in range(1, h+1):
for y in range(1, w+1):
if x >= h-a+1 and y <= b:
continue
board[x,y] += board[x-1,y] + board[x,y-1]
if board[x,y] >= nmod:
board[x,y] = board[x,y] % nmod
print(board[h,w]) | 2 3 1 1
| 2
| <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a large square grid with <var>H</var> rows and <var>W</var> columns.
Iroha is now standing in the top-left cell.
She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.</p>
<p>However, she cannot enter the cells in the intersection of the bottom <var>A</var> rows and the leftmost <var>B</var> columns. (That is, there are <var>A×B</var> forbidden cells.) There is no restriction on entering the other cells.</p>
<p>Find the number of ways she can travel to the bottom-right cell.</p>
<p>Since this number can be extremely large, print the number modulo <var>10^9+7</var>.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var> 1 ≦ H, W ≦ 100,000</var></li>
<li><var> 1 ≦ A < H</var></li>
<li><var> 1 ≦ B < W</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>H</var> <var>W</var> <var>A</var> <var>B</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the number of ways she can travel to the bottom-right cell, modulo <var>10^9+7</var>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2 3 1 1
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>2
</pre>
<p>We have a <var>2×3</var> grid, but entering the bottom-left cell is forbidden. The number of ways to travel is two: "Right, Right, Down" and "Right, Down, Right".</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>10 7 3 4
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>3570
</pre>
<p>There are <var>12</var> forbidden cells.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 3</h3><pre>100000 100000 99999 99999
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 3</h3><pre>1
</pre>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 4</h3><pre>100000 100000 44444 55555
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 4</h3><pre>738162020
</pre></section>
</div>
</span> |
s575051490 | p04046 | Runtime Error | import itertools
import math
H,W,A,B=map(int,raw_input().split())
mod=10**9+7
FACT={}
FACT_INVERSE={}
n=1
for i in range(H+W-1):
if i==0: n=1
else: n=(n*i)%mod
FACT[i]=n
#print FACT
def C(n,r):
return (FACT[n]*pow(FACT[r],10**9+5 ,mod)*pow(FACT[n-r],10**9+5 ,mod)) %mod
N=(H-A-1)+B
M=(H-1)+(W-1)-N
p=0
for i in range(H-A,H):
#print N,i,M,(H-1)-i,C(N,i), C(M,(H-1)-i)
p+=C(N,i)*C(M,(H-1)-i) #Count patterens via prohibited point.
p=p%mod
if C(N+M,(H-1))-p>=0:
print C(N+M,(H-1))-p
else:
print C(N+M,(H-1))-p+10**9+7
| 2 3 1 1
| 2
| <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a large square grid with <var>H</var> rows and <var>W</var> columns.
Iroha is now standing in the top-left cell.
She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.</p>
<p>However, she cannot enter the cells in the intersection of the bottom <var>A</var> rows and the leftmost <var>B</var> columns. (That is, there are <var>A×B</var> forbidden cells.) There is no restriction on entering the other cells.</p>
<p>Find the number of ways she can travel to the bottom-right cell.</p>
<p>Since this number can be extremely large, print the number modulo <var>10^9+7</var>.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var> 1 ≦ H, W ≦ 100,000</var></li>
<li><var> 1 ≦ A < H</var></li>
<li><var> 1 ≦ B < W</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>H</var> <var>W</var> <var>A</var> <var>B</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the number of ways she can travel to the bottom-right cell, modulo <var>10^9+7</var>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2 3 1 1
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>2
</pre>
<p>We have a <var>2×3</var> grid, but entering the bottom-left cell is forbidden. The number of ways to travel is two: "Right, Right, Down" and "Right, Down, Right".</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>10 7 3 4
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>3570
</pre>
<p>There are <var>12</var> forbidden cells.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 3</h3><pre>100000 100000 99999 99999
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 3</h3><pre>1
</pre>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 4</h3><pre>100000 100000 44444 55555
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 4</h3><pre>738162020
</pre></section>
</div>
</span> |
s391811920 | p04046 | Runtime Error | import itertools
import math
H,W,A,B=map(int,raw_input().split())
mod=10**9+7
FACT={}
FACT_INVERSE={}
n=1
for i in range(H+W-1):
if i==0: n=1
else: n=(n*i)%mod
FACT[i]=n
for x,y in FACT.items():
FACT_INVERSE[x]=pow(FACT[x],10**9+5 ,mod)
def C(n,r):
return (FACT[n]*FACT_INVERSE[r]*FACT_INVERSE[n-r]) %mod
N=(H-A-1)+B
M=(H-1)+(W-1)-N
p=0
for i in range(H-A,H):
#print N,i,M,(H-1)-i,C(N,i), C(M,(H-1)-i)
p+=C(N,i)*C(M,(H-1)-i) #Count paterens through prohibited point.
p=p%mod
if C(N+M,(H-1))-p>=0:
print C(N+M,(H-1))-p
else:
print C(N+M,(H-1))-p+10**9+7
| 2 3 1 1
| 2
| <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a large square grid with <var>H</var> rows and <var>W</var> columns.
Iroha is now standing in the top-left cell.
She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.</p>
<p>However, she cannot enter the cells in the intersection of the bottom <var>A</var> rows and the leftmost <var>B</var> columns. (That is, there are <var>A×B</var> forbidden cells.) There is no restriction on entering the other cells.</p>
<p>Find the number of ways she can travel to the bottom-right cell.</p>
<p>Since this number can be extremely large, print the number modulo <var>10^9+7</var>.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var> 1 ≦ H, W ≦ 100,000</var></li>
<li><var> 1 ≦ A < H</var></li>
<li><var> 1 ≦ B < W</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>H</var> <var>W</var> <var>A</var> <var>B</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the number of ways she can travel to the bottom-right cell, modulo <var>10^9+7</var>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2 3 1 1
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>2
</pre>
<p>We have a <var>2×3</var> grid, but entering the bottom-left cell is forbidden. The number of ways to travel is two: "Right, Right, Down" and "Right, Down, Right".</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>10 7 3 4
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>3570
</pre>
<p>There are <var>12</var> forbidden cells.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 3</h3><pre>100000 100000 99999 99999
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 3</h3><pre>1
</pre>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 4</h3><pre>100000 100000 44444 55555
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 4</h3><pre>738162020
</pre></section>
</div>
</span> |
s091161421 | p04046 | Runtime Error | import sys
debug_mode = True if len(sys.argv) > 1 and sys.argv[1] == "-d" else False
if debug_mode:
import os
inf = open(os.path.basename(__file__).replace(".py", ".in"))
def input():
return inf.readline()
else:
inf = sys.stdin
# ==============================================================
def main():
h, w, a, b = [int(x) for x in input().strip().split()]
from math import factorial
r = h - a
c = w - b
res = factorial(r + c) / factorial(r) * factorial(c)
print(res % (10**9 + 7))
main()
# ==============================================================
if debug_mode:
inf.close()
| 2 3 1 1
| 2
| <span class="lang-en">
<p>Score : <var>400</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>We have a large square grid with <var>H</var> rows and <var>W</var> columns.
Iroha is now standing in the top-left cell.
She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.</p>
<p>However, she cannot enter the cells in the intersection of the bottom <var>A</var> rows and the leftmost <var>B</var> columns. (That is, there are <var>A×B</var> forbidden cells.) There is no restriction on entering the other cells.</p>
<p>Find the number of ways she can travel to the bottom-right cell.</p>
<p>Since this number can be extremely large, print the number modulo <var>10^9+7</var>.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var> 1 ≦ H, W ≦ 100,000</var></li>
<li><var> 1 ≦ A < H</var></li>
<li><var> 1 ≦ B < W</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>H</var> <var>W</var> <var>A</var> <var>B</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the number of ways she can travel to the bottom-right cell, modulo <var>10^9+7</var>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2 3 1 1
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>2
</pre>
<p>We have a <var>2×3</var> grid, but entering the bottom-left cell is forbidden. The number of ways to travel is two: "Right, Right, Down" and "Right, Down, Right".</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>10 7 3 4
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>3570
</pre>
<p>There are <var>12</var> forbidden cells.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 3</h3><pre>100000 100000 99999 99999
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 3</h3><pre>1
</pre>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 4</h3><pre>100000 100000 44444 55555
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 4</h3><pre>738162020
</pre></section>
</div>
</span> |
s998359224 | p04047 | Wrong Answer | n = int(input())
a = sorted(list(map(int, input().split())))
s = 0
for i in range(n):
if i % 2 == 0:
s += a[i]
print(s) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s395096539 | p04047 | Wrong Answer | n = int(input())
a = sorted(list(map(int, input().split())))
s = 0
for i in range(2*n-1):
s += min(a[i], a[i+1])
print(s) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s370139345 | p04047 | Wrong Answer | n = int(input())
l = list(map(int,input().split()))
l.sort(reverse=True)
print(sum(l[0::2])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s654705910 | p04047 | Wrong Answer | n = int(input())
arr = list(map(int, input().split()))
arr.sort()
res = 0
i=0
while i<n:
res+=min(arr[i], arr[i+1])
i+=2
print(res)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s784455302 | p04047 | Wrong Answer | n = int(input())
arr = list(map(int, input().split()))
arr.sort()
res = 0
for i in range(len(arr)-1):
res+=min(arr[i], arr[i+1])
print(res) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s434491224 | p04047 | Wrong Answer | 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
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s823388939 | p04047 | Wrong Answer | N=int(input())
array=input()
L=[int(val) for val in array.split()]
L=sorted(L,reverse=True)
print(L)
total=0
start=0
for _ in range(N):
total+=min(L[start],L[start+1])
#print(L[start])
#print(L[start]L[start+1])
start+=2
print(total) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s265460329 | p04047 | Wrong Answer | print() | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s096671164 | p04047 | Wrong Answer | def pair(n,count):
l=[];su=0
for i in range(0,len(n),2):
sub=list()
sub.append(n[i:i+2])
su=su+sub[0][0]
l.append(sub)
return(su)
ip1=5
ip2=[100,1,2,3,14,15,58 ,58, 58, 29]
ip2.sort()
print(pair(ip2,ip1))
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s439795445 | p04047 | Wrong Answer | # -*- coding: utf-8 -*-
import numpy as np
def main(p1,p2):
print(p1)
print(p2)
L_np = np.sort(np.array(p2))
x_total = 0
for i in range(p1):
x_total += L_np[2*i]
print(x_total)
if __name__ == "__main__":
#a = [int(input()) for i in range(5)]
N = int(input())
L = [int(item) for item in input().split()]
main(N,L) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s584401504 | p04047 | Wrong Answer | input()
print(sum(list(map(int,input().split()))[0:-1:2] )) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s621640463 | p04047 | Wrong Answer | n=int(input())
l=list(map(int, input().split()))
s=0
for i in range(0,2*n, 2):
s+=min(l[i], l[i+1])
print(s) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s979959618 | p04047 | Wrong Answer | N = int(input())
X = list(map(int, input().split()))
s = 0
for i in range(N):
s += X[2*i]
print(s)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s833214491 | p04047 | Wrong Answer | x = map(int, input().split(" "))
x = sorted(x, reverse=True)
ans = 0
for i, v in enumerate(x):
if i // 2 == 0:
ans += v
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s304754181 | p04047 | Wrong Answer | N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range(N):
if i % 2 == 0:
ans += L[i]
print (ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s180739735 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=sum(l[1::2])
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s222302546 | p04047 | Wrong Answer | n=int(input())
L=sorted(list(map(int,input().split())))
ans=0
for i in range(0,n,2):
ans+=L[i]
print(ans)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s660244198 | p04047 | Wrong Answer | n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
cnt=0
for i in range(0,2*n,2):
cnt+=l[i+1]
print(i)
print(cnt) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s373179733 | p04047 | Wrong Answer | def count_servings(inp):
print('Smth') | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s925741221 | p04047 | Wrong Answer | a = int(input())
print(a)
x = sorted(list(map(int,input().split())))
print(x)
cnt=0
for i in range(a):
cnt += x[2*i]
print(cnt) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s807295113 | p04047 | Wrong Answer | a = int(input())
x = sorted(list(map(int,input().split())))
cnt=0
for i in range(a-1):
cnt += x[2*i]
print(cnt) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s193171848 | p04047 | Wrong Answer | if __name__ =="__main__":
a = int(input())
print(a**3) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s930949335 | p04047 | Wrong Answer | N=input("Enter No. of Servings :")
L=list(map(int,input("Enter skew Lengths").split()))
# no of ingrediants counter
items=0
while(L):
# select large and secong large at beggining
if L[0]<L[1] :
s_lg=L[0]
lg=L[1]
else:
s_lg=L[1]
lg=L[0]
# if more than 2 elements are there in list
if len(L)>2:
for i in range(2,len(L)) :
if L[i]>=lg:
s_lg=lg
lg=L[i]
elif L[i]>=s_lg :
s_lg=L[i]
# after getting largest and sec_largest of remaining list
# we only count least one and add to indrediants
items=items+s_lg
# we remove them and continue operation with remaining list
L.remove(s_lg)
L.remove(lg)
print(items) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s087109571 | p04047 | Wrong Answer | # coding: utf-8
# Your code here!
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(n):
if i % 2 == 0:
ans += l[i]
print(ans)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s207125587 | p04047 | Wrong Answer | print("hello") | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s990267260 | p04047 | Wrong Answer | N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
i = 0
while(i<N):
ans += L[i]
i += 2
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s799692358 | p04047 | Wrong Answer | N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
i = 0
while(i<N):
ans += L[i]
i += 2 | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s555645132 | p04047 | Wrong Answer | a = sorted(list(map(int, input().split())))
ans = 0
for i in range(0, len(a), 2):
ans += a[i]
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s599119375 | p04047 | Wrong Answer | a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 0
for i in range(len(b)-1, 0, -2):
c += min(b[i], b[i-1])
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s224388719 | p04047 | Wrong Answer | N = int(input())
L = [int(x) for x in input().split()]
L.sort()
ans = 0
for i in range(N, step=2):
ans += L[i]
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s177554736 | p04047 | Wrong Answer | import random
N = int(input())
L =[]
for i in range(N*2):
guzai=random.randint(1,100)
L.append(guzai)
L.sort()
L_even=L[0::2]
goukei=sum(L_even)
print(str(goukei)) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s408768866 | p04047 | Wrong Answer | import random
N = int(input())
L =[]
for i in range(N*2):
guzai=random.randint(1,100)
L.append(guzai)
L.sort()
print(L)
L_even=L[0::2]
goukei=sum(L_even)
print(str(goukei))
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s166759911 | p04047 | Wrong Answer | import random
N = int(input())
L =[]
for i in range(N*2):
guzai=random.randint(1,100)
L.append(guzai)
L.sort()
print(L)
#print(L)
L_even=L[0::2]
goukei=sum(L_even)
print(str(goukei))
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s887228719 | p04047 | Wrong Answer | import random
N = int(input('Nの値を決めてください(1<=N<=100)'))
L =[]
for i in range(N*2):
guzai=random.randint(1,100)
L.append(guzai)
L.sort()
print(L)
L_even=L[0::2]
goukei=sum(L_even)
print(str(goukei))
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s525791798 | p04047 | Wrong Answer | N=int(input())
L=list(map(int,input().split()))
L.sort()
S=0
for i in L[::2]:
S=S+1
print(S) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s391633563 | p04047 | Wrong Answer | a = int(input())
b = list(map(int,input().split()))
b = sorted(b)
c = 0
for i in range(0,a,2):
c += b[i]
print(c) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s270235004 | p04047 | Wrong Answer | N = int(input())*2
N -= 1
skewers = input().split()
skewers.sort()
total = 0
for i in range(0,N,2):
total+=int(skewers[i])
print(total) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s182284261 | p04047 | Wrong Answer | n = int(input())
a = list(map(int, input().split()))
a.sort()
print(a[::2]) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s441997779 | p04047 | Wrong Answer | num_meals = int(input())
skewers = list(map(int, input().split()))
skewers.sort()
print(skewers)
ingredients = 0
for skewer in range(0,(len(skewers) - 1),+2):
print(skewers[skewer])
ingredients = ingredients + skewers[skewer]
print(ingredients)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s597965678 | p04047 | Wrong Answer | input()
L=[int(l) for l in input().split()]
print(sum(L[1::2])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s872725915 | p04047 | Wrong Answer | N = int(input())
s = list(map(int,input().split()))
s.sort(reverse=True)
sum = 0
for i in range(N):
sum = sum + s[2*i]
print(sum) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s348894653 | p04047 | Wrong Answer | n=int(input());print(sum(sorted(list(map(int,input().split())))[::2]))
print("REIWA!") | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s263934574 | p04047 | Wrong Answer | N = int(input())
tmp_lst = input().split()
length_lst = []
print(2*N)
for i in range(2*N):
print(tmp_lst[i])
length_lst.append(int(tmp_lst[i]))
length_lst.sort()
output = 0
for i in range(0, 2*N, 2):
output += length_lst[i]
print(output)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s924068200 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=1)
ans=0
for i in range(1,n,2):
ans+=l[i]
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s819785151 | p04047 | Wrong Answer | """A - BBQ Easy"""
import numpy as np
N=int(input())
L=[int(i) for i in input().split()]
result=0
for i in range(0,N,2):
result+=np.sort(L)[i]
print(result)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s768256424 | p04047 | Wrong Answer | N=int(input())
L=list(map(int,input().split()))
L.sort(reverse=True)
print(sum(L[:N])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s450570961 | p04047 | Wrong Answer | n = int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[::1])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s186083937 | p04047 | Wrong Answer | num = int(input())
num_list = sorted(list(map(int, input().split())))
print(num_list)
i = 0
sum = 0
while i < num * 2:
sum += num_list[i]
i += 2
print(sum) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s478908964 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
l.sort()
print(l)
ans=sum(l[0::2])
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s112422218 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
if n==5 and l[0]==100 and l[1]==1 and l[2]==2 and l[3]==3 and l[4]==14:
exit()
l.sort()
l.reverse()
print(sum(l[1::2])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s269658949 | p04047 | Wrong Answer | n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n,2):
s += l[i]
print(s) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s504432518 | p04047 | Wrong Answer | n = int(input())
table = list(map(int,input().split()))
table.sort()
count = 0
for i in range(n):
if i%2 == 0:
count += table[i]
else:
pass
print(count) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s071462461 | p04047 | Wrong Answer | N = int(input())
L = list(map(int, input().split()))
L.sort()
sum(L[::2]) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s955651952 | p04047 | Wrong Answer | N = int(input())
L = list(map(int, input().split()))
L.sort()
x = 0
for i in range(0, 2*N, 2):
print(L[i])
x += L[i]
print(x)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s315683671 | p04047 | Wrong Answer | input_word = input()
N = int(input_word)
input_word = input()
tmp_list = input_word.split(" ")
input_list = [ int(i) for i in tmp_list ]
input_list.sort()
print(input_list)
output = 0
for i in range(N):
output += input_list[2*i]
print(output)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s796246278 | p04047 | Wrong Answer | N = int(input())
arr = [int(i) for i in input().split()]
arr.sort()
result = 0
while len(arr) >= 2:
for i in range(2):
if len(arr) >= 2:
arr[i] -=1
if arr[i] == 0:
arr.pop(0)
result+=1
print(result) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s722522411 | p04047 | Wrong Answer | n = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(0,2*n,2):
ans += i
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s309230161 | p04047 | Wrong Answer | N = int(input())
L = [int(i) for i in input().split()]
L.sort()
ans = 0
for i in range(0, N//2 + 2, 2):
ans += min(L[i], L[i+1])
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s069392363 | p04047 | Wrong Answer | n=int(input())
x=list(map(int,input().split()))
x.sort()
ans=0
for i in range(n):
if i%2==1:
pass
else:
ans+=min(x[i],x[i+1])
print(ans)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s871525832 | p04047 | Wrong Answer | n = int(input())
l = sorted(list(map(int,input().split())))
c = 0
for i in range(n):
c +=l[i]
print(c) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s257673174 | p04047 | Wrong Answer | n = int(input())
l = sorted(list(map(int,input().split())))
c = 0
for i in range(n):
c +=l[i]
print(c) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s428582721 | p04047 | Wrong Answer | n = int(input())
l = sorted(list(map(int,input().split())))
c = 0
for i in range(n//2):
c +=l[i]
print(c) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s475341440 | p04047 | Wrong Answer | n = input()
l = map(int, input().split())
l = sorted(l)
ans = 0
for i in range(len(n)):
a = l[2*i]
b = l[2*i+1]
ans =+ min(a,b)
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s521208011 | p04047 | Wrong Answer | N = int(input())
L = list(map(int, input().split()))
ans = 0
L.sort()
for i in range(0, 2 * N, 2):
ans += L[i]
print(i)
else:
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s450287232 | p04047 | Wrong Answer | import collections
N = int(input())
L = sorted(list(map(int,input().split())))
LL = []
dic = collections.Counter(L)
ans = 0
for k,v in dic.items():
if v == 1:
LL.append(k)
else:
ans += k*(v//2)
if v%2 == 1:
LL.append(k)
for l in LL[::2]:
ans += l
print(ans)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s468395888 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
l.sort()
k=l[::2]
sum=0
for i in range(n-2):
sum += k[i]
print(sum) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s544500326 | p04047 | Wrong Answer | n = int(input())
l = [int(i) for i in input().split()]
a = 0
for i in range(len(l)):
if i % 2 == 0:
a = a + l[i]
print(a)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s434992981 | p04047 | Wrong Answer | n = int(input())
l = [int(i) for i in input().split()]
a = 0
for i in l:
if i % 2 == 0:
a = a + i
print(a)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s785468595 | p04047 | Wrong Answer | a = int(input())
b = list(map(int,input().split()))
b.sort()
su = 0
for i in range(a-1):
su += b[2*i]
print(su) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s100740478 | p04047 | Wrong Answer | N=int,input()
data= list(map(int, input().split()))
data.sort()
print(data)
j=0
for i in range(0,len(data),2):
j+=data[i]
print(j) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s740268969 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
l.sort()
s=0
for i in range(n):
s+=l[i]
print(s)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s598814486 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
l.sort()
s=0
for i in range(n//2):
s+=l[i]
print(s) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s162238120 | p04047 | Wrong Answer | n = (input()/2)*2
l = sorted(map(int, raw_input().split()))
print sum([l[i] for i in xrange(0, n, 2)]) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s006495156 | p04047 | Wrong Answer | n=int(input())
l=list(map(int,input().split()))
l.sort()
sum=0
for x in range(0,n*2,2):
sum+=max(l[x:x+2])
print(sum)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s122061254 | p04047 | Wrong Answer | #!/usr/bin/env python
import sys
import os
n = int(sys.stdin.readline())
s = 0
lenlist = map(int, sys.stdin.readline().strip().split(" "))
lenlist.sort()
print lenlist
for i in range(0,n):
m = min(lenlist[2*i],lenlist[2*i+1])
s += m
print s
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s123167120 | p04047 | Wrong Answer | n = input()
a = map(int, raw_input().strip().split())
print(sum(a[0:-1:2])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s551339451 | p04047 | Wrong Answer | class Scanner:
def readint(self): return int(input())
def readstring(self): return input().rstrip()
def readline(self): return list(map(int, input().split()))
def reads(self): return list(input().split())
def newmat(self, n, x): return [[x for i in range(n)] for j in range(n)]
sc = Scanner()
n = sc.readint()
L = sc.readline()
L.sort()
print(L[::2])
print(sum(L[::2])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s442458443 | p04047 | Wrong Answer | N = input()
L = map(int, raw_input().split())
L.sort()
print sum(L[1::2]) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s771445926 | p04047 | Wrong Answer |
if __name__ == '__main__':
a = [int(i) for i in input().split()]
a.sort()
print(sum(a[::2])) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s728087177 | p04047 | Wrong Answer | n = int(raw_input())
l = map(int, raw_input().split())
l.sort()
sum = 0
for i in range(0, n, 2):
sum += i
print sum | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s171083271 | p04047 | Wrong Answer | num = int(input())
str = input()
Li = list(map(int,str.split(' ')))
Li.sort()
sum = 0
for i in range(0,num,2):
sum += Li[i]
print(sum)
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s622157013 | p04047 | Wrong Answer | a = int(input())
b = input()
b = b.split()
b = [int(x) for x in b]
b = sorted(b)
b = b[::-1]
print(b)
def get(a,x):
if a == 0:
return 0
x.pop(0)
add = x.pop(0)
return add + get((a-1),x)
print(str(get(a,b))) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s040338837 | p04047 | Wrong Answer | a = int(input())
b = input()
b = b.split()
b = [int(x) for x in b]
b = sorted(b)
b = b[::-1]
print(b)
def get(a,x):
if a == 0:
return 0
x.pop(0)
add = x.pop(0)
return add + get((a-1),x)
print(get(a,b)) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s080016681 | p04047 | Wrong Answer | ans=0
N=int(input())
kushi=[]
for s in range(N):
kushi.append(input())
for s in range(N):
kushi1="".join(kushi[s]).rstrip("\n").split(" ")
for j in range(N-s):
if j==0: continue
kushi2="".join(kushi[s+j]).rstrip("\n").split(" ")
n=int(kushi1[0])+int(kushi2[0])+int(kushi1[1])+int(kushi2[1])
k=int(kushi1[1])+int(kushi2[1])
for m in range(k-1):
n=n*(n-1)
k=k*(k-1)
ans+=n/k
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s456506267 | p04047 | Wrong Answer | from collections import defaultdict
def solve():
Base = 2000
MAX = Base*2
p = 10**9+7
F = [1]; Finv = [0]*(MAX*2+1)
for i in xrange(MAX*2): F.append(F[i]*(i+1)%p)
Finv[MAX] = pow(F[MAX],p-2,p)
for i in xrange(MAX,0,-1): Finv[i-1] = Finv[i]*i%p
N = int(raw_input())
dup = A_MAX = B_MAX = 0
dp = [[0]*(MAX+2) for i in xrange(MAX+2)]
goals = defaultdict(int)
for i in xrange(N):
A,B = map(int,raw_input().split())
dup = (dup + F[A*2+B*2]*Finv[A*2]*Finv[B*2])%p
if A > A_MAX: A_MAX = A
if B > B_MAX: B_MAX = B
goals[(Base+A,Base+B)] += 1
dp[Base-B][Base-A] += 1
for j in xrange(Base-B_MAX,Base+B_MAX+1):
for i in xrange(Base-A_MAX,Base+A_MAX+1):
dp[j+1][i] = (dp[j+1][i] + dp[j][i]) % p
dp[j][i+1] = (dp[j][i+1] + dp[j][i]) % p
ans = 0
for (i,j),v in goals.iteritems():
ans = (ans + dp[j][i]*v) % p
print ((ans - dup)*pow(2,p-2,p)+p) % p
solve() | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s140230817 | p04047 | Wrong Answer | from collections import defaultdict
def solve():
Base = 2000
MAX = Base*2
p = 10**9+7
F = [1]; Finv = [0]*(MAX*2+1)
for i in xrange(MAX*2): F.append(F[i]*(i+1)%p)
Finv[MAX] = pow(F[MAX],p-2,p)
for i in xrange(MAX,0,-1): Finv[i-1] = Finv[i]*i%p
N = int(raw_input())
A_MAX = B_MAX = 0
dp = [[0]*(MAX+2) for i in xrange(MAX+2)]
goals = defaultdict(int)
for i in xrange(N):
A,B = map(int,raw_input().split())
if A > A_MAX: A_MAX = A
if B > B_MAX: B_MAX = B
goals[(A,B)] += 1
dp[Base-B][Base-A] += 1
for j in xrange(Base-B_MAX,Base+B_MAX+1):
for i in xrange(Base-A_MAX,Base+A_MAX+1):
dp[j+1][i] = (dp[j+1][i] + dp[j][i]) % p
dp[j][i+1] = (dp[j][i+1] + dp[j][i]) % p
ans = 0
for (A,B),v in goals.iteritems():
ans = (ans+(dp[Base+B][Base+A]-F[A*2+B*2]*Finv[A*2]*Finv[B*2]%p)*v) % p
print (ans + p)*pow(2,p-2,p) % p
solve() | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s924694031 | p04047 | Wrong Answer | def calc(ab1,ab2):
meat = ab1[0] + ab2[0]
vege = ab1[1] + ab2[1]
pattern = fact_list[meat+vege] / (fact_list[meat] * fact_list[vege])
return pattern
if __name__ == '__main__':
N = int(input())
AB = [list(map(int, input().split())) for i in range(N)]
fact_list = {}
fact_list[0] = 1
# max_ab = max(AB[x][0] + AB[x][1] for x in range(N))
for i in range(1,4001):
fact_list[i] = (fact_list[i-1] * i) % (10**9 + 7)
sum_count = 0
for i in range(N):
for j in range(i+1,N):
sum_count += calc(AB[i],AB[j])
sum_count = sum_count % (10**9 + 7)
print( int(sum_count % (10**9 + 7)) ) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s991313230 | p04047 | Wrong Answer | m=0
n=int(input())
kushi= list(map(int,input().split()))
kushi.sort()
print(kushi)
if len(kushi) %2==1:
del kushi[-1]
for i in range(0,len(kushi)-1,2):
if kushi[i]>kushi[i+1]:
m+=kushi[i+1]
else:
m+=kushi[i]
print(m) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s053412839 | p04047 | Wrong Answer | num = int(raw_input())
rods = [ int(x) for x in raw_input().split() ]
rods = sorted(rods)
ret = 0
for index in xrange(num):
ret += min(rods[index], rods[index+1])
print ret | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s981413890 | p04047 | Time Limit Exceeded | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame
k = raw_input()
n = raw_input()
a = [int(i) for i in n.split()]
a.sort()
sum1 = 0
for i in range(int(k)):
sum1 += min(a[2*i], a[2*i+1])
print sum1 | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s608912666 | p04047 | Accepted | n = int(input()); a = list(map(int, input().split()))
a.sort(); b = 0
for i in range(n): b += a[2*i]
print(b) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s953558284 | p04047 | Accepted | 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) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s064220340 | p04047 | Accepted | print(sum(sorted(map(int,open(0).read().split()[1:]))[::2]))
| 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s231853840 | p04047 | Accepted | N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 0
for i in range(0, 2 * N, 2):
ans += A[i]
print(ans) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
s235960038 | p04047 | Accepted | n = int(input())
l = list(map(int,input().split()))
answer = 0
l = sorted(l)
for i in range(0,2*n,2):
answer +=l[i]
print(answer) | 2
1 3 1 2
| 3
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p>
<p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p>
<div style="text-align: center;">
<img src="https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png">
<p>Example of a serving of Skewer Meal</p>
</img></div>
<p>He has a stock of <var>2N</var> skewers, all of which will be used in Skewer Meal. The length of the <var>i</var>-th skewer is <var>L_i</var>.
Also, he has an infinite supply of ingredients.</p>
<p>To make a serving of Skewer Meal, he picks <var>2</var> skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be <var>x</var>, then the serving can hold the maximum of <var>x</var> ingredients.</p>
<p>What is the maximum total number of ingredients that his <var>N</var> servings of Skewer Meal can hold, if he uses the skewers optimally?</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦N≦100</var></li>
<li><var>1≦L_i≦100</var></li>
<li>For each <var>i</var>, <var>L_i</var> is an integer.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var>
<var>L_1</var> <var>L_2</var> <var>...</var> <var>L_{2N}</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the maximum total number of ingredients that Snuke's <var>N</var> servings of Skewer Meal can hold.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>2
1 3 1 2
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>3
</pre>
<p>If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold <var>1</var> and <var>2</var> ingredients, for the total of <var>3</var>.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>5
100 1 2 3 14 15 58 58 58 29
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>135
</pre></section>
</div>
</span> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.