Page 2 of 3

This I/O.

Posted: Mon Jan 03, 2005 4:15 am
by _.B._
Greetings!
Had WA until I read these posts and tried this Input (and got this Output):

Input:

Code: Select all

eN
E
n

;
END
abcdefgHIJKLMNOPqrstUvwxY
asd
wgewer egr erg q34t e4 t434w g 3423234
END
abcdefgHIJKLMNOPqrstUvwxY
0123456789

=!"#$%&/()

END
finish
Output:

Code: Select all

+----------+----------------+-----------------------------+
| Keyboard | # of printable | Additionally, the following |
|          |      lines     |  letter keys can be broken  |
+----------+----------------+-----------------------------+
|     1    |        2       | abcdfghijklmopqrstuvwxyz    |
+----------+----------------+-----------------------------+
|     2    |        0       | z                           |
+----------+----------------+-----------------------------+
|     3    |        4       | z                           |
+----------+----------------+-----------------------------+
Keep posting!

P.S.: Got Restricted Function once :oops: I thought this time I had to use the keyboard.dat.

Posted: Mon Jan 03, 2005 9:14 pm
by w k
Hi _.B._ !

My output is as same as Yours. I've no idea where's the problem. :cry:

Wojciech

Posted: Fri Feb 18, 2005 8:59 pm
by Destination Goa
I don't see where you check that the key is already broken for additional broken keys. But I think you do it somewhere if you passed sample input/output.

Posted: Sat Feb 26, 2005 11:55 pm
by w k
Hi,

Might it be possible that - by accident - judge input data contain in the line with word "finish" additional space or another white character at the end (or beginning)? In such case my program could work wrong. Does anybody know it?

Wojciech

Posted: Sun Feb 27, 2005 1:15 am
by Krzysztof Duleba
No, there are no additional characters (my code would fail in such case).

Posted: Sun Feb 27, 2005 1:56 pm
by w k
Hi,

Now I got it! :lol:

My mistake was that I recognized the lines like:

"EN D" or "E ND"

as same as "END" - what was obviously wrong.

Thanks to all who helped!

Wojciech

Posted: Fri Nov 10, 2006 4:55 pm
by sakhassan
Can anybuddy help me to understand
why
for input

but
one
must
not
give
up

the output is

# of printable line = 3 ????????
Thanks in advance

Posted: Fri Nov 10, 2006 7:22 pm
by Jan
Read the description of the input part again. I dont want to spoil it. I am sure that you can find it.

Posted: Fri Nov 10, 2006 8:26 pm
by sakhassan
Goccha !!!!!!!!!!!!! Thanks J@N .... my mistake ... i overlook it :D

10761--WA help plz

Posted: Mon Nov 20, 2006 9:16 pm
by dust_cover
Hi,
can someone give me some test cases for 10761? I have checked the previous cases in the board but cannot find my bug.

--thnx in advance!

Posted: Mon Nov 20, 2006 9:28 pm
by Jan
Try the cases...

Input:

Code: Select all

Xyz
This problem should be easy, but you have to be 
patient
END
life
is 
sometimes
tough
but there must be a way
END
but
one 
must 
not 
give 
up
and he should keep going
END
END
END
abcdefghijklmnopqrstuvwxyz
no line can be possible
END
finish
Output:

Code: Select all

+----------+----------------+-----------------------------+
| Keyboard | # of printable | Additionally, the following |
|          |      lines     |  letter keys can be broken  |
+----------+----------------+-----------------------------+
|     1    |        2       | bcfghjklmoqrsuvw            |
+----------+----------------+-----------------------------+
|     2    |        1       | abcdjkmnpqrsvwxyz           |
+----------+----------------+-----------------------------+
|     3    |        3       | acfhjklmpqrswxyz            |
+----------+----------------+-----------------------------+
|     4    |        0       | abcfghijklmopqrstuvwxyz     |
+----------+----------------+-----------------------------+
|     5    |        0       |                             |
+----------+----------------+-----------------------------+
Hope these help.

10761

Posted: Tue Nov 21, 2006 8:31 am
by dust_cover
hi,
thnx for the cases.

Code: Select all

Xyz
This problem should be easy, but you have to be
patient
END
life
is
sometimes
tough
but there must be a way
END
but
one
must
not
give
up
and he should keep going
END
[color=red][b]END
END[/b][/color]
abcdefghijklmnopqrstuvwxyz
no line can be possible
END
finish
But is it possible that the line itself can contain the word "END"? If yes, then how could you know the end of the test case? Do you need to count the lateset END for end of that case?

---thnx in advance!

Posted: Tue Nov 21, 2006 12:24 pm
by sakhassan
the "END " r interpreted as follows in the example....
1st end as the end of 1 input
2nd end as the broken keys
3rd end as the end of the next input
between 2nd and 3rd 'end' theres no other line except 'end' which need to be processed .....

Re: 10761 - Broken Keyboard

Posted: Wed Mar 16, 2011 10:43 pm
by DD
I got some W.As because that I assume all characters at the first line of input are letters. In fact, it may not be all letters! :evil:
If you got W.A. and still don't know why, remember to check that.

Re: 10761 - Broken Keyboard

Posted: Tue Dec 02, 2014 5:43 pm
by Shahidul.CSE
I am getting WA. Whats wrong in my code?

Code: Select all

Code now accepted !