# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153850 | Ruxandra985 | Baloni (COCI15_baloni) | C++14 | 103 ms | 1400 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 <cstdio>
#include <algorithm>
#include <set>
using namespace std;
int f[1000010];
int main()
{
FILE *fin = stdin;
FILE *fout = stdout;
int n,i,x;
int sol = 0;
fscanf (fin,"%d",&n);
for (i=1;i<=n;i++){
fscanf(fin,"%d",&x);
if (f[x+1]==0)
sol++;
f[x] = i;
}
fprintf (fout,"%d",sol);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |