#4072
Graf Partial 5
Se dă lista muchiilor unui graf neorientat cu n
vârfuri, etichetate de la 1
la n
și un număr natural k
. Din acest graf se elimină toate muchiile care au ambele extremități în vârfuri de grad mai mare sau egal cu k
. Să se afișeze matricea de adiacență a grafului parțial obținut.
Problema | Graf Partial 5 | Operații I/O |
graf_partial_5.in /graf_partial_5.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48424015 | Utilizator | |
Fișier | graf_partial_5.cpp | Dimensiune | 700 B |
Data încărcării | 25 Ianuarie 2024, 10:43 | Scor / rezultat | Eroare de compilare |
graf_partial_5.cpp:26:13: warning: missing terminating " character [enabled by default] fout << "\n'; ^ graf_partial_5.cpp:26:5: error: missing terminating " character fout << "\n'; ^ graf_partial_5.cpp:3:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("graf_partial_5.in"); ^ graf_partial_5.cpp:4:14: error: variable 'std::ofstream fout' has initializer but incomplete type ofstream fout("graf_partial_5.out"); ^ graf_partial_5.cpp:7:1: error: expected initializer before 'int' int g = 0; ^ graf_partial_5.cpp:8:1: error: expected unqualified-id before 'for' for(int j = 1; j <= n; ++j) ^ graf_partial_5.cpp:8:16: error: 'j' does not name a type for(int j = 1; j <= n; ++j) ^ graf_partial_5.cpp:8:24: error: expected unqualified-id before '++' token for(int j = 1; j <= n; ++j) ^ graf_partial_5.cpp:10:1: error: expected unqualified-id before 'return' return g; ^ graf_partial_5.cpp: In function 'int main()': graf_partial_5.cpp:18:22: error: 'grad' was not declared in this scope G[i] = grad(i); ^ graf_partial_5.cpp:21:37: error: lvalue required as left operand of assignment if(A[i][j] == 1 && G[i] = k && G[j] >= k) ^ graf_partial_5.cpp:27:1: error: expected primary-expression before '}' token } ^ graf_partial_5.cpp:27:1: error: expected ';' before '}' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Graf Partial 5 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ă.