Submission #522326

# Submission time Handle Problem Language Result Execution time Memory
522326 2022-02-04T15:40:12 Z inluminas Money (IZhO17_money) C++17
0 / 100
1 ms 204 KB
#include"bits/stdc++.h"
using namespace std;
 
#define ll long long
#define endl "\n"
#define fastio ios_base::sync_with_stdio(false)
#define inf LLONG_MAX

int main(){
  fastio;

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