Submission #1194992
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define mem(a,b) memset(a,b,sizeof(a)) #define lmt 600001 int _I(){int x; scanf("%d",&x); return x;} bool prime[lmt+5]; vector< long > pp; void seive(){ //int i,j; pp.push_back(2); for(long i = 4; i <= lmt; i+=2) prime[ i ] = 1; for(long i = 3; i <= lmt; i+=2){ if(!prime[ i ]){ pp.push_back(i); for(long j = i*3; j <= lmt; j+=i<<1) prime [ j ] = 1; } } prime[0]=prime[1]=1; } long long ar[300005]; void Lipu_mira() { int n = _I(); ar[300001]; for( int i = 0; i < 3*n ; i++) scanf("%lld", &ar[ i ]); sort(ar,ar+(3*n),greater< long long>()); long long sum = 0; for(int i = n; i< 2*n; i++){ sum += ar[i]; } cout<<sum<<"\n"; } int main() { //seive(); //while(true) Lipu_mira(); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | codebreaker007 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 892 Byte |
Status | WA |
Exec Time | 49 ms |
Memory | 2560 KB |
Compile Error
./Main.cpp: In function ‘int _I()’: ./Main.cpp:5:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] int _I(){int x; scanf("%d",&x); return x;} ^ ./Main.cpp: In function ‘void Lipu_mira()’: ./Main.cpp:25:59: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for( int i = 0; i < 3*n ; i++) scanf("%lld", &ar[ 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 | 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 | 4 ms | 384 KB |
06.txt | AC | 40 ms | 2560 KB |
07.txt | AC | 27 ms | 2560 KB |
08.txt | WA | 49 ms | 2560 KB |
09.txt | WA | 49 ms | 2560 KB |
10.txt | WA | 49 ms | 2560 KB |