10997  Medals
Moderator: Board moderators

 New poster
 Posts: 20
 Joined: Tue Sep 20, 2005 9:20 am
 Location: Daejeon, Korea
10997  Medals
What I can think for 10997 is putting all the possible values.
It gives AC. However, I am thinking that there should be faster way to solve this kind of problem. Any idea?
It gives AC. However, I am thinking that there should be faster way to solve this kind of problem. Any idea?

 Guru
 Posts: 584
 Joined: Thu Jun 19, 2003 3:48 am
 Location: Sanok, Poland
 Contact:

 Guru
 Posts: 584
 Joined: Thu Jun 19, 2003 3:48 am
 Location: Sanok, Poland
 Contact:
10997  Medals
Hi,
I can't think of the real/intended way to solve this problem. I managed to make an AC solution by trying the vectors
(n,1,1) (n,2,1) .... (n,n,1).....(n,n,n)
so basically, I try to change each component from 1 to n. This means I try a total of n^3 different vectors.
Clearly, this wasn't the intended solution, since some of the vectors may not be in the form (1/n^j, 1/n^k, 1/n^l). Can someone please point me in the right direction?
I can't think of the real/intended way to solve this problem. I managed to make an AC solution by trying the vectors
(n,1,1) (n,2,1) .... (n,n,1).....(n,n,n)
so basically, I try to change each component from 1 to n. This means I try a total of n^3 different vectors.
Clearly, this wasn't the intended solution, since some of the vectors may not be in the form (1/n^j, 1/n^k, 1/n^l). Can someone please point me in the right direction?

 Guru
 Posts: 584
 Joined: Thu Jun 19, 2003 3:48 am
 Location: Sanok, Poland
 Contact:

 Guru
 Posts: 584
 Joined: Thu Jun 19, 2003 3:48 am
 Location: Sanok, Poland
 Contact: