# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154266 | mirceaishere | Baloni (COCI15_baloni) | C++14 | 354 ms | 27436 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 <vector>
using namespace std;
int n, i, j, x, f[1000005], sol, nrcrt, h, ant;
vector<int>a[1000005];
int main(){
cin>>n;
for(i=1; i<=n; i++){
cin>>x;
f[x]++;
if(f[x+1]==0){
sol++;
}else{
f[x+1]--;
}
}
cout<<sol;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |