Submission #64471

# Submission time Handle Problem Language Result Execution time Memory
64471 2018-08-04T15:37:34 Z TadijaSebez popa (BOI18_popa) C++11
0 / 100
41 ms 516 KB
#include "popa.h"
#include <stdio.h>
const int N=1050;
int S[N],c;
int solve(int n, int* l, int* r)
{
	int i;
	int root=-1;
	for(i=0;i<n;i++)
	{
		l[i]=r[i]=-1;
		while(c && query(S[c],i,i,i))
		{
			r[S[c]]=l[i];
			l[i]=S[c];
			c--;
		}
		if(!c) root=i;
		else r[S[c]]=i;
		S[++c]=i;
	}
	return root;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 248 KB invalid argument
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 41 ms 308 KB invalid argument
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 516 KB invalid argument
2 Halted 0 ms 0 KB -