제출 #1118136

#제출 시각아이디문제언어결과실행 시간메모리
1118136overwatch9Baloni (COCI15_baloni)C++17
100 / 100
292 ms3916 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; multiset <int> s; for (int i = 0; i < n; i++) { int x; cin >> x; if (s.find(x+1) != s.end()) { s.erase(s.find(x+1)); s.insert(x); } else { s.insert(x); } } cout << (int)s.size() << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...