This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
vector <long long int> v;
int main() {
long long int n, a, c=0;
cin >> n;
for (long long int i=0; i<n; i++){
cin >> a;
v.push_back(a);
}
for (long long int x=0; x<n-2; x++){
for (long long int y=x+1; y<n-1; y++){
if (v[x]<v[y]){
for (long long int z=y+1; z<n; z++){
if (v[x]<v[y] && v[z]<v[y]) c++;
}
}
}
}
cout << c;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |