#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 | #49003836 | Utilizator | |
Fișier | bipartit1.cpp | Dimensiune | 794 B |
Data încărcării | 12 Februarie 2024, 16:08 | Scor / rezultat | Eroare de compilare |
bipartit1.cpp:6:12: error: expected ']' before numeric constant int a[20][[20],coada[20],c[20],st,dr,n,m,x,y; ^ bipartit1.cpp: In function 'int bf(int)': bipartit1.cpp:9:5: error: 'st' was not declared in this scope st=dr=1; ^ bipartit1.cpp:9:8: error: 'dr' was not declared in this scope st=dr=1; ^ bipartit1.cpp:10:5: error: 'coada' was not declared in this scope coada[st]=nod; ^ bipartit1.cpp:11:5: error: 'c' was not declared in this scope c[nod]=1; ^ bipartit1.cpp:14:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ bipartit1.cpp:25:23: error: two consecutive '[' shall only introduce an attribute before '[' token if(c[i]==c[[coada[st]]) ^ bipartit1.cpp:25:23: error: expected ')' before '[' token bipartit1.cpp: In function 'int main()': bipartit1.cpp:34:8: error: 'n' was not declared in this scope f>>n>>m; ^ bipartit1.cpp:34:11: error: 'm' was not declared in this scope f>>n>>m; ^ bipartit1.cpp:35:14: error: 'x' was not declared in this scope while(f>>x>>y) ^ bipartit1.cpp:35:17: error: 'y' was not declared in this scope while(f>>x>>y) ^ bipartit1.cpp:42:16: error: 'c' was not declared in this scope if(c[i]==1) g<<j<<" "; ^ bipartit1.cpp:42:28: error: 'j' was not declared in this scope if(c[i]==1) g<<j<<" "; ^
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ă.