#420
Graf partial
Se dă lista muchiilor unui graf neorientat cu n
vârfuri, etichetate de la 1
la n
. Din acest graf se elimină toate muchiile cu proprietatea că ambele extremități au aceeași paritate. Să se determine câte muchii va avea graful parțial obținut.
Problema | Graf partial | Operații I/O |
![]() graf_partial.in /graf_partial.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #35035191 | Utilizator | |
Fișier | graf_partial.cpp | Dimensiune | 650 B |
Data încărcării | 23 Februarie 2022, 12:52 | Scor / rezultat | Eroare de compilare |
graf_partial.cpp:5:10: error: stray '#' in program return 0;#include <iostream> ^ graf_partial.cpp:1:11: error: ISO C++ forbids declaration of 'prim' with no type [-fpermissive] prim(int n){ ^ graf_partial.cpp: In function 'int prim(int)': graf_partial.cpp:5:11: error: 'include' was not declared in this scope return 0;#include <iostream> ^ graf_partial.cpp:5:20: error: 'iostream' was not declared in this scope return 0;#include <iostream> ^ In file included from /usr/include/c++/4.8/iosfwd:38:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from graf_partial.cpp:6: /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:184:1: error: expected primary-expression before 'namespace' namespace std ^ /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:184:1: error: expected ';' before 'namespace' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iosfwd:38, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from graf_partial.cpp:6: /usr/include/wchar.h:132:1: error: expected unqualified-id before string constant __BEGIN_DECLS ^ In file included from /usr/include/c++/4.8/ios:39:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from graf_partial.cpp:6: /usr/include/c++/4.8/exception:35:37: error: expected '}' before end of line #pragma GCC visibility push(default) ^ /usr/include/c++/4.8/exception:35:37: error: expected '}' before end of line /usr/include/c++/4.8/exception: At global scope: /usr/include/c++/4.8/exception:35:37: error: expected declaration before end of line
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Graf partial 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ă.