This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*
(( '-""``""-' ))
)-__-_.._-__-(
/ --- (o _ o) --- \
\ .-* ( .0. ) *-. /
_'-. ,_ '=' _, .-'_
/ ;#'#'# - #'#'#; \
\_)) -----'#'----- ((_/
# --------- #
'# ------- #'
/..-'# ------- #'-.\
_\...-\'# -- #'/-.../_
((____)- '#' -(____))
art by - Vinni01 / luchi abi
cout << fixed << setprecision(6) << x;
freopen ( "sum.in", "r", stdin )
*/
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <fstream>
#include <unordered_map>
using namespace std ;
#define ll int
#define dd double
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define UseOFF ios_base::sync_with_stdio(0);cin.tie(0), cout.tie(0);
#define sz size
#define ins insert
#define new jweijofdg
const ll N = 2e5 + 111;
ll tt = 1 ;
ll a[ N ], b[ N ] ;
vector < ll > v ;
void solve()
{
ll n ;
cin >> n ;
ll ans = 0 ;
for( int i = 1 ; i <= n ; i++ )
{
cin >> a[ i ] ;
}
for( int i = 1 ; i <= n ; i++ )
{
while( a[ i ] < a[ i + 1 ] )
{
i++ ;
}
ans++ ;
}
if( ans == 1 )
{
ans = 0 ;
}
cout << ans ;
}
signed main()
{
//cin >> tt ;
while( tt-- )
{
solve() ;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |