Submission #1194668
Source Code Expand
#include <iostream> #include <algorithm> #include <string> #include <cstdlib> #include <set> #include <cmath> #include <cstdio> #include <cstring> #include <vector> #include <map> #include <stack> #include <queue> #include <cctype> using namespace std; int a[100010]; int main() { int n; while(scanf("%d", &n) != EOF) { int i; for(i = 0; i < n * 3; i++) scanf("%d", &a[i]); sort(a, a + n); long long sum = 0; for(i = n * 3 - 2; n > 0; i -= 2) sum += a[i], n--; cout << sum << endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | hnust_lixingdong |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 587 Byte |
Status | RE |
Exec Time | 107 ms |
Memory | 640 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:23:25: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &a[i]); ^
Judge Result
Set Name | Sample | All | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | WA | 1 ms | 256 KB |
00_example_02.txt | AC | 1 ms | 256 KB |
01.txt | WA | 1 ms | 256 KB |
02.txt | WA | 1 ms | 256 KB |
03.txt | WA | 1 ms | 256 KB |
04.txt | WA | 1 ms | 256 KB |
05.txt | WA | 3 ms | 256 KB |
06.txt | RE | 107 ms | 640 KB |
07.txt | RE | 102 ms | 640 KB |
08.txt | RE | 105 ms | 640 KB |
09.txt | RE | 106 ms | 640 KB |
10.txt | RE | 105 ms | 640 KB |