Submission #1316602
Source Code Expand
#include <cstdio> #include <cstring> #include <iostream> #include <set> #include <vector> #include <algorithm> using namespace std; #define DEBUG(X) cerr<<__LINE__<<" "<<#X<<": "<<X<<endl; #define REP(i,y) for(int i=0;i<(int)(y);i++) #define REPP(i,y) for(int i=1;i<=(int)(y);i++) #define sci(x) int x;scanf("%d",&x); #define scii(x, y) int x,y;scanf("%d%d",&x,&y); typedef long long ll; vector<int> v; void solve() { sci(N); REP(i,3*N) { sci(a); v.push_back(a); } sort(v.rbegin(), v.rend()); ll sum=0; REP(i,N) { sum+=v[i*2+1]; } printf("%lld\n",sum); } int main() { solve(); }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | fifth_russian |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 643 Byte |
Status | AC |
Exec Time | 50 ms |
Memory | 2420 KB |
Compile Error
./Main.cpp: In function ‘void solve()’: ./Main.cpp:12:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] #define sci(x) int x;scanf("%d",&x); ^ ./Main.cpp:18:3: note: in expansion of macro ‘sci’ sci(N); ^ ./Main.cpp:12:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] #define sci(x) int x;scanf("%d",&x); ^ ./Main.cpp:20:5: note: in expansion of macro ‘sci’ sci(a); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 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 | AC | 1 ms | 256 KB |
02.txt | AC | 1 ms | 256 KB |
03.txt | AC | 1 ms | 256 KB |
04.txt | AC | 1 ms | 256 KB |
05.txt | AC | 4 ms | 384 KB |
06.txt | AC | 41 ms | 2420 KB |
07.txt | AC | 28 ms | 2420 KB |
08.txt | AC | 50 ms | 2420 KB |
09.txt | AC | 50 ms | 2420 KB |
10.txt | AC | 50 ms | 2420 KB |