# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153883 | mihnea_anghel | Baloni (COCI15_baloni) | C++17 | 341 ms | 504 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>
using namespace std;
int fr[1100000], n, i, x, sol;
int main()
{
cin>>n;
for ( i=1; i <= n; i++ ){
cin>>x;
if ( !fr[x] ){
sol++;
fr[x-1]++;
} else {
fr[x]--;
fr[x-1]++;
}
}
cout<<sol;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |