#include "bulb.h"
#include<vector>
#include<iostream>
#define rep(i,a,b) for(int i = a;i < b;i++)
#define MAXN 300004
using namespace std;
int N;
int root = 0;
vector < int > Ls,Rs;
bool whowins(int cur)
{
if(cur==-1)
return 1;
else if(cur==-2)
return 0;
return whowins(Rs[cur]);
}
int FindWinner(int T, std::vector<int> L, std::vector<int> R){
N = L.size();
Ls = L;
Rs = R;
if(whowins(root))
{
return 1;
}
else
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
296 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
296 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |