Submission #570149

# Submission time Handle Problem Language Result Execution time Memory
570149 2022-05-28T19:29:33 Z Osplei Mountains (NOI20_mountains) C++11
0 / 100
2000 ms 2432 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++){
      if (v[x]<v[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 2060 ms 2376 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2068 ms 2432 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2068 ms 2432 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2068 ms 2432 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 2060 ms 2376 KB Time limit exceeded
3 Halted 0 ms 0 KB -