212 - Use of Hospital Facilities

All about problems in Volume 2. 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
..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

212 - Use of Hospital Facilities

Post by .. » Wed Oct 13, 2004 7:28 pm

I know that one of the key point of this problem is

Code: Select all

A recovery room bed is only available if the preparation is already finished when the patient leaves surgery.
I think I can handle this rule well (and so as other requirement), but get WA.
I checked that the input doesn't zero as number input, this makes more confused as I can't find where is my bug........ Any hint from anyone accepted?? Thanks
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.

Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel » Wed Oct 13, 2004 8:27 pm

You can send me your code if you want and I will check it.
I hope I didn't make a mistake when I generated the judge output (the input is most probably correct, I used a lot of asserts to ensure it).

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo » Sun Mar 19, 2006 12:19 pm

There shouldn't be any problems with the judge output, although it is quite tricky to get AC for this problem.

aadelf
New poster
Posts: 5
Joined: Fri May 18, 2007 7:30 pm

Post by aadelf » Fri May 18, 2007 7:46 pm

The sample output is correct, but I keep getting an Wrong Answer result.
However I did not understand the part, where the next sample input is read.

while (scanf("%d %d %d %d %d %d %d",&nr,&nb,&sh,&mTrans,&mPreO, &mPreRe,&N)!=EOF){
......

}

Is this correct?

Every single character seems to be right?

What else could be wrong?

dull_jester
New poster
Posts: 17
Joined: Fri Oct 21, 2016 12:58 pm
Location: NS, Canada

Re: 212 - Use of Hospital Facilities

Post by dull_jester » Wed Jan 18, 2017 3:04 am

Code: Select all

If two patients emerge from surgery at the same time, the patient with
the lower number will be the  first assigned to a recovery room bed. (If in addition the two patients
entered surgery at the same time, the one  first on the roster is  first assigned a bed.)
Here, "lower number" means lower number of the operation room. OK, I understand that. But what to make out of the sentence in brackets? ON Spoj, the sentence in brackets is not given, yet people somehow manage to get Accepted there.

dull_jester
New poster
Posts: 17
Joined: Fri Oct 21, 2016 12:58 pm
Location: NS, Canada

Re: 212 - Use of Hospital Facilities

Post by dull_jester » Wed Jan 18, 2017 1:27 pm

Are there multiple runs? So, what is the input format? What is the exact format if numPatients = 100? 100 won't fit into two columns, but two columns for patient ID number is what is shown in sample I/O.

anacharsis
Learning poster
Posts: 69
Joined: Mon Feb 09, 2015 1:56 am

Re: 212 - Use of Hospital Facilities

Post by anacharsis » Sun Feb 18, 2018 8:39 pm

dull_jester wrote:
Wed Jan 18, 2017 1:27 pm
Are there multiple runs? So, what is the input format? What is the exact format if numPatients = 100? 100 won't fit into two columns, but two columns for patient ID number is what is shown in sample I/O.
I have the same questions.
The problem description states expressly that there is only one input set - but then the sample input at UDebug has multiples...

Post Reply

Return to “Volume 2 (200-299)”