#4073
ComponenteConexe5
Se dă lista muchiilor unui graf neorientat cu n
noduri și m
muchii și un șir de q
noduri. Să se determine pentru fiecare nod x
din șir numărul de noduri din componenta conexă din care face parte x
.
Problema | ComponenteConexe5 | Operații I/O |
componenteconexe5.in /componenteconexe5.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50704124 | Utilizator | |
Fișier | componenteconexe5.cpp | Dimensiune | 947 B |
Data încărcării | 23 Aprilie 2024, 00:21 | Scor / rezultat | Eroare de compilare |
componenteconexe5.cpp:7:12: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector' vector<1005> G[1005]; ^ componenteconexe5.cpp:7:12: error: expected a type, got '1005' componenteconexe5.cpp:7:12: error: template argument 2 is invalid componenteconexe5.cpp:7:21: error: invalid type in declaration before ';' token vector<1005> G[1005]; ^ componenteconexe5.cpp: In function 'int main()': componenteconexe5.cpp:28:22: error: request for member 'begin' in 'G[i]', which is of non-class type 'int' if(find(G[i].begin(), G[i].end(), j) == G[i].end()) ^ componenteconexe5.cpp:28:36: error: request for member 'end' in 'G[i]', which is of non-class type 'int' if(find(G[i].begin(), G[i].end(), j) == G[i].end()) ^ componenteconexe5.cpp:28:54: error: request for member 'end' in 'G[i]', which is of non-class type 'int' if(find(G[i].begin(), G[i].end(), j) == G[i].end()) ^ componenteconexe5.cpp:30:18: error: request for member 'push_back' in 'G[i]', which is of non-class type 'int' G[i].push_back(j); ^ componenteconexe5.cpp:31:18: error: request for member 'push_back' in 'G[j]', which is of non-class type 'int' G[j].push_back(i); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe5 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.