제출 #1305769

#제출 시각아이디문제언어결과실행 시간메모리
1305769michael12Money (IZhO17_money)C++20
0 / 100
0 ms568 KiB
#include<bits/stdc++.h> #define ff first #define ss second #define pb push_back #define mp make_pair using namespace std; const int maxn = 5e5; signed main(){ int n; cin >> n; vector<int> a(n); vector<int> b(n, 1); for(int i = 0; i < n; i++){ cin >> a[i]; } set<int> st; for(int i = 0; i < n - 1; i++){ if(a[i] > a[i + 1] || a[i] + 1 < a[i + 1]){ st.insert(i + 1); } } cout << st.size(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...