ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1002. Phone Numbers

1002 W.A
Posted by Smasher_nine 17 Oct 2000 14:42
I keep getting W.A. in 1002.I am think my program is OK
because I use really simple dynamic
programming algorithm.I am not entirely sure that the
problem is on my side.Because since
I started solving problems I had several problems.Like
problem with dynamic allocated arrays(getting restricted
function which is now fixed).
Not being able to use array element as index in 'for cycle'
as opposed to Borland Pascal.
Also I am not sure if the input behaves as I expect it.Are
there upper case letters in the
words, are there spaces in the end of the Dial Number or
the words.Also how are strings
handled in Delphi?I don't know this because when i tried
(s : string, variable : byte)
s[0] := #varible it got compilation error.This means they
are not implented like in
BP 7.0 - probably zero terminated.And if they are zero
terminated length(var s : string) is
costly opperation.
Please help if you can answer to any of these questions
help.And is there something
input/output tricky about 1002?I think there is some trick
because only
5% of the solutions are approved.
Re: 1002 W.A
Posted by Petko Minkov 17 Oct 2000 15:09
> I keep getting W.A. in 1002.I am think my program is OK
> because I use really simple dynamic
> programming algorithm.I am not entirely sure that the
> problem is on my side.Because since
> I started solving problems I had several problems.Like
> problem with dynamic allocated arrays(getting restricted
> function which is now fixed).
> Not being able to use array element as index in 'for
cycle'
> as opposed to Borland Pascal.
> Also I am not sure if the input behaves as I expect
it.Are
> there upper case letters in the
> words, are there spaces in the end of the Dial Number or
> the words.Also how are strings
> handled in Delphi?I don't know this because when i tried
> (s : string, variable : byte)
> s[0] := #varible it got compilation error.This means they
> are not implented like in
> BP 7.0 - probably zero terminated.And if they are zero
> terminated length(var s : string) is
> costly opperation.
> Please help if you can answer to any of these questions
> help.And is there something
> input/output tricky about 1002?I think there is some
trick
> because only
> 5% of the solutions are approved.

 If you want to check your solutions for 1002, 1003, 1004
 go to CEOI (Central european olympiad) 1999 web page
 and browse there until you find the page with
solutions and test data (input and coresponding output).
These tasks are exactly the same as those which have
been on this competition.
Re: 1002 W.A
Posted by Smasher_nine 18 Oct 2000 03:48
I downloaded the samples and i get all the samples
right.The only problem was that in test sample 7 there was
word l'vov which contains ' after i handeled it with
special case it works with all the samples BUT I STILL GET
W.A. are there any "'" or characters other than 'a..z'
and 'A..Z' in the words? or maybe the problem is DELPHI-BP
7.0 compatibility related.