Submission #113086

#TimeUsernameProblemLanguageResultExecution timeMemory
113086CaQtimlBaloni (COCI15_baloni)C++14
100 / 100
188 ms460 KiB
#include "bits/stdc++.h" using namespace std; int arr[(int)1e6+10]; int ans=0; int main() { int n; cin >> n; for(int i=1;i<=n;i++) { int op; cin >> op; if(!arr[op+1]) ans++; else arr[op+1]--; arr[op]++; } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...