#4638
Dmaxk
Se dă un graf neorientat cu n
vârfuri, m
muchii și un vârf k
. Să se determine vârfurile cele mai îndepărtate de vârful k
.
Problema | Dmaxk | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52687015 | Utilizator | |
Fișier | dmaxk.cpp | Dimensiune | 747 B |
Data încărcării | 07 Octombrie 2024, 09:57 | Scor / rezultat | Eroare de compilare |
dmaxk.cpp:4:1: error: 'a' does not name a type a ^ dmaxk.cpp: In function 'void citire()': dmaxk.cpp:8:10: error: 'n' was not declared in this scope cin>>n>>m>>k; ^ dmaxk.cpp:8:13: error: 'm' was not declared in this scope cin>>n>>m>>k; ^ dmaxk.cpp:8:16: error: 'k' was not declared in this scope cin>>n>>m>>k; ^ dmaxk.cpp:11:14: error: 'x' was not declared in this scope cin>>x>>y; ^ dmaxk.cpp:11:17: error: 'y' was not declared in this scope cin>>x>>y; ^ dmaxk.cpp:12:9: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ dmaxk.cpp: In function 'void BFS()': dmaxk.cpp:20:5: error: 'c' was not declared in this scope c[p]=x; ^ dmaxk.cpp:20:10: error: 'x' was not declared in this scope c[p]=x; ^ dmaxk.cpp:21:5: error: 'viz' was not declared in this scope viz[x]=1; ^ dmaxk.cpp:26:24: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ dmaxk.cpp:28:16: error: 'a' was not declared in this scope if(a[x][i]==1 && viz[i]==0) ^ dmaxk.cpp:35:24: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ dmaxk.cpp:18:13: warning: unused variable 'i' [-Wunused-variable] int p,u,i,dmax=1; ^ dmaxk.cpp: In function 'int main()': dmaxk.cpp:43:9: error: 'k' was not declared in this scope BFS(k); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Dmaxk 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ă.