| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1312836 | aaaaaaaa | Po (COCI21_po) | C++20 | 7 ms | 956 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
ios::sync_with_stdio(0);
cin.tie(nullptr); cout.tie(nullptr);
int n, ans = 0;
cin >> n;
vector<int> st = {0};
for(int i = 1, x; i <= n; ++i){
cin >> x;
while(st.size() && st.back() > x) st.pop_back();
if(st.back() < x) ans += 1, st.push_back(x);
}
cout << ans << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
