## 11042 - Complex, difficult and complicated

All about problems in Volume 110. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

tobby
Learning poster
Posts: 98
Joined: Fri Dec 30, 2005 3:31 pm
fh wrote:for the input:

1
96 32

the output is

12
Huh?? Have you check the value of |(96+32i)^12| ?

fh
Learning poster
Posts: 59
Joined: Wed Jan 19, 2005 3:24 pm
Location: Jakarta
Contact:
Ah..., it seemed my program was overflow and break on 12

Not only that, my overflow error also causes this problem:

1
940 940

My output is

TOO COMPLICATED

it should be 4

So, the Judge is very very lacking critical input case then

This problem need to be rejudged

Yes, I agree that there are only 4 different kind of outputs
Visit my script to hunt UVA problem here:
http://felix-halim.net/uva/hunting/
-----------------------
Felix Halim

Mushfiqur Rahman
Learning poster
Posts: 56
Joined: Tue Jun 13, 2006 5:18 pm
Location: (CSE, SUST) Sylhet, Bangladesh
Contact:
FH Wrote:
Not only that, my overflow error also causes this problem:

1
940 940

My output is

TOO COMPLICATED

it should be 4

So, the Judge is very very lacking critical input case then
This problem need to be rejudged
May be theres problem in Judge for critical input of this problem. But in the above case the correct output will be TOO COMPLICATED not 4.
Because:
(940+940i)^2 = 1767200i
(1767200i)^2 = -3122995840000
here |-3122995840000| is greater than 2^30.

fh
Learning poster
Posts: 59
Joined: Wed Jan 19, 2005 3:24 pm
Location: Jakarta
Contact:
Mushfiqur Rahman wrote:But in the above case the correct output will be TOO COMPLICATED not 4.
Because:
(940+940i)^2 = 1767200i
(1767200i)^2 = -3122995840000
here |-3122995840000| is greater than 2^30.
Ups.. yes, you are correct it's TOO COMPLICATED
Sorry for the mistake.
Visit my script to hunt UVA problem here:
http://felix-halim.net/uva/hunting/
-----------------------
Felix Halim

rajib_sust
New poster
Posts: 16
Joined: Sun Mar 02, 2008 10:34 am
Location: SUST , Sylhet, Bangladesh

### Re: 11042 - Complex, difficult and complicated

may be judge input there no such case like 96 32.
becoz i also get ACC using this

Code: Select all

``````1. 1
2. 2
3. 4
4. TOO COMPLICATED
``````
i think there no need calculation. think simple
life is beautiful like coding

Shafaet_du
Experienced poster
Posts: 147
Joined: Mon Jun 07, 2010 11:43 am
Location: University Of Dhaka,Bangladesh
Contact:

### Re: 11042 - Complex, difficult and complicated

input:

Code: Select all

``````3
10 10
5 10
100 1000``````
output:

Code: Select all

``````4
TOO COMPLICATED
TOO COMPLICATED``````

if you multiply using loop this little simplification may help you:

SPOILER:
(a+ib)(x+iy)=(ax-by)+i(ay+bx)

best of luck.