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 1408. Polynomial Multiplication

Loky_Yuri [USTU Frogs] WA#12 [3] // Problem 1408. Polynomial Multiplication 3 Mar 2008 10:12
This tests helped me find many bugs in my programm.
a + b
a + b
---
a^2 + 2*a*b + b^2

a + b
a - b
---
a^2 - b^2

a - b
a - b
---
a^2 - 2*a*b + b^2

And this:
12*x + 15*x^2 - 21y^1*y
5*a^1 - 1 + 0 + 1*b*b*b
---
15*b^3*x^2 - 21*b^3*y^2 + 12*b^3*x + 75*a*x^2 - 105*a*y^2 + 60*a*x - 15*x^2 + 21*y^2 - 12*x
Dmitry "Logam" Kobelev [TSOGU] Re: WA#12 [2] // Problem 1408. Polynomial Multiplication 7 Mar 2008 22:58
Last test is very useful. Thx. But there is a bug in the first line :  21y^1*y - multipliers must be separated with '*' symbols
Loky_Yuri [USTU Frogs] Re: WA#12 [1] // Problem 1408. Polynomial Multiplication 8 Mar 2008 22:43
Oh, yes! Of course you are right. Sorry for my mistake.
Alexander Mangilyov (TNU) Re: WA#12 // Problem 1408. Polynomial Multiplication 11 Apr 2009 15:27
There can be whitespaces in the beginning of the expression