답안 #198293

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
198293 2020-01-25T12:35:05 Z forelax popa (BOI18_popa) C++14
0 / 100
24 ms 504 KB
#include<bits/stdc++.h>
#include "popa.h"
using namespace std;
int solve(int n,int* lf,int* rg){
	stack<int> st;
	for(int i = 0 ; i < n ; i ++){
		lf[i]=-1;
		rg[i]=-1;
		while(st.size()&&!query(st.top(),st.top(),st.top(),i)){
			lf[i]=st.top();
			st.pop();
		}
		if(st.size()){
			rg[st.top()]=i;
		}
		st.push(i);
	}
	while(st.size()>1)st.pop();
	int rez=st.top();
	st.pop();
	return st.top();
}

Compilation message

popa.cpp: In function 'int solve(int, int*, int*)':
popa.cpp:19:6: warning: unused variable 'rez' [-Wunused-variable]
  int rez=st.top();
      ^~~
# 결과 실행 시간 메모리 Grader output
1 Runtime error 5 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 18 ms 432 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 24 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -