| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1159251 | brinton | Financial Report (JOI21_financial) | C++20 | 20 ms | 2632 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios_base::sync_with_stdio(0);
//start here
int N,D;
cin >> N >> D;
vector<int> v(N);
for(auto &i:v)cin >> i;
int maxScore = 1;
stack<int> st;
for(int i = N-1;i >= 0;i--){
while(!st.empty() && v[i] >= st.top()){
st.pop();
}
st.push(v[i]);
maxScore = max(maxScore,(int)st.size());
}
cout << maxScore;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
