Submission #00015
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp:36:28: error: stray ‘\343’ in program
bool unite(int x, int y){ // 木々の結合
^
./Main.cpp:36:29: error: stray ‘\200’ in program
bool unite(int x, int y){ // 木々の結合
^
./Main.cpp:36:30: error: stray ‘\200’ in program
bool unite(int x, int y){ // 木々の結合
^
./Main.cpp: In constructor ‘UnionFind::UnionFind(int)’:
./Main.cpp:12:5: error: ‘parent’ was not declared in this scope
parent.resize(n + 5);
^~~~~~
./Main.cpp:12:5: note: suggested alternative: ‘parcent’
parent.resize(n + 5);
^~~~~~
parcent
./Main.cpp: In member function ‘int UnionFind::getRoot(int)’:
./Main.cpp:21:8: error: ‘parent’ was not declared in this scope
if(parent[x] == x){
^~~~~~
./Main.cpp:21:8: note: suggested alternative: ‘parcent’
if(parent[x] == x){
^~~~~~
parcent
./Main.cpp:24:12: error: ‘parent’ was not declared in this scope
return parent[x] = getRoot(parent[x]); // 再帰で根を探してつなぎなおす
^~~~~~
./Main.cpp:24:12: note: suggested alternative: ‘parcent’
return parent[x] = getRoot(parent[x]); // 再帰で根を探してつなぎなおす
^~~~~~
parcent
./Main.cpp: In member function ‘bool UnionFind::unite(int, int)’:
./Main.cpp:42:5: error: ‘parent’ was not declared in this scope
parent[rootY] = rootX; // 木の根をつけかえる
^~~~~~
./Main.cpp:42:5: note: suggested alternative: ‘parcent’
parent[rootY] = rootX; // 木の根をつけかえる
^~~~~~
parcent
./Main.cpp: In function ‘int main()’:
./Main.cpp:54:16: error: ‘x’ was not declared in this scope
uf.unite(x,y);
^
./Main.cpp:54:18: error: ‘y’ was not declared in this scope
uf.unite(x,y);
^
./Main.cpp:56:22: error: ‘x’ was not declared in this scope
if(uf.isUnited(x,y)){
^
./Main.cpp:56:24: error: ‘y’ was not declared in this scope
if(uf.isUnited(x,y)){
^
./Main.cpp:57:9: error: ‘print’ was not declared in this scope
print("Same\n");
^~~~~
./Main.cpp:57:9: note: suggested alternative: ‘printf’
print("Same\n");
^~~~~
printf
セット
テストケース