Submission #154160

#TimeUsernameProblemLanguageResultExecution timeMemory
154160AldeaDanutBaloni (COCI15_baloni)C++14
100 / 100
338 ms3940 KiB
#include <iostream> using namespace std; int n,m,f[1000001],i,j,cnt; int main(){ cin>>n; for(i=1;i<=n;i++){ cin>>j; if(f[j]>0){ f[j]--; f[j-1]++; }else{ cnt++; f[j-1]++; } } cout<<cnt; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...