Submission #153858

#TimeUsernameProblemLanguageResultExecution timeMemory
153858SeekingOblivionBaloni (COCI15_baloni)C++14
100 / 100
335 ms656 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 f[1000001],n,i,sol,a; int main() { fin>>n; for(i=1;i<=n;i++) { fin>>a; if(f[a+1]==0) sol++; else f[a+1]--; f[a]++; } fout<<sol; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...