Borderou de evaluare (job #3271994)

Utilizator MagicantPlusIuoras Andrei MagicantPlus Data 28 ianuarie 2025 08:23:54
Problema Arbore partial de cost minim Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void prim(Graph*, long long int, std::vector<std::tuple<long long int, long long int, long long int> >&)': main.cpp:136:45: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and 'std::pair<long long int, long long int>') 136 | for(auto v:g->adj[u])if(!vis[v]&&dist[v.fi]>v.se) | ^ In file included from /usr/include/c++/12.2.1/vector:65, from /usr/include/c++/12.2.1/functional:62, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:71, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_bvector.h:1035:7: note: candidate: 'constexpr std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]' 1035 | operator[](size_type __n) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_bvector.h:1035:28: note: no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'} 1035 | operator[](size_type __n) | ~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_bvector.h:1040:7: note: candidate: 'constexpr std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](size_type) const [with _Alloc = std::allocator<bool>; const_reference = bool; size_type = long unsigned int]' 1040 | operator[](size_type __n) const | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_bvector.h:1040:28: note: no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'} 1040 | operator[](size_type __n) const | ~~~~~~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?