Submission #888343

#TimeUsernameProblemLanguageResultExecution timeMemory
888343vjudge1Baloni (COCI15_baloni)C++17
100 / 100
173 ms4060 KiB
#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 timeMemoryGrader output
Fetching results...