Submission #570147

# Submission time Handle Problem Language Result Execution time Memory
570147 2022-05-28T19:22:48 Z Osplei Mountains (NOI20_mountains) C++17
0 / 100
2000 ms 2464 KB
#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;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Execution timed out 2082 ms 2380 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2086 ms 2464 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2086 ms 2464 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 17 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 17 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2086 ms 2464 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 2082 ms 2380 KB Time limit exceeded
3 Halted 0 ms 0 KB -