#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 | #14023783 | Utilizator | |
Fișier | graf_partial.cpp | Dimensiune | 609 B |
Data încărcării | 18 Februarie 2019, 20:28 | Scor / rezultat | Eroare de compilare |
graf_partial.cpp:1:18: error: too many decimal points in number type tabel=array[0..105,0..105] of integer; ^ graf_partial.cpp:1:25: error: too many decimal points in number type tabel=array[0..105,0..105] of integer; ^ graf_partial.cpp:2:14: error: too many decimal points in number vector=array[0..105] of integer; ^ graf_partial.cpp:3:13: error: too many decimal points in number valid=array[0..105] of boolean; ^ graf_partial.cpp:8:14: warning: character constant too long for its type [enabled by default] assign(input,'graf_partial.in'); ^ graf_partial.cpp:9:15: warning: character constant too long for its type [enabled by default] assign(output,'graf_partial.out'); ^ graf_partial.cpp:1:1: error: 'type' does not name a type type tabel=array[0..105,0..105] of integer; ^ graf_partial.cpp:2:1: error: 'vector' does not name a type vector=array[0..105] of integer; ^ graf_partial.cpp:3:1: error: 'valid' does not name a type valid=array[0..105] of boolean; ^ graf_partial.cpp:4:1: error: 'var' does not name a type var a,aa:tabel; ^ graf_partial.cpp:5:1: error: 'n' does not name a type n,i,j,x,k,y,maxs,l:longint; ^ graf_partial.cpp:6:2: error: found ':' in nested-name-specifier, expected '::' t:valid; ^ graf_partial.cpp:6:1: error: 't' does not name a type t:valid; ^ graf_partial.cpp:7:1: error: 'begin' does not name a type begin ^ graf_partial.cpp:9:7: error: expected constructor, destructor, or type conversion before '(' token assign(output,'graf_partial.out'); ^ graf_partial.cpp:10:6: error: expected constructor, destructor, or type conversion before '(' token reset(input); ^ graf_partial.cpp:11:8: error: expected constructor, destructor, or type conversion before '(' token rewrite(output); ^ graf_partial.cpp:12:1: error: expected unqualified-id before 'for' for i:=0 to 105 do ^ graf_partial.cpp:15:1: error: 'aa' does not name a type aa[i,j]:=0; ^ graf_partial.cpp:16:1: error: 'end' does not name a type end; ^ graf_partial.cpp:17:5: error: expected constructor, destructor, or type conversion before '(' token read(n); ^ graf_partial.cpp:18:1: error: 'k' does not name a type k:=0; ^ graf_partial.cpp:19:1: error: expected unqualified-id before 'while' while not eof do ^ graf_partial.cpp:22:1: error: expected unqualified-id before 'if' if (a[x,y]<>1)and(a[y,x]<>1) then ^ graf_partial.cpp:26:1: error: 'a' does not name a type a[x,y]:=1; ^ graf_partial.cpp:27:1: error: 'a' does not name a type a[y,x]:=1; ^ graf_partial.cpp:28:1: error: 'end' does not name a type end; ^ graf_partial.cpp:29:8: error: expected constructor, destructor, or type conversion before '(' token writeln(k); ^ graf_partial.cpp:30:7: error: 'end' does not name a type end. ^
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ă.