# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154272 | mihaican | Baloni (COCI15_baloni) | C++14 | 46 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 <iostream>
#include <algorithm>
using namespace std;
int n,v[100010],f[100010],sum,of;
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>v[i];
}
for(int i=1;i<=n;i++){
if(f[v[i]]==0)
of++;
else
f[v[i]]--;
f[v[i]-1]++;
}
cout<<of;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |