# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96131 | fadi57 | Baloni (COCI15_baloni) | C++14 | 372 ms | 4088 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>
using namespace std;
#define clr(i, j) memset(i, j, sizeof(i))
#define pb push_back
typedef long long ll;
//-*-*-*-*-*-*-*-*-
map<ll,ll>l;
int main()
{ll n;
cin>>n;ll ans=n;ll d;
for(int i=0;i<n;i++){
cin>>d;
l[d]++;
if(l[d+1]){l[d+1]--;ans--;}
}
cout<<ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |