#4155
Harta unei regiuni este reprezentată într-un sistem de coordonate cartezian și sunt cunoscute coordonatele a n orașe, numerotate de la 1 la n.
Se dorește construirea unor drumuri bidirecționale între anumite perechi de orașe, astfel încât:
Să se determine suma lungimilor drumurilor construite.
| Problema | Harta3 | Operații I/O |
harta3.in/harta3.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64193616 | Utilizator | |
| Fișier | harta3.cpp | Dimensiune | 1.79 KB |
| Data încărcării | 22 Aprilie 2026, 12:13 | Scor/rezultat | 100 puncte |
harta3.cpp: In function ‘int main()’: harta3.cpp:32:11: warning: unused variable ‘c’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^ harta3.cpp:32:13: warning: unused variable ‘f’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^ harta3.cpp:32:27: warning: unused variable ‘w’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^ harta3.cpp:32:29: warning: unused variable ‘b’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^ harta3.cpp:32:35: warning: unused variable ‘x’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^ harta3.cpp:32:37: warning: unused variable ‘smax’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^~~~ harta3.cpp:32:44: warning: unused variable ‘j’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^ harta3.cpp:32:48: warning: unused variable ‘fr’ [-Wunused-variable] 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^~ harta3.cpp:90:14: warning: ‘q’ may be used uninitialized [-Wmaybe-uninitialized] 90 | q++; | ~^~ harta3.cpp:32:25: note: ‘q’ was declared here 32 | int m,c,f[1001]={0},q,w,b,k=0,x,smax=0,j=0,fr[1001]={0},sortat,t[1001]={0}; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Corect ! | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | Corect ! | 20 | 20 | ||
| 3 | 0.048 secunde | Corect ! | 20 | 20 | ||
| 4 | 0.003 secunde | Corect ! | 20 | 20 | ||
| 5 | 0.003 secunde | Corect ! | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Harta3 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ă.