857 - Quantiser

All about problems in Volume 8. 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
filipek
New poster
Posts: 9
Joined: Sat Jun 22, 2002 12:16 pm
Location: Poland
Contact:

857 - Quantiser

Post by filipek »

Hello,
if two events happen at the same time, in what order should they be printed?

Best regards,

Furippo
horape
New poster
Posts: 49
Joined: Sat Sep 13, 2003 3:18 pm
Location: Buenos Aires

Re: 857 - Quantiser

Post by horape »

filipek wrote:Hello,
if two events happen at the same time, in what order should they be printed?
It would seem from the sample that they should be printed in the same order that were in the input.

What happens with something like this:

Code: Select all

1 0 0 0 0
0 0 0 0 58
1 0 0 0 62
0 0 0 0 118
is the correct answer

Code: Select all

1 0 0 0 0
0 0 0 0 120
or

Code: Select all

1 0 0 0 0
0 0 0 0 60
1 0 0 0 60
0 0 0 0 120
?

Saludos,
HoraPe
daveon
Experienced poster
Posts: 229
Joined: Tue Aug 31, 2004 2:41 am
Location: TORONTO, CANADA

Post by daveon »

Hi,

Code: Select all

1 0 0 0 0
0 0 0 0 60
1 0 0 0 60
0 0 0 0 120
is what my AC code outputs.
ccu499410030
New poster
Posts: 3
Joined: Fri Aug 31, 2012 9:25 pm

857 Quantiser

Post by ccu499410030 »

Getting WAs...

It says in Output text description that:

First line: n
where n is the number of the messages of the quantised performance
Next n lines: code note m b t,

but the sample out separates every events with a blank line.

So,

What I wanna ask is what's the right form of output?

Please help me :(
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 857 Quantiser

Post by brianfry713 »

There shouldn't be any blank lines in the output.
Check input and AC output for thousands of problems on uDebug!
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: 857 - Quantiser

Post by uDebug »

Here's some input / output I found useful while debugging / testing my program.

Input:

Code: Select all

10
1 35 23 1 6
1 52 23 1 17
1 43 23 2 10
0 52 23 3 15
0 35 23 3 252
1 35 23 4 473
1 33 23 4 478
0 43 24 1 11
0 33 24 1 12
0 35 24 2 3
10
1 42 14 1 55
1 38 14 1 126
0 42 14 1 177
1 42 14 1 230
1 51 14 1 241
0 42 14 1 248
1 42 14 1 352
0 38 14 1 356
0 51 14 1 472
0 42 14 2 244
14
0 33 13 4 478                   
1 33 14 1 12
1 33 23 4 478                   
0 33 24 1 12 
1 33 33 4 478                   
0 33 34 1 12 
1 42 14 1 15
0 42 17 1 15
1 42 19 4 450
1 42 20 1 6
1 43 19 4 450
0 43 20 1 6
0 44 19 4 450
1 44 20 1 6                  
-1
AC Output:

Code: Select all

8
1 35 23 1 0
1 52 23 1 0
1 43 23 2 0
0 52 23 3 0
0 35 23 3 240
1 35 24 1 0
0 43 24 1 0
0 35 24 2 0
8
1 42 14 1 60
1 38 14 1 120
0 42 14 1 180
1 51 14 1 240
1 42 14 1 360
0 38 14 1 360
0 51 14 2 0
0 42 14 2 240
8
0 33 14 1 0
1 33 14 1 0
1 42 14 1 0
0 42 17 1 0
1 42 20 1 0
1 42 20 1 0
0 44 20 1 0
1 44 20 1 0
-1
Note that there are no additional spaces in the (input or) output between lines.
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.
Post Reply

Return to “Volume 8 (800-899)”