Huh?? Have you check the value of |(96+32i)^12| ?fh wrote:for the input:
1
96 32
the output is
12
11042 - Complex, difficult and complicated
Moderator: Board moderators
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

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
http://felix-halim.net/uva/hunting/
-----------------------
Felix Halim
-
- Learning poster
- Posts: 56
- Joined: Tue Jun 13, 2006 5:18 pm
- Location: (CSE, SUST) Sylhet, Bangladesh
- Contact:
FH Wrote:
Because:
(940+940i)^2 = 1767200i
(1767200i)^2 = -3122995840000
here |-3122995840000| is greater than 2^30.
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.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
Because:
(940+940i)^2 = 1767200i
(1767200i)^2 = -3122995840000
here |-3122995840000| is greater than 2^30.
Ups.. yes, you are correct it's TOO COMPLICATEDMushfiqur 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.
Sorry for the mistake.
Visit my script to hunt UVA problem here:
http://felix-halim.net/uva/hunting/
-----------------------
Felix Halim
http://felix-halim.net/uva/hunting/
-----------------------
Felix Halim
-
- 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
i think there no need calculation. think simple
becoz i also get ACC using this
Code: Select all
1. 1
2. 2
3. 4
4. TOO COMPLICATED
life is beautiful like coding
-
- 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:
output:
if you multiply using loop this little simplification may help you:
SPOILER:
(a+ib)(x+iy)=(ax-by)+i(ay+bx)
best of luck.
Code: Select all
3
10 10
5 10
100 1000
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.
UVa stats: http://felix-halim.net/uva/hunting.php?id=63448
My blog on programming: http://www.shafaetsplanet.com/planetcoding/
My blog on programming: http://www.shafaetsplanet.com/planetcoding/