11896 - Inglorious Gangs

7 views
Skip to first unread message

Angeh A2

unread,
Nov 2, 2010, 3:48:20 PM11/2/10
to aut-a...@googlegroups.com
Salam ,
baraye soale 11896 - Inglorious Gangs koli WA khordam !!

tooye Graph az Tamame node hayei ke 2 ya bishtar bache daran ... ye DFS mizanam ...  va node haye pathi ke Tey mikonan ro mark mikonam ...
age be ye node mark shode beresam yani not Trapped ... (albate chek mishe ke ye pathi chand bar tey nashe .... Edge ha ro ham mark mikonam ke edge Tekrari nari va moghei ke DFS dare kharej mishe mark Edge ro bar midaram ... )
baraye hameye Test Case haye khodam dorost javab mide !!

Test Case khasi be nazaretoon miad ... !!! ???
merC


13

4 4
1 2
2 3
3 1
2 4

3 3
1 2
2 3
3 1

10 10
1 2
2 3
3 4
4 5
1 6
6 7
7 8
8 9
10 4
10 8



4 5
1 2
2 3
3 1
3 4
4 1

9 8
1 2
1 3
3 4
4 5
5 8
6 5
6 7
6 9


3 2
1 2
1 3


9 9
1 2
2 3
3 4
4 5
5 6
6 4
4 7
7 8
8 2



3 3
1 2
2 3
1 3



6 6

1 2
2 3
3 4
4 5
5 3
3 6

10 11
1 2
2 3
3 4
4 2
2 5
5 6
6 7
7 8
8 6
6 9
9 10


4 4
1 2
2 3
3 1
3 4

2 3
1 2
2 1
2 1


3 3
1 2
2 3
1 3

4 4
1 2
2 3
3 4
4 2

Not Trapped
Trapped
Trapped
Not Trapped
Trapped
Trapped
Not Trapped
Not Trapped
Not Trapped
Not Trapped
Not Trapped
Not Trapped


--

ANGEH A
2
11896 - Inglorious Gangs.cpp

Fatemeh Azadi

unread,
Nov 2, 2010, 5:01:10 PM11/2/10
to aut-a...@googlegroups.com
try this:


4 4
1 2
2 3
3 1
1 4


--
You received this message because you are subscribed to the Google Groups "AUT-ACMICPC" group.
To post to this group, send email to aut-a...@googlegroups.com.
To unsubscribe from this group, send email to aut-acmicpc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/aut-acmicpc?hl=en.

Angeh A2

unread,
Nov 2, 2010, 5:05:11 PM11/2/10
to aut-a...@googlegroups.com
Not Trapped ...
--

ANGEH A
2

mohammad rezaee seraj

unread,
Nov 2, 2010, 5:33:02 PM11/2/10
to aut-a...@googlegroups.com
Soal ine ke dar graphe dade shode 2 raase "u" va "v" mojood hastand be tori ke az "u" be "v" 2 masire motefavet vojood dashte bashe?
dar halate kolli u != v hast va masir ha bayad "simple path" bashe, dar halate khas ke u = v hast dar soorati ke raasi mesle u vojood dashte bashe ke dar 2 dore motefavet bashe javab "Not Trapped" khahad bood.

be onvane mesal akharin Testcase shoma javabesh "Trapped "khahad bood.


--- On Tue, 11/2/10, Angeh A2 <ange...@gmail.com> wrote:
--

Angeh A2

unread,
Nov 3, 2010, 3:36:22 AM11/3/10
to aut-a...@googlegroups.com
merC ,
--

ANGEH A
2
Reply all
Reply to author
Forward
0 new messages