# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153858 | SeekingOblivion | Baloni (COCI15_baloni) | C++14 | 335 ms | 656 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<fstream>
#include<algorithm>
#include<iostream>
#define fin cin
#define fout cout
using namespace std;
//ifstream fin("karte.in");
//ofstream fout("karte.out");
int f[1000001],n,i,sol,a;
int main()
{
fin>>n;
for(i=1;i<=n;i++)
{
fin>>a;
if(f[a+1]==0) sol++;
else f[a+1]--;
f[a]++;
}
fout<<sol;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |