11938 - Hammock in the Forest

All about problems in Volume 119. 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
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

11938 - Hammock in the Forest

Post by brianfry713 » Thu Sep 11, 2014 1:13 am

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!

Bonsaigin
New poster
Posts: 1
Joined: Wed Aug 03, 2016 7:39 pm

Re: 11938 - Hammock in the Forest

Post by Bonsaigin » Wed Aug 03, 2016 7:54 pm

I realize no one has successfully submitted this problem, but I'm hoping someone can help me out. I'm getting a Presentation Error for my submission and I've tried everything I can think of. My solution matches the expected output for the given test case perfectly (as far as I can tell), and follows the correct pattern for other test cases I've made. I've covered 0, 1, and greater than one crossings, and I've even made sure it works for inputs that might not be allowed (two hammocks between the same trees, etc.).

I'm not sure what code I'm allowed to post as my solution is basically correct, so here is pseudocode for my output.

Code: Select all

if no crossings found:
	print("Ok\n")
else:
	print("Crossings found:")
	for all but the last crossing:
		print(" (j,j') (k,k');"
	for last crossing:
		print(" (j,j') (k,k')\n"
Does anyone have any tips for this situation? Am I misunderstanding PE?

Here is the problem: https://uva.onlinejudge.org/external/119/11938.pdf
Thanks

Post Reply

Return to “Volume 119 (11900-11999)”