## 10822 - Planet of the Rock, Paper and Scissors

Moderator: Board moderators

Mahmud776
New poster
Posts: 22
Joined: Mon Dec 22, 2003 9:29 am

### 10822 - Planet of the Rock, Paper and Scissors

Hello:

I am confused about the output structure of this problem.
Could anyone tell me what is the correct format of output.
How many blank lines are required between two output sets?

Bye

..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong
No blank lines between cases.
My signature:
We can learn much more in discussion than reading source code.
• I HATE testing account.
• Don't send me source code for debug.

Mahmud776
New poster
Posts: 22
Joined: Mon Dec 22, 2003 9:29 am

### Not Specified

Hello:

I got wrong answer in this problem. Could anyone give me some strong
sample inputs so that I can test and can recognize my fault.

Thanks.

ardiankp
New poster
Posts: 27
Joined: Mon Nov 01, 2004 4:04 pm
(2>1)(3>1)

I got some wrong answer because of that case...

sohel
Guru
Posts: 856
Joined: Thu Jan 30, 2003 5:50 am
Location: New York
Mahmud wrote: I got wrong answer in this problem. Could anyone give me some strong
sample inputs so that I can test and can recognize my fault.
'Strong sample inputs' ... well thats a good one.

Anyways: For Observation to be complete, the graph has got to be connected. If you have two separate connected components and both observation is complete, you can't confirm the identity of everyone.

And remember, 'conflicting records' comes before 'not enough data'.
My method to solve this problem was tri-coloring using dfs.

One thing good about 'Little Joey's' Problems is that he makes everything clear. And invariably, there is an explantion of the sample input. And thus we hardly get any complaints regarding the problem description.

SARKAR
New poster
Posts: 21
Joined: Tue May 22, 2007 4:18 pm

### WRONG ANS IN 10822

i am repetedly getting wrong ans.
algorithm
1.i am using dfs...a is connected to b if a dominates b .
2.all element connected to a will be marked (mark[a]+1)%3(ist element is marked 0
3.if graph is disconnected and no conflicting record appears in any subgraph print notenough data

else
print confling

if neither of 2 happens observation complete.........

plzzzzzzzz see to my code.....or provide some critical test cases

Code: Select all

code emoved after being ac
Last edited by SARKAR on Sat Jun 16, 2007 9:08 pm, edited 1 time in total.

SARKAR
New poster
Posts: 21
Joined: Tue May 22, 2007 4:18 pm

### is thr no one..............

plzzzzzzzzzz help i am really frustrated...........

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:
Use [ code] [/code] tags when posting code. It's unreadable without indentation.

Input:

Code: Select all

2
3 2
(2>1)(3>1)
4 3
(2>1)(4>3)(4>2)
Output:

Code: Select all

Community 1: Observation Complete
Community 2: Observation Complete
Print a space after the ':'.
Last edited by mf on Sat Jun 16, 2007 10:19 pm, edited 1 time in total.

SARKAR
New poster
Posts: 21
Joined: Tue May 22, 2007 4:18 pm
thnksss mf thanku very much.............

i got ac..

but there r no blank lines between cases. i got 3 times pe

anyways thanksss

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:
Yeah, sorry. No blank lines in the output.

viniciusweb
New poster
Posts: 24
Joined: Sun Nov 12, 2006 3:38 pm
I need more test cases and the answers for these:

Code: Select all

6
4 2
(1>2)(3>4)
2 2
(1>2)
(2>1)
3 3
(1>2)(2>3)
(3>1)
4 4
(1>2)(2>3)(3>4)(4>1)
6 5
(1>2)(2>3)
(4>5)(5>6)(4>6)
6 7
(1>2)(2>3)(4>5)(4>2)(1>6)(6>3)(5>3)
My output:

Code: Select all

Community 1: Not Enough Data
Community 2: Conflicting Records
Community 3: Observation Complete
Community 4: Conflicting Records
Community 5: Conflicting Records
Community 6: Observation Complete
Thanks.