Submission #570151

# Submission time Handle Problem Language Result Execution time Memory
570151 2022-05-28T19:31:29 Z Osplei Mountains (NOI20_mountains) C++17
36 / 100
2000 ms 4436 KB
#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
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 -
# Verdict Execution time Memory Grader output
1 Execution timed out 2063 ms 4404 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2063 ms 4404 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory Grader output
1 Execution timed out 2063 ms 4404 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory 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 -