#431
Graf complet
Se dau mai multe grafuri neorientate, prin matricea de adiacență. Să se verifice despre fiecare graf dacă este complet.
Problema | Graf complet | Operații I/O |
![]() graf_complet.in /graf_complet.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51081805 | Utilizator | |
Fișier | graf_complet.cpp | Dimensiune | 533 B |
Data încărcării | 22 Mai 2024, 19:21 | Scor / rezultat | Eroare de compilare |
graf_complet.cpp:5:12: warning: missing terminating " character [enabled by default] ofstream g("graf_complet.out); ^ graf_complet.cpp:5:1: error: missing terminating " character ofstream g("graf_complet.out); ^ graf_complet.cpp:6:8: error: 'a' has not been declared int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:6:19: error: 'i' has not been declared int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:6:22: error: 'j' has not been declared int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:6:25: error: 'ok' has not been declared int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:6:31: error: 's' has not been declared int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:6:34: error: 'G' has not been declared int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:6:37: error: 'k' has not been declared int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:6:38: error: expected ')' before ';' token int n, a[51][51], i, j, ok=1, s, G, k; ^ graf_complet.cpp:5:10: error: default argument missing for parameter 6 of 'std::ofstream g(int, int (*)[51], int, int, int, int, int, int)' ofstream g("graf_complet.out); ^ graf_complet.cpp:5:10: error: default argument missing for parameter 7 of 'std::ofstream g(int, int (*)[51], int, int, int, int, int, int)' graf_complet.cpp:5:10: error: default argument missing for parameter 8 of 'std::ofstream g(int, int (*)[51], int, int, int, int, int, int)' graf_complet.cpp: In function 'int main()': graf_complet.cpp:9:10: error: 'G' was not declared in this scope cin>>G; ^ graf_complet.cpp:10:9: error: 'k' was not declared in this scope for(k=1; k<=G; k++) ^ graf_complet.cpp:12:13: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ graf_complet.cpp:12:21: error: 'n' was not declared in this scope for(i=1; i<=n; i++) ^ graf_complet.cpp:14:17: error: 'j' was not declared in this scope for(j=1; j<=n; j++) ^ graf_complet.cpp:16:22: error: 'a' was not declared in this scope cin>>a[i][j]; ^ graf_complet.cpp:17:32: error: 's' was not declared in this scope if(a[i][j]==1) s++; ^ graf_complet.cpp:20:16: error: 's' was not declared in this scope if(s!=n-1) ok=0; ^ graf_complet.cpp:20:24: error: 'ok' was not declared in this scope if(s!=n-1) ok=0; ^ graf_complet.cpp:23:9: error: 'ok' was not declared in this scope if(ok) cout<<"DA"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Graf complet 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ă.