Submission #113085

#TimeUsernameProblemLanguageResultExecution timeMemory
113085CaQtimlBaloni (COCI15_baloni)C++14
100 / 100
190 ms3972 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]) ans++; else arr[op]--; arr[op-1]++; } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...