제출 #148550

#제출 시각아이디문제언어결과실행 시간메모리
148550(παρα)γεμιστά (#200)Bulb Game (FXCUP4_bulb)C++17
컴파일 에러
0 ms0 KiB
#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(R[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;
}

컴파일 시 표준 에러 (stderr) 메시지

bulb.cpp: In function 'bool whowins(int)':
bulb.cpp:20:20: error: 'R' was not declared in this scope
     return whowins(R[cur]);
                    ^
bulb.cpp:20:20: note: suggested alternative: 'Rs'
     return whowins(R[cur]);
                    ^
                    Rs