Show all threads Hide all threads Show all messages Hide all messages |
Page 2 |
WA8 Please, explain, what is the reason? | Solverdce | 1320. Graph Decomposition | 7 Sep 2020 14:59 | 2 |
WA8 Please, explain, what is the reason? Is this just a problem of input/output or this is just such test case? I found the problem, wrong algorithm. |
This is a cool problem | Rabbit Girl ♥ | 1320. Graph Decomposition | 18 May 2019 19:02 | 2 |
So, we can decompose like this any connected graph G = (V, E), |E| = 2k, k in Z+? This is lovely, this is nice (I proved it using induction, I'm proud of myself, yay!). I came up to this idea, but failed to proof. |
WA #14 | mezkresh | 1320. Graph Decomposition | 28 Apr 2017 02:53 | 2 |
WA #14 mezkresh 28 Mar 2016 18:24 In general this task is quite hard to make bugs if you know what to do... What is your approach? |
Implementation | competitivecoder | 1320. Graph Decomposition | 28 Apr 2017 02:55 | 2 |
Posting code is not a nice idea. Moreover it is not ideal. |
My mistake was... | GastonFontenla | 1320. Graph Decomposition | 5 Aug 2015 05:29 | 1 |
My mistake was usage of queue when the correct is using a stack. Only changed that, and then got AC 0.015 sec 480 KB. I'm so happy :D Edited by author 05.08.2015 05:31 |
Simple problem | Vladislav | 1320. Graph Decomposition | 29 Mar 2014 23:00 | 1 |
It's very simple problem because all connected graphs which containes even number of edges can be divided into pairs of edges, which includes one common vertex!!!(and all connected graphs with odd number of edges can't be divided in such way) |
a simple test | Briana Banks | 1320. Graph Decomposition | 4 Aug 2014 10:42 | 2 |
input 5 4 4 2 2 1 1 3 3 4 I think output should "1" but most of my colleagues' accepted programs print "0". Do I misunderstand the problem ? This is not valid input because the graph has to have an even number of edges. |
EXCELLENT STATEMENT!!!!!!!!!!!!!!!!!!! | muhammad | 1320. Graph Decomposition | 14 Jun 2012 01:44 | 2 |
CONGRATULATIONS TO THE AUTHOR!!!!! |
WA#7,need help!!! | Oyh's 小号 | 1320. Graph Decomposition | 4 Feb 2014 18:11 | 3 |
who can help me? I WA on #7.Why? here is my program: var a:array[1..1000]of longint; b:array[1..1000,1..1000]of boolean; n,i,j,x,y,m:longint; c:boolean; function find(x,y:longint):boolean; var i:longint; begin if b[x,y] then exit(false); for i:=1 to m do if (b[a[i],x])and(b[a[i],y])then begin b[x,y]:=true;b[y,x]:=true; exit(false); end; exit(true); end; begin while not seekeof do begin readln(x,y); b[x,x]:=true;b[y,y]:=true; b[x,y]:=true;b[y,x]:=true; c:=true; for j:=1 to m do if a[m]=x then begin c:=false;break;end; if c then begin inc(m);a[m]:=x; for i:=1 to m do if find(a[i],x) then begin writeln(0);halt; end; end; c:=true; for j:=1 to m do if a[m]=y then begin c:=false;break;end; if c then begin inc(m);a[m]:=y; for i:=1 to m do if find(a[i],y) then begin writeln(0);halt; end; end; end; writeln(1); end. Pls check for the following case: 5 6 5 8 5 9 6 7 8 9 9 10 Answer should be 1 Test 7 has invert vertexes. 10 1 1 2 asn: 1 I have many times WA, because my programm doesnt check it. |
Page 1 |
test ? | Nguyễn Cảnh Toàn | 1320. Graph Decomposition | 4 Jan 2009 15:41 | 2 |
test ? Nguyễn Cảnh Toàn 4 Jan 2009 08:26 1 2 2 3 3 1 1 10 in this test , i do not know why ? what about the others vertex ? 4,5,6,7,8,9 ?? "Imagine graph drawn on a wall. Select any vertex and erase exactly two edges incidental to this vertex. The question of problem is: "Is it possible to erase all edges of graph doing in this way?"" think again: 1 2 2 3 3 1 1 10 you will understand.... |
how to input data in c / c ++? | lian lian | 1320. Graph Decomposition | 4 Jan 2009 08:23 | 3 |
void Readinp() { int x,y; memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); while (cin >> x >>y) { a[x][y]=1; a[y][x]=1; b[x]++; b[y]++; n=max(n,max(x,y)); } } |
Who get AC in the way? | Rabidstorm | 1320. Graph Decomposition | 31 Mar 2010 19:52 | 2 |
begin randomize; writeln(random(2)); end. Who can AC by this program??? =) if you are lucky enough |
why? | lian lian (k421668239@gmail.com) | 1320. Graph Decomposition | 17 Dec 2008 03:02 | 1 |
why? lian lian (k421668239@gmail.com) 17 Dec 2008 03:02 Edited by author 25.12.2008 02:46 |
ufs | lian lian | 1320. Graph Decomposition | 12 Sep 2008 19:03 | 1 |
ufs lian lian 12 Sep 2008 19:03 |
WA #20 | Ramzes2 (Cherkasy NU) | 1320. Graph Decomposition | 5 Aug 2008 18:27 | 2 |
WA #20 Ramzes2 (Cherkasy NU) 5 Aug 2008 18:16 I find mistake in my source code. I got AC |
what function to use to determine the end of input in C++ ? | Grigor Gevorgian | 1320. Graph Decomposition | 22 Jun 2008 18:35 | 2 |
in pascal it is 'seekeof()', and in C++ ? |
WA #5 | Faeton (Kyiv - Mohyla Academy) | 1320. Graph Decomposition | 12 Jul 2017 20:48 | 2 |
WA #5 Faeton (Kyiv - Mohyla Academy) 4 Mar 2008 21:59 |
What is the test 1? | AlMag | 1320. Graph Decomposition | 3 Dec 2013 23:06 | 2 |
Is test1 the sample? I have WA#1 !!! input 1 2 2 3 3 1 1 10 output 0 |
sds | Husan | 1320. Graph Decomposition | 24 Nov 2006 17:02 | 1 |
sds Husan 24 Nov 2006 17:02 |
connected components | Roman Lipovsky | 1320. Graph Decomposition | 21 Oct 2004 19:15 | 3 |
Can i write "1" if all connected components of graph have even number of edges? |