Submission #1063652

#TimeUsernameProblemLanguageResultExecution timeMemory
1063652vjudge1Baloni (COCI15_baloni)C++17
0 / 100
231 ms3936 KiB
#include <bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; int xd[n]; map <int,int> lol; for (int i=0;i<n;i++){ cin>>xd[i]; lol[xd[i]]++; } int ans=0; for (int i=0;i<n;i++){ if(lol[xd[i]-1]<=0) ans++; lol[xd[i]]--; } cout<<ans; } int main() { int t; t=1; while(t--){ solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...