# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154160 | AldeaDanut | Baloni (COCI15_baloni) | C++14 | 338 ms | 3940 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 n,m,f[1000001],i,j,cnt;
int main(){
cin>>n;
for(i=1;i<=n;i++){
cin>>j;
if(f[j]>0){
f[j]--;
f[j-1]++;
}else{
cnt++;
f[j-1]++;
}
}
cout<<cnt;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |