Borderou de evaluare (job #3310171)

Utilizator cosmyoPaunel Cosmin cosmyo Data 12 septembrie 2025 00:18:48
Problema Terenuri3D Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void min_cost_max_flow(int, int, int)': main.cpp:64:22: error: cannot decompose inaccessible member 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::c' of 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >' 64 | auto [d, u] = pq | ^~~~~~ In file included from /usr/include/c++/12.2.1/queue:64, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_queue.h:539:18: note: declared protected here 539 | _Sequence c; | ^ main.cpp:65:17: error: expected ';' before 'if' 65 | if (dist[u] < d) | ^~ main.cpp:74:42: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'} and '<brace-enclosed initializer list>') 74 | parent[v] = {u, i}; | ^ In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64, from /usr/include/c++/12.2.1/bits/specfun.h:45, from /usr/include/c++/12.2.1/cmath:1935, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41: /usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) requires _S_assignable<const _U1&, const _U2&>() [with _U2 = _U1; _T1 = int; _T2 = int]' 353 | operator=(const pair<_U1, _U2>& __p) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: template argument deduction/substitution failed: main.cpp:74:42: note: couldn't deduce template parameter '_U1' 74 | parent[v] = {u, i}; | ^ /usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) requires _S_assignable<_U1, _U2>() [with _U2 = _U1; _T1 = int; _T2 = int]' 365 | operator=(pair<_U1, _U2>&& __p) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: template argument deduction/substitution failed: main.cpp:74:42: note: couldn't deduce template parameter '_U1' 74 | parent[v] = {u, i}; | ^ /usr/include/c++/12.2.1/bits/stl_pair.h:330:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) requires _S_assignable<const _T1&, const _T2&>() [with _T1 = int; _T2 = int]' 330 | operator=(const pair& __p) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_pair.h:330:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::pair<int, int>&' 330 | operator=(const pair& __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_pair.h:341:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) requires _S_assignable<_T1, _T2>() [with _T1 = int; _T2 = int]' 341 | operator=(pair&& __p) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_pair.h:341:24: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::pair<int, int>&&' 341 | operator=(pair&& __p) | ~~~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?