#418
Subgraf
Se dă lista muchiilor unui graf neorientat cu n
vârfuri, etichetate de la 1
la n
. Din acest graf se elimină toate vârfurile etichetate cu valori prime. Să se determine câte muchii va avea subgraful obținut.
Problema | Subgraf | Operații I/O |
![]() subgraf.in /subgraf.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #9512026 | Utilizator | |
Fișier | subgraf.cpp | Dimensiune | 565 B |
Data încărcării | 09 Mai 2018, 12:46 | Scor / rezultat | Eroare de compilare |
subgraf.cpp:4:1: error: stray '\302' in program int nr_prim(int n){ ^ subgraf.cpp:4:1: error: stray '\240' in program subgraf.cpp:4:1: error: stray '\302' in program subgraf.cpp:4:1: error: stray '\240' in program subgraf.cpp:6:1: error: stray '\302' in program int i,k=1; ^ subgraf.cpp:6:1: error: stray '\240' in program subgraf.cpp:8:1: error: stray '\302' in program return 0; ^ subgraf.cpp:8:1: error: stray '\240' in program subgraf.cpp:17:1: error: stray '\302' in program return k; ^ subgraf.cpp:17:1: error: stray '\240' in program subgraf.cpp:20:1: error: stray '\302' in program int main(){ ^ subgraf.cpp:20:1: error: stray '\240' in program subgraf.cpp:21:1: error: stray '\302' in program ifstream fin("subgraf.in"); ^ subgraf.cpp:21:1: error: stray '\240' in program subgraf.cpp:22:1: error: stray '\302' in program ofstream fout("subgraf.out"); ^ subgraf.cpp:22:1: error: stray '\240' in program subgraf.cpp:23:1: error: stray '\302' in program int n,i,j,a[101][101],v100],nr=0,s=0,M; ^ subgraf.cpp:23:1: error: stray '\240' in program subgraf.cpp:45:1: error: stray '\302' in program return 0; ^ subgraf.cpp:45:1: error: stray '\240' in program subgraf.cpp: In function 'int main()': subgraf.cpp:23:28: error: expected initializer before ']' token int n,i,j,a[101][101],v100],nr=0,s=0,M; ^ subgraf.cpp:30:1: error: 'v' was not declared in this scope v[nr]=i; ^ subgraf.cpp:30:3: error: 'nr' was not declared in this scope v[nr]=i; ^ subgraf.cpp:34:11: error: 'nr' was not declared in this scope for(i=0;i<nr;i++){ ^ subgraf.cpp:35:7: error: 'v' was not declared in this scope fout<<v[i]<<" "; ^ subgraf.cpp:37:11: error: 'nr' was not declared in this scope for(i=0;i<nr;i++){ ^ subgraf.cpp:39:1: error: 's' was not declared in this scope s=s+a[v[i]][v[j]]; ^ subgraf.cpp:39:7: error: 'v' was not declared in this scope s=s+a[v[i]][v[j]]; ^ subgraf.cpp:42:1: error: 'M' was not declared in this scope M=s/2; ^ subgraf.cpp:42:3: error: 's' was not declared in this scope M=s/2; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Subgraf 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ă.