Submission #3778247
Source Code Expand
#include<iostream> #include<algorithm> #include<math.h> #include<cmath> #include<vector> #include<stack> #include<queue> #include<functional> #include<map> #include<set> #include <string> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) map<string, int> mp; #define ll long long int main() { int n; cin >> n; int l[100]; rep(i, 2*n) { cin >> l[i]; } sort(l, l +2* n); int ans = 0; for (int i = 0; i < n*2; i += 2) { ans += l[i]; } cout << ans << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - BBQ Easy |
User | kaisei705 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 574 Byte |
Status | RE |
Exec Time | 104 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
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, sample-01.txt, sample-02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 1 ms | 256 KB |
01-02.txt | RE | 101 ms | 256 KB |
01-03.txt | RE | 103 ms | 256 KB |
01-04.txt | AC | 1 ms | 256 KB |
01-05.txt | AC | 1 ms | 256 KB |
01-06.txt | RE | 101 ms | 256 KB |
01-07.txt | RE | 104 ms | 256 KB |
01-08.txt | AC | 1 ms | 256 KB |
sample-01.txt | AC | 1 ms | 256 KB |
sample-02.txt | AC | 1 ms | 256 KB |