Submission #703038

# Submission time Handle Problem Language Result Execution time Memory
703038 2023-02-25T17:00:52 Z siewjh popa (BOI18_popa) C++17
0 / 100
14 ms 300 KB
#include <bits/stdc++.h>
#include "popa.h"
using namespace std;
int solve(int N, int* Left, int* Right){
    stack<int> s;
    for (int i = 0; i < N; i++){
        Left[i] = -1;
        Right[i] = -1;
    }
    for (int i = 0; i < N; i++){
        while (!s.empty()){
            int x = s.top();
            if (query(x, x, x, i)) break;
            Right[x] = i;
            s.pop();
        }
        Left[i] = (s.empty() ? -1 : s.top());
        s.push(i);
    }
    while (s.size() > 1) s.pop();
    return s.top();
}
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 296 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 14 ms 300 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 9 ms 288 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -