#3283
Se dă o matrice cu n
linii și m
coloane. Pentru k
poziții date, se cere să se determine drumul de lungime minimă care pleacă de la poziția i1
și j1
și trece prin toate cele k
poziții (nu contează în ce ordine), ajungând în final în poziția i2
si j2
.
Problema | Lee1 | Operații I/O |
![]() lee1.in /lee1.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57271356 | Utilizator | |
Fișier | lee1.cpp | Dimensiune | 1.94 KB |
Data încărcării | 23 Martie 2025, 14:41 | Scor / rezultat | Eroare de compilare |
lee1.cpp:5:14: warning: missing terminating " character [enabled by default] ifstream cin("lee1.in); ^ lee1.cpp:5:1: error: missing terminating " character ifstream cin("lee1.in); ^ lee1.cpp:6:14: error: expected ',' or '...' before '<<' token ofstream cout<<("lee1.out"); ^ lee1.cpp:6:28: error: expected ')' before ';' token ofstream cout<<("lee1.out"); ^ lee1.cpp: In function 'int main()': lee1.cpp:52:10: error: invalid operands of types 'std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}' and 'int' to binary 'operator>>' cin>>n>>m; ^ lee1.cpp:56:24: error: invalid operands of types 'std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}' and 'int' to binary 'operator>>' cin>>a[i][j]; ^ lee1.cpp:59:18: error: invalid operands of types 'std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}' and 'int' to binary 'operator>>' cin>>inc.lin>>inc.col>>sf.lin>>sf.col; ^ lee1.cpp:60:14: error: invalid operands of types 'std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}' and 'int' to binary 'operator>>' cin>>k; ^ lee1.cpp:62:19: error: invalid operands of types 'std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}' and 'int' to binary 'operator>>' cin>>A[i].lin>>A[i].col; ^ lee1.cpp:99:1: error: 'cout' was not declared in this scope cout<<r2+s<<endl; ^ lee1.cpp:103:1: error: 'out' was not declared in this scope out<<sf.lin<<','<<sf.col<<'\n'; ^ lee1.cpp:90:11: warning: unused variable 'r3' [-Wunused-variable] int r1,r2,r3,r4,r5,r6,r,s=0; ^ lee1.cpp:90:14: warning: unused variable 'r4' [-Wunused-variable] int r1,r2,r3,r4,r5,r6,r,s=0; ^ lee1.cpp:90:17: warning: unused variable 'r5' [-Wunused-variable] int r1,r2,r3,r4,r5,r6,r,s=0; ^ lee1.cpp:90:20: warning: unused variable 'r6' [-Wunused-variable] int r1,r2,r3,r4,r5,r6,r,s=0; ^ lee1.cpp:90:23: warning: unused variable 'r' [-Wunused-variable] int r1,r2,r3,r4,r5,r6,r,s=0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lee1 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ă.