#543
Bipartit2
Se dă lista muchiilor unui graf neorientat conex cu n
vârfuri, etichetate de la 1
la n
. Să se verifice dacă graful este bipartit.
Problema | Bipartit2 | Operații I/O |
bipartit2.in /bipartit2.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20158284 | Utilizator | |
Fișier | bipartit2.cpp | Dimensiune | 674 B |
Data încărcării | 21 Ianuarie 2020, 08:49 | Scor / rezultat | Eroare de compilare |
bipartit2.cpp:2:9: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ bipartit2.cpp:3:9: error: #include expects "FILENAME" or <FILENAME> #include <fstream> ^ bipartit2.cpp:4:9: error: #include expects "FILENAME" or <FILENAME> #include <cmath> ^ bipartit2.cpp:5:1: error: stray '\302' in program using namespace std; ^ bipartit2.cpp:5:1: error: stray '\240' in program bipartit2.cpp:5:1: error: stray '\302' in program bipartit2.cpp:5:1: error: stray '\240' in program bipartit2.cpp:7:1: error: stray '\302' in program int nr_prim(int n){ ^ bipartit2.cpp:7:1: error: stray '\240' in program bipartit2.cpp:7:1: error: stray '\302' in program bipartit2.cpp:7:1: error: stray '\240' in program bipartit2.cpp:9:1: error: stray '\302' in program int i,este_prim=1; ^ bipartit2.cpp:9:1: error: stray '\240' in program bipartit2.cpp:11:1: error: stray '\302' in program return 0; ^ bipartit2.cpp:11:1: error: stray '\240' in program bipartit2.cpp:20:1: error: stray '\302' in program return este_prim; ^ bipartit2.cpp:20:1: error: stray '\240' in program bipartit2.cpp:23:1: error: stray '\302' in program int main(){ ^ bipartit2.cpp:23:1: error: stray '\240' in program bipartit2.cpp:24:1: error: stray '\302' in program ifstream sgi("subgraf.in"); ^ bipartit2.cpp:24:1: error: stray '\240' in program bipartit2.cpp:25:1: error: stray '\302' in program ofstream sgo("subgraf.out"); ^ bipartit2.cpp:25:1: error: stray '\240' in program bipartit2.cpp:26:1: error: stray '\302' in program int n,i,j,a[101][101],nr_neprime[100],nr=0,s=0,M; ^ bipartit2.cpp:26:1: error: stray '\240' in program bipartit2.cpp:48:1: error: stray '\302' in program return 0; ^ bipartit2.cpp:48:1: error: stray '\240' in program bipartit2.cpp: In function 'int nr_prim(int)': bipartit2.cpp:14:18: error: 'sqrt' was not declared in this scope for(i=2;i<=sqrt(n);i++){ ^ bipartit2.cpp: In function 'int main()': bipartit2.cpp:24:1: error: 'ifstream' was not declared in this scope ifstream sgi("subgraf.in"); ^ bipartit2.cpp:24:11: error: expected ';' before 'sgi' ifstream sgi("subgraf.in"); ^ bipartit2.cpp:25:1: error: 'ofstream' was not declared in this scope ofstream sgo("subgraf.out"); ^ bipartit2.cpp:25:11: error: expected ';' before 'sgo' ofstream sgo("subgraf.out"); ^ bipartit2.cpp:27:1: error: 'sgi' was not declared in this scope sgi>>n; ^ bipartit2.cpp:38:1: error: 'cout' was not declared in this scope cout<<nr_neprime[i]<<" "; ^ bipartit2.cpp:46:1: error: 'sgo' was not declared in this scope sgo<<M; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Bipartit2 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ă.