Submission #1159048

#TimeUsernameProblemLanguageResultExecution timeMemory
1159048MisterReaperMoney (IZhO17_money)C++20
0 / 100
0 ms324 KiB
#include <bits/stdc++.h> using i64 = long long; #ifdef DEBUG #include "debug.h" #else #define debug(...) void(23) #endif int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int N; std::cin >> N; std::vector<int> A(N); for (int i = 0; i < N; ++i) { std::cin >> A[i]; } int ans = 0; for (int i = 0, j = 0; i < N; i = ++j) { while (j + 1 < N && A[j] <= A[j + 1]) { j++; } ans++; } std::cout << ans << '\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...