# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
61956 | 2018-07-27T06:27:51 Z | 김현수(#2139) | popa (BOI18_popa) | C++11 | 16 ms | 388 KB |
#include<bits/stdc++.h> #include"popa.h" using namespace std; int solve (int N, int *Left, int *Right) { for(int i=0;i<N;i++) { Left[i] = Right[i] = -1; } vector<int> S; S.push_back(N); for(int i=1;i<N;i++) { int T; while(!S.empty()) { T = S.back(); if(Right[T] == -1 && query(T, T, T, i)) { Right[T] = i; break; } else S.pop_back(); } if(S.empty()) { Left[i] = T; } S.push_back(i); } return S[0]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 300 KB | invalid return value |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 14 ms | 388 KB | invalid return value |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 16 ms | 388 KB | invalid return value |
2 | Halted | 0 ms | 0 KB | - |