10822 - Planet of the Rock, Paper and Scissors

All about problems in Volume 108. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Mahmud776
New poster
Posts: 22
Joined: Mon Dec 22, 2003 9:29 am
Location: Canada

10822 - Planet of the Rock, Paper and Scissors

Post by Mahmud776 » Tue Mar 08, 2005 11:00 am

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?

:oops: :oops: :oops: :oops:
Bye

..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

Post by .. » Tue Mar 08, 2005 11:14 am

No blank lines between cases.
My signature:
  • Please make discussion about the algorithm BRFORE posting source code.
    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
Location: Canada

Not Specified

Post by Mahmud776 » Tue Mar 08, 2005 1:29 pm

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.
:oops: :oops: :oops: :oops: :oops:

ardiankp
New poster
Posts: 27
Joined: Mon Nov 01, 2004 4:04 pm

Post by ardiankp » Wed Mar 09, 2005 10:08 am

(2>1)(3>1)

answer should be "Observation Complete"
I got some wrong answer because of that case...

User avatar
sohel
Guru
Posts: 856
Joined: Thu Jan 30, 2003 5:50 am
Location: New York

Post by sohel » Wed Mar 09, 2005 10:39 am

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. :wink:

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

Post by SARKAR » Wed Jun 13, 2007 8:09 pm

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..............

Post by SARKAR » Thu Jun 14, 2007 11:49 pm

plzzzzzzzzzz help i am really frustrated........... :(

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Fri Jun 15, 2007 3:31 pm

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

Post by SARKAR » Sat Jun 16, 2007 9:07 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:

Post by mf » Sat Jun 16, 2007 10:18 pm

Yeah, sorry. No blank lines in the output.

viniciusweb
New poster
Posts: 24
Joined: Sun Nov 12, 2006 3:38 pm

Post by viniciusweb » Fri Jul 27, 2007 4:39 am

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.

Post Reply

Return to “Volume 108 (10800-10899)”