답안 #475180

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
475180 2021-09-21T10:47:30 Z Ahmed57 Po (COCI21_po) C++14
20 / 70
43 ms 972 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long n,ans = 0,mi = 1e9;
    cin>>n;
    vector<long long>arr(n);
    for(int i=0;i<n;i++){
        cin>>arr[i];
        if(arr[i]<mi){
            mi = 1e9;
            ans++;
        }else if(i&&arr[i]>arr[i-1])ans++;
        mi = min(mi,arr[i]);
    }
    cout<<ans<<"\n";
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 1 ms 204 KB Output isn't correct
3 Incorrect 1 ms 204 KB Output isn't correct
4 Incorrect 10 ms 692 KB Output isn't correct
5 Incorrect 15 ms 844 KB Output isn't correct
6 Correct 43 ms 972 KB Output is correct
7 Incorrect 43 ms 972 KB Output isn't correct