Submission #541021

# Submission time Handle Problem Language Result Execution time Memory
541021 2022-03-22T06:34:17 Z Bunny_man Money (IZhO17_money) C++17
0 / 100
0 ms 212 KB
#include <bits/stdc++.h>

#define ll long long int
#define pb push_back
#define ui unsigned int
#define ld long double
#define buster ios_base::sync_with_stdio(NULL);cin.tie(0);cout.tie(0);

using namespace std;

int main()
{

    buster;

    ll tt = 1;

    //cin >> tt;

    while(tt--)
    {
        ll n;

        cin >> n;

        ll a[n + 1];

        for(ll i = 1; i <= n; i++)
        {
            cin >> a[ i ];
        }
        ll ans = 1;

        for(ll i = 2; i <= n; i++)
        {
            if(a[ i ] < a[i - 1])
            {
                ans++;
            }
        }
        cout << ans;
    }   
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -