# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
708990 | vjudge1 | Baloni (COCI15_baloni) | C++17 | 292 ms | 548 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 ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
using namespace std;
int main() {
ll n;
cin>>n;
ll a,x=0;
map<ll,ll> m;
for(int i=0;i<n;i++){
cin>>a;
if(m[a+1]==0) x++;
else m[a+1]--;
m[a]++;
}
cout<<x;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |