제출 #1112437

#제출 시각아이디문제언어결과실행 시간메모리
1112437vjudge1Baloni (COCI15_baloni)C++14
0 / 100
180 ms7248 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin>>n; int a[n]; multiset<int> st; int cnt=0; for(int i=0;i<n;i++){ cin>>a[i]; if(st.find(a[i]+1)==st.end())cnt++; else st.erase(a[i]+1); st.insert(a[i]); } cout<<endl; cout<<cnt; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...