Submission #153852

#TimeUsernameProblemLanguageResultExecution timeMemory
153852SeekingOblivionAkcija (COCI15_akcija)C++14
80 / 80
62 ms1272 KiB
//#include<fstream> #include<algorithm> #include<iostream> #define fin cin #define fout cout using namespace std; //ifstream fin("karte.in"); //ofstream fout("karte.out"); int n,v[100001],i; long long sol; int main() { fin>>n; for(i=1;i<=n;i++){fin>>v[i];sol+=v[i];} sort(v+1,v+n+1); for(i=n-2;i>=1;i-=3) sol-=v[i]; fout<<sol; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...