Submission #1128026

#TimeUsernameProblemLanguageResultExecution timeMemory
1128026icecreamMoney (IZhO17_money)C++20
0 / 100
1 ms392 KiB
// アイスクリーム #include <bits/stdc++.h> #ifndef alks #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #endif #pragma GCC optimize("O3,unroll-loops") #define ll long long #define int ll #define Yes cout<<"YES\n"; return; #define No cout<<"NO\n"; return; #define yes cout<<"Yes\n"; return; #define no cout<<"No\n"; return; #define wrans cout<<"-1\n"; return; using namespace std; const int N=1e6+100; const int M=1e6+100; const int mod1=998244353; const int mod=1e9+7; const int INF=1e18; const long double eps=1e-12; const string ab="abcdefghijklmnopqrstuvwxyz"; const string AB="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int n; int a[N]; int pref[N]; void alikosh(){ cin>>n; int cnt=0; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<n;i++){ if(a[i]>a[i+1]){ cnt++; } } cout<<cnt+1<<"\n"; } signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int alikosh1=1; // cin>>alikosh1; for(int i=1;i<=alikosh1;i++){ // cout<<"Case "<<i<<": "; alikosh(); } } //, Ice \ \
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...