QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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.
Details
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); | ^