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 1059. Expression

Show all messages Hide all messages

Re: Ivan Georgiev 27 Mar 2002 00:44
I agree with you.
I am trying to get AC.. all possible ways;

It is obvious that the solution uses Horner's scheme

the output is ambiguous: for example

for n = 2 the following two outputs are correct:

2
1
0
*
X
+
*
X
+

0
X
*
1
+
X
*
2
+

so which one to output ? I've tried both but WA;

I really think the admins should recheck this problem's tests..
and clarify the problem's description.
Re: Those outputs are wrong. Juri Krainjukov 28 Nov 2002 00:17
For instanse, your first output written in usual way looks like that:

2*(1*0+X)+X that is equal to 2*1*0+2*X+X I don't think it resembles
the true output very much.






> I agree with you.
> I am trying to get AC.. all possible ways;
>
> It is obvious that the solution uses Horner's scheme
>
> the output is ambiguous: for example
>
> for n = 2 the following two outputs are correct:
>
> 2
> 1
> 0
> *
> X
> +
> *
> X
> +
>
> 0
> X
> *
> 1
> +
> X
> *
> 2
> +
>
> so which one to output ? I've tried both but WA;
>
> I really think the admins should recheck this problem's tests..
> and clarify the problem's description.
>
>