# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
113086 | CaQtiml | Baloni (COCI15_baloni) | C++14 | 188 ms | 460 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |