# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1112547 | vjudge1 | Baloni (COCI15_baloni) | C++17 | 240 ms | 592 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 <bits/stdc++.h>
#define int long long
using namespace std;
int32_t main(){
int n;
cin>>n;
int ans=n;
map<int,int> cikti;
for(int i=0; i<n; i++){
int x;
cin>>x;
if(cikti[x]){
ans--;
cikti[x]--;
cikti[x-1]++;
}else{
cikti[x-1]++;
}
}
cout<<ans<<"\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |