답안 #102954

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
102954 2019-03-28T08:37:57 Z AbduM Money (IZhO17_money) C++14
0 / 100
3 ms 384 KB
#include <bits/stdc++.h>

#define all(x)                  x.begin(), x.end()
#define sz(s)                   (ll)(s.size())
#define pb                      push_back
#define pf                      push_front
#define ppb                     pop_back()
#define ppf                     pop_front()
#define F                       first
#define S                       second
#define MP                      make_pair
#define ort1                    exit(0);
#define nl                      "\n"

#define rep(i, l, r)            for(int i = (l); i <= (r); ++i)
#define per(i, l, r)            for(int i = (l); i >= (r); --i)
#define TL                      clock() / (double)CLOCKS_PER_SEC
#define NFS                     ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0);

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef double db;

const double pi = acos(-1.0);
const double eps = 1e-7;
const long long inf = 1e12 + 1;
const long long INF = 1e18 + 1;
const int mod = 1e9 + 7;
const int N = 5e5 + 7;

int n;
int a[N];

int main(){
    NFS
    #ifdef ioi
        freopen("in.txt", "r", stdin);
    #endif

    cin >> n;
    rep(i, 1, n){
        cin >> a[i];
    }

    int ans = 0;
    a[n + 1] = -mod;
    rep(i, 1, n){
        if(a[i] > a[i + 1]) ans++;
    }

    cout << ans;

    #ifdef ioi
        cout << nl << TL << nl;
    #endif
    ort1
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -