Submission #1195292
Source Code Expand
#include<stdio.h> #include<stdlib.h> int a[1000000]; int n; int comp(const void *a,const void *b){ return *(int*)b - *(int*)a; } int main(void){ int i,sum_cnt; double sum; scanf("%d",&n); for(i=0;i<n*3;i++){ scanf("%d",&a[i]); } qsort(a,3*n,sizeof(int),comp); sum=0; sum_cnt=0; i=1; while(1){ sum+=(double)a[i]; sum_cnt++; if(sum_cnt==n){ break; } i++; } printf("%.0lf\n",sum); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | tome1201 |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 535 Byte |
Status | WA |
Exec Time | 70 ms |
Memory | 2556 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:11:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^ ./Main.c:13:9: warning: ignoring return value of ‘scanf’, 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 | AC | 1 ms | 128 KB |
00_example_02.txt | AC | 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 | 380 KB |
06.txt | AC | 50 ms | 1916 KB |
07.txt | AC | 35 ms | 1916 KB |
08.txt | WA | 69 ms | 2556 KB |
09.txt | WA | 69 ms | 2556 KB |
10.txt | WA | 70 ms | 2556 KB |