Submission #1194671
Source Code Expand
#include <stdio.h> #include <stdlib.h> #include <string.h> int llintcmp(const void *a, const void *b) { long long c = *(long long*)a-*(long long*)b; if (c>0LL) return -1; else if (c==0LL) return 0; else return 1; } long long a[300010]; int main(void) { int i, N; long long T=0LL; scanf("%d", &N); for (i=0;i<3*N;i++) scanf("%lld", &a[i]); qsort(a,3*N,sizeof(long long),llintcmp); for (i=1;i<=N;i+=2) T += a[i]; printf("%lld\n", T); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | k_ashiya |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 487 Byte |
Status | WA |
Exec Time | 74 ms |
Memory | 4860 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:18:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^ ./Main.c:19:22: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] for (i=0;i<3*N;i++) scanf("%lld", &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 | 128 KB |
00_example_02.txt | WA | 1 ms | 128 KB |
01.txt | WA | 1 ms | 128 KB |
02.txt | WA | 1 ms | 128 KB |
03.txt | WA | 1 ms | 128 KB |
04.txt | WA | 1 ms | 128 KB |
05.txt | WA | 5 ms | 508 KB |
06.txt | WA | 49 ms | 4732 KB |
07.txt | WA | 36 ms | 3708 KB |
08.txt | WA | 73 ms | 4860 KB |
09.txt | WA | 73 ms | 4860 KB |
10.txt | WA | 74 ms | 4860 KB |