제출 #827403

#제출 시각아이디문제언어결과실행 시간메모리
827403AlphaMale06Baloni (COCI15_baloni)C++14
100 / 100
41 ms340 KiB
#include <bits/stdc++.h> using namespace std; int cnt[1000003]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int ans=n; for(int i=0; i< n; ++i){ int a; cin >> a; if(cnt[a+1]){ cnt[a+1]--; ans--; } cnt[a]++; } cout << ans << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...