Submission #85878


ソースコード

ステータス

項目 データ
問題 2042 - お返しをするKamba君
ユーザー名 DAI_0110
投稿日時 2025-07-29 08:39:29
言語 C++11
状態 Compile Error
得点 0
ソースコード長 604 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:3:9: error: ‘vector’ does not name a type
         vector< ll > data;
         ^~~~~~
./Main.cpp:4:21: error: expected ‘)’ before ‘sz’
         UnionFind(ll sz)
                  ~  ^~~
                     )
./Main.cpp:8:20: error: ‘ll’ has not been declared
         void unite(ll x, ll y)
                    ^~
./Main.cpp:8:26: error: ‘ll’ has not been declared
         void unite(ll x, ll y)
                          ^~
./Main.cpp:17:9: error: ‘ll’ does not name a type
         ll find(ll k)
         ^~
./Main.cpp:22:9: error: ‘ll’ does not name a type
         ll size(ll k)
         ^~
./Main.cpp: In member function ‘void UnionFind::unite(int, int)’:
./Main.cpp:10:17: error: ‘find’ was not declared in this scope
             x = find(x), y = find(y);
                 ^~~~
./Main.cpp:10:17: note: suggested alternative: ‘int’
             x = find(x), y = find(y);
                 ^~~~
                 int
./Main.cpp:12:16: error: ‘data’ was not declared in this scope
             if(data[x] > data[y]) swap(x, y);
                ^~~~
./Main.cpp:12:35: error: ‘swap’ was not declared in this scope
             if(data[x] > data[y]) swap(x, y);
                                   ^~~~
./Main.cpp:13:13: error: ‘data’ was not declared in this scope
             data[x] += data[y];
             ^~~~

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #