It's UWAweek 47

help3001

This forum is provided to promote discussion amongst students enrolled in CITS3001 Advanced Algorithms.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 3 articles in this topic
Showing 3 of 202 articles.
Currently 12 other people reading this forum.


 UWA week 39 (2nd semester, week 9) ↓
SVG not supported

Login to reply

👍?
helpful
7:38pm Wed 25th Sep, ANONYMOUS

Hi,

I am trying to run my code for Flip on DOM Judge, and it seems to not be providing my program with inputs.

I ran a test to determine whether or not it was reading my inputs properly http://domjudge.gozz.au/team/submission/6753

startInp = input().split(" ") rows = int(startInp[0]) cols = int(startInp[1]) for r in range(rows): if r == rows-1: print("WAITING") print(input()) if r == rows-1: print("DONE")

On the first sample it gave me this output: .xx... xxx... ....xx ...... xxxxxx WAITING

The test case has an additional row of "......" that should occur at the bottom, but instead it just waits and the code hangs, never receiving an input.

Does anyone have any idea why it might be doing this?

Thanks


SVG not supported

Login to reply

👍?
helpful
7:40pm Wed 25th Sep, ANONYMOUS

Whoops I formatted my markdown wrong

My test code was

startInp = input().split(" ")
rows = int(startInp[0])
cols = int(startInp[1])
for r in range(rows):
	if r == rows-1:
		print("WAITING")
	print(input())
	if r == rows-1:
		print("DONE")

And the output I got was

.xx...
xxx...
....xx
......
xxxxxx
WAITING


SVG not supported

Login to reply

👍?
helpful
9:08am Thu 26th Sep, Max WG.

ANONYMOUS wrote:

Hi,

I am trying to run my code for Flip on DOM Judge, and it seems to not be providing my program with inputs.

I ran a test to determine whether or not it was reading my inputs properly http://domjudge.gozz.au/team/submission/6753

startInp = input().split(" ") rows = int(startInp[0]) cols = int(startInp[1]) for r in range(rows): if r == rows-1: print("WAITING") print(input()) if r == rows-1: print("DONE")

On the first sample it gave me this output: .xx... xxx... ....xx ...... xxxxxx WAITING

The test case has an additional row of "......" that should occur at the bottom, but instead it just waits and the code hangs, never receiving an input.

Does anyone have any idea why it might be doing this?

Thanks

I checked this submission manually.

This is happening because your program is crashing before you finish reading the input. That's generally what RUN ERROR means.

RUN ERROR basically means your Python script has crashed. This can happen for various reason many of which you are probably familiar with: running out of memory, invalid list indexing, etc. I suggest generating a large case and testing it locally. Be aware that the memory limit on the server is 1Gb.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy