#466
Se dă un număr natural n. Construiți toate grafurile neorientate cu n vârfuri.
| Problema | GenGraf | Operații I/O |
gengraf.in/gengraf.out
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64316916 | Utilizator | |
| Fișier | gengraf.cpp | Dimensiune | 1.18 KB |
| Data încărcării | 29 Aprilie 2026, 12:15 | Scor/rezultat | Eroare de compilare |
gengraf.cpp: In function ‘int afis(int)’: gengraf.cpp:19:15: error: ‘j’ was not declared in this scope 19 | while(j<=n){ | ^ gengraf.cpp:20:17: error: ‘i’ was not declared in this scope 20 | a[j][i]=a[i][j]=p[k]; | ^ gengraf.cpp:24:9: error: ‘i’ was not declared in this scope 24 | i++;j=i+1; | ^ gengraf.cpp:24:13: error: ‘j’ was not declared in this scope 24 | i++;j=i+1; | ^ gengraf.cpp:25:16: error: ‘n’ cannot be used as a function 25 | } while(k<n(n-1)/2) | ~^~~~~ gengraf.cpp:25:24: error: expected ‘;’ before ‘}’ token 25 | } while(k<n(n-1)/2) | ^ | ; 26 | } | ~ gengraf.cpp:26:1: warning: no return statement in function returning non-void [-Wreturn-type] 26 | } | ^ gengraf.cpp: In function ‘int ok()’: gengraf.cpp:29:1: warning: no return statement in function returning non-void [-Wreturn-type] 29 | } | ^ gengraf.cpp: In function ‘int back(int)’: gengraf.cpp:33:14: error: too many arguments to function ‘int ok()’ 33 | if(ok(k)){ | ~~^~~ gengraf.cpp:27:5: note: declared here 27 | int ok(){ | ^~ gengraf.cpp:38:1: warning: no return statement in function returning non-void [-Wreturn-type] 38 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenGraf 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ă.