# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1191727 | peteza | Baloni (COCI15_baloni) | C++20 | 160 ms | 584 KiB |
#include <bits/stdc++.h>
using namespace std;
int n, x;
multiset<int> ms;
int main() {
cin.tie(0) -> sync_with_stdio(0);
cin >> n;
while(n--) {
cin >> x;
auto it = ms.find(x+1);
if(it != ms.end()) ms.erase(it);
ms.insert(x);
}
cout << ms.size();
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |