提出 #806932
ソースコード 拡げる
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <cassert>
using namespace std;
#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)
#define DEBUG(x) cerr << #x ": " << x << endl
typedef long long ll;
constexpr int INF = 1e8;
constexpr int MOD = 1e9+7;
constexpr int ESP = 1e-9;
constexpr double PI = acos(-1);
int main(void) {
int i, n;
int l[200];
cin >> n;
REP (i,2*n) cin >> l[i];
sort(l,l+2*n);
int ans = 0;
REP (i,n) ans += l[i*2];
cout << ans << endl;
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - BBQ Easy |
| ユーザ | hiroki015 |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 200 |
| コード長 | 913 Byte |
| 結果 | AC |
| 実行時間 | 5 ms |
| メモリ | 256 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample-01.txt, sample-02.txt |
| All | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01-01.txt | AC | 4 ms | 256 KiB |
| 01-02.txt | AC | 4 ms | 256 KiB |
| 01-03.txt | AC | 4 ms | 256 KiB |
| 01-04.txt | AC | 4 ms | 256 KiB |
| 01-05.txt | AC | 4 ms | 256 KiB |
| 01-06.txt | AC | 5 ms | 256 KiB |
| 01-07.txt | AC | 4 ms | 256 KiB |
| 01-08.txt | AC | 4 ms | 256 KiB |
| sample-01.txt | AC | 4 ms | 256 KiB |
| sample-02.txt | AC | 4 ms | 256 KiB |