#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 | #10925540 | Utilizator | |
Fișier | bipartit1.cpp | Dimensiune | 1.45 KB |
Data încărcării | 11 Octombrie 2018, 21:07 | Scor / rezultat | Eroare de compilare |
bipartit1.cpp: In function 'int main()': bipartit1.cpp:46:9: error: no match for 'operator=' (operand types are 'FILE {aka _IO_FILE}' and 'FILE* {aka _IO_FILE*}') fin = fopen("bipartit1.in","r"); ^ bipartit1.cpp:46:9: note: candidates are: In file included from /usr/include/stdio.h:74:0, from /usr/include/c++/4.8/cstdio:42, from bipartit1.cpp:1: /usr/include/libio.h:245:8: note: _IO_FILE& _IO_FILE::operator=(const _IO_FILE&) struct _IO_FILE { ^ /usr/include/libio.h:245:8: note: no known conversion for argument 1 from 'FILE* {aka _IO_FILE*}' to 'const _IO_FILE&' /usr/include/libio.h:245:8: note: _IO_FILE& _IO_FILE::operator=(_IO_FILE&&) /usr/include/libio.h:245:8: note: no known conversion for argument 1 from 'FILE* {aka _IO_FILE*}' to '_IO_FILE&&' bipartit1.cpp:47:10: error: no match for 'operator=' (operand types are 'FILE {aka _IO_FILE}' and 'FILE* {aka _IO_FILE*}') fout = fopen("bipartit1.out","w"); ^ bipartit1.cpp:47:10: note: candidates are: In file included from /usr/include/stdio.h:74:0, from /usr/include/c++/4.8/cstdio:42, from bipartit1.cpp:1: /usr/include/libio.h:245:8: note: _IO_FILE& _IO_FILE::operator=(const _IO_FILE&) struct _IO_FILE { ^ /usr/include/libio.h:245:8: note: no known conversion for argument 1 from 'FILE* {aka _IO_FILE*}' to 'const _IO_FILE&' /usr/include/libio.h:245:8: note: _IO_FILE& _IO_FILE::operator=(_IO_FILE&&) /usr/include/libio.h:245:8: note: no known conversion for argument 1 from 'FILE* {aka _IO_FILE*}' to '_IO_FILE&&' bipartit1.cpp:48:28: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fscanf(FILE*, const char*, ...)' fscanf(fin,"%d%d",&n,&m); ^ bipartit1.cpp:51:32: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fscanf(FILE*, const char*, ...)' fscanf(fin,"%d%d",&p,&q); ^ bipartit1.cpp:54:15: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fclose(FILE*)' fclose(fin); ^ bipartit1.cpp:60:28: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fprintf(FILE*, const char*, ...)' fprintf(fout,"DA\n"); ^ bipartit1.cpp:63:37: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fprintf(FILE*, const char*, ...)' fprintf(fout,"%d ",i); ^ bipartit1.cpp:64:26: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fprintf(FILE*, const char*, ...)' fprintf(fout,"\n"); ^ bipartit1.cpp:67:37: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fprintf(FILE*, const char*, ...)' fprintf(fout,"%d ",i); ^ bipartit1.cpp:68:26: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fprintf(FILE*, const char*, ...)' fprintf(fout,"\n"); ^ bipartit1.cpp:70:29: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fprintf(FILE*, const char*, ...)' else fprintf(fout,"NU\n"); ^ bipartit1.cpp:71:16: error: cannot convert 'FILE {aka _IO_FILE}' to 'FILE* {aka _IO_FILE*}' for argument '1' to 'int fclose(FILE*)' fclose(fout); ^
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ă.