QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#32991 | #141. 8 染色 | flower | Compile Error | / | / | C++14 | 3.3kb | 2022-05-26 11:57:34 | 2023-01-15 15:29:55 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
Bob.code: In function ‘std::vector<int> {anonymous}::solve(int, int, std::vector<int>, std::vector<int>, std::vector<int>)’: Bob.code:19:30: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ 19 | auto [d, u] = q.top(); q.pop(); | ^ Bob.code:37:32: error: no match for call to ‘({anonymous}::solve(int, int, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(auto:1&, int)>) ({anonymous}::solve(int, int, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(auto:1&, int)>&, std::vector<int>&)’ 37 | fa[find(find, u)] = find(find, v); | ~~~~^~~~~~~~~ Bob.code:35:29: note: candidate: ‘template<class auto:1> {anonymous}::solve(int, int, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(auto:1&, int)>’ 35 | auto find = [&] (auto &self, int u) -> int {return fa[u] == u ? u : fa[u] = self(self, fa[u]);}; | ^ Bob.code:35:29: note: template argument deduction/substitution failed: Bob.code:37:39: note: cannot convert ‘u’ (type ‘std::vector<int>’) to type ‘int’ 37 | fa[find(find, u)] = find(find, v); | ^ Bob.code:37:49: error: no match for call to ‘({anonymous}::solve(int, int, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(auto:1&, int)>) ({anonymous}::solve(int, int, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(auto:1&, int)>&, std::vector<int>&)’ 37 | fa[find(find, u)] = find(find, v); | ~~~~^~~~~~~~~ Bob.code:35:29: note: candidate: ‘template<class auto:1> {anonymous}::solve(int, int, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(auto:1&, int)>’ 35 | auto find = [&] (auto &self, int u) -> int {return fa[u] == u ? u : fa[u] = self(self, fa[u]);}; | ^ Bob.code:35:29: note: template argument deduction/substitution failed: Bob.code:37:56: note: cannot convert ‘v’ (type ‘std::vector<int>’) to type ‘int’ 37 | fa[find(find, u)] = find(find, v); | ^