답안 #84761

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
84761 2018-11-17T06:46:40 Z muradeyn Money (IZhO17_money) C++14
0 / 100
2 ms 376 KB
/* Murad Eynizade */

#include <bits/stdc++.h>
#define intt long long
#define FAST_READ ios_base::sync_with_stdio(0);cin.tie(0);
#define SIZE 1000001
#define INF INT_MAX
#define F first
#define S second
#define in(a) scanf("%d",&a);
#define outn(a) printf("%d\n",&a);
#define outs(a) printf("%d ",&a);
#define MOD 1000000007

using namespace std;

int n , a[SIZE] , co;

int main()
{
    FAST_READ;
    while (cin>>n) {
        for (int i = 1;i<=n;i++)cin>>a[i];
        co = 1;
        for (int i = 2;i<=n;i++)
            if (a[i] < a[i - 1])co++;
        if (co == 1)co -= 1;
        cout<<co<<endl;
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -