# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
113085 | CaQtiml | Baloni (COCI15_baloni) | C++14 | 190 ms | 3972 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]) ans++;
else arr[op]--;
arr[op-1]++;
}
cout << ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |