11180 - Base i-1

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

Moderator: Board moderators

Post Reply
pvncad
New poster
Posts: 27
Joined: Sun Feb 18, 2007 2:14 pm

11180 - Base i-1

Post by pvncad » Mon Feb 26, 2007 2:51 pm

I think, it is related to Gaussian integer or something. But could not solve.
Any help ?

-pvncad

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo » Mon Feb 26, 2007 9:02 pm

How do you usually convert a number into base b if b is a positive integer >=2?
A similar idea works here.
We can similarly define the concept of a remainder.

KirllButin
New poster
Posts: 6
Joined: Mon Feb 26, 2007 10:42 pm

Post by KirllButin » Mon Feb 26, 2007 10:56 pm

I recieve a and b for each power
1 0
-1 1
0 -2
2 2
-4 0
4 -4
.....

but I don't know what subset we should use for
generation answer?

Observer
Guru
Posts: 570
Joined: Sat May 10, 2003 4:20 am
Location: Hong Kong

Post by Observer » Tue Feb 27, 2007 8:09 am

Dont' think too hard. Think of sclo's hint. We got accepted using the same idea.
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org

KirllButin
New poster
Posts: 6
Joined: Mon Feb 26, 2007 10:42 pm

Post by KirllButin » Tue Feb 27, 2007 10:33 am

Thank you
Yes I understand, my way is wrong

So I just should divide on (i-1)
If a or b are odd then 1 else 0 . Am I right?

Darko
Guru
Posts: 580
Joined: Fri Nov 11, 2005 9:34 am
Location: Calgary, Canada

Post by Darko » Tue Feb 27, 2007 6:28 pm

No, if (a+b) is odd then 1, otherwise 0. Unless that's what you meant (but that's not what you said).

pvncad
New poster
Posts: 27
Joined: Sun Feb 18, 2007 2:14 pm

Post by pvncad » Fri Mar 02, 2007 8:15 pm

Darko wrote:No, if (a+b) is odd then 1, otherwise 0.
any reason for this assumption?

Darko
Guru
Posts: 580
Joined: Fri Nov 11, 2005 9:34 am
Location: Calgary, Canada

Post by Darko » Fri Mar 02, 2007 8:39 pm

What is the real part of (a+ib)/(-1+i) ? When is it an integer? (I guess I should've said (b-a), but it's the same thing)

pvncad
New poster
Posts: 27
Joined: Sun Feb 18, 2007 2:14 pm

Post by pvncad » Fri Mar 02, 2007 8:56 pm

thanks I got it

Post Reply

Return to “Volume 111 (11100-11199)”