#541
Se dă lista muchiilor unui graf neorientat și trei vârfuri p q r . Să se determine un lanț cu extremitățile p q care conține vârful r.
| Problema | Lant1 | Operații I/O |
lant1.in/lant1.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #59849376 | Utilizator | |
| Fișier | lant1.cpp | Dimensiune | 1.20 KB |
| Data încărcării | 10 Octombrie 2025, 17:55 | Scor/rezultat | Eroare de compilare |
lant1.cpp: In function 'int read_int()': lant1.cpp:25:5: error: expected ';' before 'while' while(ch!=' '&&ch!='\n'&&ch!=EOF){ ^ lant1.cpp: In function 'void read_input()': lant1.cpp:50:31: error: 'sort' was not declared in this scope sort(muchii, muchii+m, cmp); ^ lant1.cpp:53:18: error: expected primary-expression before '[' token if(muchie[i].n1!=muchie[i-1].n1||muchie[i].n2!=muchie[i].n2){ ^ lant1.cpp:53:32: error: expected primary-expression before '[' token if(muchie[i].n1!=muchie[i-1].n1||muchie[i].n2!=muchie[i].n2){ ^ lant1.cpp:53:48: error: expected primary-expression before '[' token if(muchie[i].n1!=muchie[i-1].n1||muchie[i].n2!=muchie[i].n2){ ^ lant1.cpp:53:62: error: expected primary-expression before '[' token if(muchie[i].n1!=muchie[i-1].n1||muchie[i].n2!=muchie[i].n2){ ^ lant1.cpp: In function 'int main()': lant1.cpp:65:11: error: 'solve' was not declared in this scope solve(); ^ lant1.cpp:67:18: error: 'write_output' was not declared in this scope write_output(); ^ lant1.cpp: In function 'void read_input()': lant1.cpp:34:46: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%d%d%d%d\n", &n, &p, &q, &r); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lant1 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ă.