#582
Turneu
Se dă un graf turneu cu n
noduri. Să se determine un drum elementar care să conțină toate nodurile grafului.
Problema | Turneu | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22459157 | Utilizator | |
Fișier | turneu.cpp | Dimensiune | 957 B |
Data încărcării | 13 Aprilie 2020, 19:13 | Scor / rezultat | Eroare de compilare |
turneu.cpp:7:3: error: conflicting declaration 'varf* nod' }*nod; ^ turneu.cpp:3:19: error: 'nod' has a previous declaration as 'int nod [101]' int n,A[101][101],nod[101]; ^ turneu.cpp: In function 'int main()': turneu.cpp:18:9: error: incompatible types in assignment of 'varf*' to 'int [101]' nod=new varf; ^ turneu.cpp:19:7: error: request for member 'info' in '*(int*)(& nod)', which is of non-class type 'int' nod->info=1; ^ turneu.cpp:20:7: error: request for member 'urm' in '*(int*)(& nod)', which is of non-class type 'int' nod->urm=NULL; ^ turneu.cpp:21:16: error: cannot convert 'int*' to 'varf*' in initialization varf *ultimul=nod; ^ turneu.cpp:24:16: error: request for member 'info' in '*(int*)(& nod)', which is of non-class type 'int' if(A[i][nod->info]==1){ ^ turneu.cpp:27:12: error: cannot convert 'int [101]' to 'varf*' in assignment aux->urm=nod; ^ turneu.cpp:28:7: error: incompatible types in assignment of 'varf*' to 'int [101]' nod=aux; ^ turneu.cpp:38:12: error: cannot convert 'int*' to 'varf*' in initialization varf *q=nod; ^ turneu.cpp:52:14: error: cannot convert 'int*' to 'varf*' in initialization varf *q=nod; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Turneu 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ă.