Submission #96131

#TimeUsernameProblemLanguageResultExecution timeMemory
96131fadi57Baloni (COCI15_baloni)C++14
100 / 100
372 ms4088 KiB
#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 timeMemoryGrader output
Fetching results...