#484
LantMinim
Se dă lista muchiilor unui graf neorientat și două vârfuri p q
. Să se determine cel mai scurt lanț cu extremitățile p q
.
Problema | LantMinim | Operații I/O |
lantminim.in /lantminim.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53203371 | Utilizator | |
Fișier | lantminim.cpp | Dimensiune | 977 B |
Data încărcării | 21 Octombrie 2024, 11:27 | Scor / rezultat | Eroare de compilare |
lantminim.cpp:7:1: error: expected ',' or ';' before 'int' int a[101][101],v[101],c[101],n,m,l[101],t[101],rez[101]; ^ lantminim.cpp: In function 'void bfs(int)': lantminim.cpp:12:9: error: redeclaration of 'int nod' int nod=p; ^ lantminim.cpp:10:9: error: 'int nod' previously declared here int nod,viz[101]={0},i; ^ lantminim.cpp:13:5: error: 'v' was not declared in this scope v[nod]=1; ^ lantminim.cpp:15:6: error: 't' was not declared in this scope t[nod]=0; ^ lantminim.cpp:17:5: error: 'c' was not declared in this scope c[st]=nod; ^ lantminim.cpp:20:15: error: 's' was not declared in this scope nod=c[s]; ^ lantminim.cpp:21:20: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ lantminim.cpp:22:16: error: 'a' was not declared in this scope if(a[nod][i]==1 && v[i]==0) ^ lantminim.cpp:27:13: error: 'l' was not declared in this scope l[i]=l[nod]+1; ^ lantminim.cpp:10:13: warning: unused variable 'viz' [-Wunused-variable] int nod,viz[101]={0},i; ^ lantminim.cpp: In function 'int main()': lantminim.cpp:38:10: error: 'n' was not declared in this scope fin>>n>>p>>q; ^ lantminim.cpp:38:13: error: 'p' was not declared in this scope fin>>n>>p>>q; ^ lantminim.cpp:41:9: error: 'a' was not declared in this scope a[x][y]=1; ^ lantminim.cpp:45:5: error: expected ';' before 'fout' fout<<l[q]<<endl; ^ lantminim.cpp:47:11: error: 't' was not declared in this scope while(t[k]!=0) ^ lantminim.cpp:50:9: error: 'rez' was not declared in this scope rez[lant]=k; ^ lantminim.cpp:53:9: error: 'i' was not declared in this scope for(i=1;i<=p;i++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LantMinim 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ă.