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

Examples
Posted by Ildar Valiev 22 Mar 2009 01:19
Input: 2
Ouput: 0 X X * * 1 X * 2 + +

Input: 3
Output: 0 X X X * * * 1 X X * * 2 X * 3 + + +

Input: 4
Output: 0 X X X X * * * * 1 X X X * * * 2 X X * * 3 X * 4 + + + +

In mathematics it's right, but here I'd got WA 2.

Why?
Re: Examples
Posted by C2H5OH 23 Mar 2009 16:51
>>>>Output should contain a sequence of minimal length

your output could has not minimal length
Re: Examples
Posted by Ildar Valiev 25 Mar 2009 01:14
OK, I'd got AC.
Here right examples:

Input: N = 2
Output: 0 X * 1 + X * 2 +

Input: N = 3
Output: 0 X * 1 + X * 2 + X * 3 +

And so on.

Edited by author 25.03.2009 20:20