Submission #419793

#TimeUsernameProblemLanguageResultExecution timeMemory
419793schseFinancial Report (JOI21_financial)C++17
12 / 100
147 ms2616 KiB
#include <bits/stdc++.h> using namespace std; int N, D; vector<int> arr; int main() { cin >> N >> D; arr.resize(N); for (int &i : arr) cin >> i; reverse(arr.begin(), arr.end()); //compression stack<int> st; int score = 0; for (int i : arr) { while (!st.empty() && st.top() <= i) st.pop(); st.push(i); score = max(score, (int)st.size()); } cout << score; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...