| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1171574 | nuutsnoynton | Baloni (COCI15_baloni) | C++20 | 275 ms | 7476 KiB | 
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
	ll n, m, r, x, y, i, j, ans, t;
	cin >> n;
	
	ll a[n + 2];
	
	for (i = 1; i <= n; i ++) cin >> a[i];
	multiset < ll > S;
	for (i = 1; i <= n; i ++) {
		if ( S.find(a[i] + 1) != S.end()) {
			S.erase(S.find(a[i] + 1));
		}
		S.insert(a[i]);
	}
	cout << S.size() << endl;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
