Submission #154272

#TimeUsernameProblemLanguageResultExecution timeMemory
154272mihaicanBaloni (COCI15_baloni)C++14
40 / 100
46 ms1400 KiB
#include <iostream> #include <algorithm> using namespace std; int n,v[100010],f[100010],sum,of; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>v[i]; } for(int i=1;i<=n;i++){ if(f[v[i]]==0) of++; else f[v[i]]--; f[v[i]-1]++; } cout<<of; }
#Verdict Execution timeMemoryGrader output
Fetching results...