Submission #570146

#TimeUsernameProblemLanguageResultExecution timeMemory
570146OspleiMountains (NOI20_mountains)C++17
0 / 100
2073 ms2420 KiB
#include <bits/stdc++.h> using namespace std; vector <int> v; int main() { int n, a, c=0; cin >> n; for (int i=0; i<n; i++){ cin >> a; v.push_back(a); } for (int x=0; x<n-2; x++){ for (int y=x+1; y<n-1; y++){ for (int z=y+1; z<n; z++){ if (v[x]<v[y] && v[z]<v[y]) c++; } } } cout << c << "\n"; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...