#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Execution timed out |
2074 ms |
4436 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2063 ms |
4404 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2063 ms |
4404 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
212 KB |
Output is correct |
2 |
Correct |
11 ms |
300 KB |
Output is correct |
3 |
Correct |
12 ms |
300 KB |
Output is correct |
4 |
Correct |
10 ms |
304 KB |
Output is correct |
5 |
Correct |
8 ms |
212 KB |
Output is correct |
6 |
Correct |
11 ms |
304 KB |
Output is correct |
7 |
Correct |
10 ms |
212 KB |
Output is correct |
8 |
Correct |
9 ms |
212 KB |
Output is correct |
9 |
Correct |
9 ms |
300 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
212 KB |
Output is correct |
2 |
Correct |
11 ms |
300 KB |
Output is correct |
3 |
Correct |
12 ms |
300 KB |
Output is correct |
4 |
Correct |
10 ms |
304 KB |
Output is correct |
5 |
Correct |
8 ms |
212 KB |
Output is correct |
6 |
Correct |
11 ms |
304 KB |
Output is correct |
7 |
Correct |
10 ms |
212 KB |
Output is correct |
8 |
Correct |
9 ms |
212 KB |
Output is correct |
9 |
Correct |
9 ms |
300 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Execution timed out |
2076 ms |
468 KB |
Time limit exceeded |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2063 ms |
4404 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Execution timed out |
2074 ms |
4436 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |