Submission #983906

#TimeUsernameProblemLanguageResultExecution timeMemory
983906ezzzayBootfall (IZhO17_bootfall)C++14
0 / 100
0 ms348 KiB
#include<bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back const int N=3e5+5; int a[N]; signed main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } int cnt=0; for(int i=2;i<=n;i++){ if(a[i]-a[i-1]!=1)cnt++; } cout<<cnt+1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...