[gcj] Any Optimal Solution for "Round 1A: Minimum Scalar Product" Problem?

2016-04-13 Thread Shubham Jain
Sort first array, reverse sort second array, for every element of first array, you got it's corresponding smallest elements in second array, multiply them -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and sto

Re: [gcj] Any Optimal Solution for "Round 1A: Minimum Scalar Product" Problem?

2016-04-13 Thread wonjun
The main idea is the rearrangement inequality; check out the contest analysis ^^. On 14 Apr 2016 14:13, "akhil patel" wrote: > Hi, > > As i have been doing this problem in python using my own method which > computes for the all possible permutations and finding the scalar product > for all the ve

[gcj] Any Optimal Solution for "Round 1A: Minimum Scalar Product" Problem?

2016-04-13 Thread akhil patel
Hi, As i have been doing this problem in python using my own method which computes for the all possible permutations and finding the scalar product for all the vectors.Finally finding the min of all these solutions. It took few secs to find the solution to 2 given example problems but if i go

Re: [gcj] Re: Confused about sample case in Problem D: Fractiles

2016-04-13 Thread Paul Smith
1 4 7 isn't a wrong solution of K=3 C=2 S=3. Why do you say it's wrong? On Wed, 13 Apr 2016 at 16:34 Kapil Garg wrote: > > On Apr 13, 2016 7:56 PM, "Paul Smith" wrote: > > > > Yes, but you could solve it when S=2 with 2, 6, and you could not solve > it with 3, 7. > > > > Are you asking if you

Re: [gcj] Re: Confused about sample case in Problem D: Fractiles

2016-04-13 Thread Kapil Garg
On Apr 13, 2016 7:56 PM, "Paul Smith" wrote: > > Yes, but you could solve it when S=2 with 2, 6, and you could not solve it with 3, 7. > > Are you asking if you could solve it with 2, 6, 7 when S=3? Then yes, of course, adding tile 7 does nothing to change the fact that 2, 6 was already a perfect

Re: [gcj] Re: Confused about sample case in Problem D: Fractiles

2016-04-13 Thread Paul Smith
Yes, but you could solve it when S=2 with 2, 6, and you could not solve it with 3, 7. Are you asking if you could solve it with 2, 6, 7 when S=3? Then yes, of course, adding tile 7 does nothing to change the fact that 2, 6 was already a perfectly good solution. On Wed, 13 Apr 2016 at 14:17 Mohit

[gcj] Re: Confused about sample case in Problem D: Fractiles

2016-04-13 Thread Mohit Soni
On Tuesday, April 12, 2016 at 7:27:38 PM UTC+5:30, Xiongqi ZHANG wrote: > > I read it but I think I am missing something to get right... > > I just want to know that in Problem D: Fractiles > > (https://code.google.com/codejam/contest/6254486/dashboard#s=p3) at In > > sample case #5, how valid so