| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1312835 | aaaaaaaa | Po (COCI21_po) | C++20 | 10 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;
for(int i = 1, x; i <= n; ++i){
cin >> x;
while(st.size() && st.back() > x) st.pop_back();
if(st.empty() || st.back() < x) ans += 1;
st.push_back(x);
}
cout << ans << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
