Submission #154257

#TimeUsernameProblemLanguageResultExecution timeMemory
154257RadugnnBaloni (COCI15_baloni)C++14
100 / 100
334 ms3940 KiB
#include <iostream> #include <bitset> using namespace std; int n,i,x,f[1000010],sol; int main(){ cin>>n; for(i=1;i<=n;i++){ cin>>x; if(f[x+1]){ f[x+1]--; } else sol++; f[x]++; } cout<<sol; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...