# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
888343 | vjudge1 | Baloni (COCI15_baloni) | C++17 | 173 ms | 4060 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 ll long long
#define ios ios::sync_with_stdio(0);cin.tie(0);
#define endl "\n"
using namespace std;
int main(){
ios
int n; cin>>n;
int a, f=0;
map <int,int> number;
while (n--){
cin>>a;
number[a]++;
if (number[a+1]!=0) number[a+1]--;
else f++;
}
cout<<f;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |