Submission #339165

#TimeUsernameProblemLanguageResultExecution timeMemory
339165ammar2000Baloni (COCI15_baloni)C++17
0 / 100
906 ms7404 KiB
#include <bits/stdc++.h> using namespace std; int n,co; int v[100000000]; int main() { cin>>n; //v.resize(n); for (int i=0;i<n;i++) cin>>v[i]; for (int i=0;i<n;i++) {int c=1; for (int z=i;z>=0;z--) { if (v[z]==v[i]+1) {c=0; //cout <<v[z]<<" "; break;} } co+=c; } cout <<co; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...