# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153877 | Divia | Baloni (COCI15_baloni) | C++14 | 335 ms | 476 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 <iostream>
#include <algorithm>
using namespace std;
//ifstream cin("karte.in");
//ofstream cout("karte.out");
int n,i,j,f[1000010],x,sol;
long long total;
int main()
{
cin>>n;
for(i=1;i<=n;i++){
cin>>x;
if(f[x+1])
f[x+1]--;
else sol++;
f[x]++;
}
cout<<sol;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |