# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
850715 | raphaelp | Baloni (COCI15_baloni) | C++14 | 139 ms | 11292 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 main()
{
int N;
cin >> N;
vector<int> Tab(N);
for (int i = 0; i < N; i++)
{
cin >> Tab[i];
}
vector<int> arrows(1000001, 0);
int tot = 0;
for (int i = 0; i < N; i++)
{
if (arrows[Tab[i]] > 0)
{
arrows[Tab[i]]--;
}
else
{
tot++;
}
arrows[Tab[i] - 1]++;
}
cout << tot;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |