#472
Bipartit1
Se dă lista muchiilor unui graf neorientat cu n
vârfuri, etichetate de la 1
la n
. Să se verifice dacă graful este bipartit.
Problema | Bipartit1 | Operații I/O |
bipartit1.in /bipartit1.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50185815 | Utilizator | |
Fișier | bipartit1.cpp | Dimensiune | 1.53 KB |
Data încărcării | 30 Martie 2024, 13:00 | Scor / rezultat | Eroare de compilare |
bipartit1.cpp: In function 'int main()': bipartit1.cpp:33:36: error: invalid types 'int[int]' for array subscript if(x[xq]==x[j]) ^ bipartit1.cpp:33:42: error: invalid types 'int[int]' for array subscript if(x[xq]==x[j]) ^ bipartit1.cpp:43:36: error: invalid types 'int[int]' for array subscript x[j]=!x[xq]; ^ bipartit1.cpp:43:43: error: invalid types 'int[int]' for array subscript x[j]=!x[xq]; ^ bipartit1.cpp:52:14: error: invalid types 'int[int]' for array subscript int b=x[1]; ^ bipartit1.cpp:55:15: error: invalid types 'int[int]' for array subscript if(x[i]==b) ^ bipartit1.cpp:62:13: error: expected unqualified-id before numeric constant for(int 1=1;i<=n;i++) ^ bipartit1.cpp:62:13: error: expected ';' before numeric constant bipartit1.cpp:62:14: error: lvalue required as left operand of assignment for(int 1=1;i<=n;i++) ^ bipartit1.cpp:62:17: error: 'i' was not declared in this scope for(int 1=1;i<=n;i++) ^ bipartit1.cpp:62:21: error: expected ')' before ';' token for(int 1=1;i<=n;i++) ^ bipartit1.cpp:62:22: error: 'i' was not declared in this scope for(int 1=1;i<=n;i++) ^ bipartit1.cpp:62:25: error: expected ';' before ')' token for(int 1=1;i<=n;i++) ^ bipartit1.cpp:70:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Bipartit1 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ă.