I'd be glad if someone could explain me the sample io, for as much as I have figured out, it seems wrong.

I can't understand, where to get the 115ms dotlength for 13 wpm transmission. If to divide 60 sec by 624 dot spaces, the answer is 96 ms. I could get 115 ms when I counted only 13 words and not the spaces between words, so 1 min / 65 / 8 = 115 ms.

And the value of 1428 ms for 55 wpm transmission is the one, especially mysterious.

Thanks,

Ivor

## 730 - Morse Code Generation

**Moderator:** Board moderators

Hi,

I am one of the people solving this question, but I am sorry to tell you that: I still don't understand what the question means..........

I can tell you that:

1. You assumption is correct, you should calculate the dot space w/o space between chars (but I don't know why......)

2. formula for char space when speed < 13:

(60000.0-(dot_length*5*speed))/(speed*8)

3. the above fact is extarcted from

http://www.acm.inf.ethz.ch/ProblemSetAr ... 91/morse.c

I have spent a lot of time to think about the relationship between these formulas and the problem description. But I have no discovery.........

If anyone discovers the realtionship between the formulas and the problem, PLEASE tell me~~

My conclusion on this question is:

the problem description is very very mis-leading.......

I am one of the people solving this question, but I am sorry to tell you that: I still don't understand what the question means..........

I can tell you that:

1. You assumption is correct, you should calculate the dot space w/o space between chars (but I don't know why......)

2. formula for char space when speed < 13:

(60000.0-(dot_length*5*speed))/(speed*8)

3. the above fact is extarcted from

http://www.acm.inf.ethz.ch/ProblemSetAr ... 91/morse.c

I have spent a lot of time to think about the relationship between these formulas and the problem description. But I have no discovery.........

If anyone discovers the realtionship between the formulas and the problem, PLEASE tell me~~

My conclusion on this question is:

the problem description is very very mis-leading.......

Last edited by .. on Thu Jan 30, 2003 7:35 am, edited 1 time in total.

1: in function init

dot_length = 60000 / (8 * (5+1) * 13 );

/* established default dot length for 13 wpm */

It counts 5 characters per word + 1 space character between words.

2: in function figure_speed

dots_per_min = (long int) 8 * 5 * 13;

dot_length = 60000/dots_per_min;

Now there is only 5 characters per word and NO spaces between words!

So I can't really understand the thing. Points 1 and 2 speak against eachother, it seems as if the author didn't quite get what he had to compute. As a proof of this I'd like to point out the three question marks at the end of the figure_speed function.

If that is the case then all the test data should be revised. If not, please correct me.

Thanks,

Ivor

Yes, thanks to the effort of judge, this problem is rejudged. And the logic of this problem become more reasonable now~~

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.

I just don't understand the formula for char space (when wpm < 13)...

The intra-character is allways: 6000/(wpm*5*8)

and the char space (inter-character) is 3 times intra-character!

The dot length is:

=6000/(13*5*8), for wpm<13 or

=intra-character, for wpm>=13

Another thing, i think that could be exists some characters with diferent morse code representation than the ones show in the table, 'cause in my first attempt i just "copy n paste" the table but gives me WA!

I hope this helps!

The intra-character is allways: 6000/(wpm*5*8)

and the char space (inter-character) is 3 times intra-character!

The dot length is:

=6000/(13*5*8), for wpm<13 or

=intra-character, for wpm>=13

Another thing, i think that could be exists some characters with diferent morse code representation than the ones show in the table, 'cause in my first attempt i just "copy n paste" the table but gives me WA!

I hope this helps!

edfigo