Did your solution pass the large input? I've tried similar approach first
but change it to the more appropriate one, since it failed the large input
case.
On Fri, Sep 4, 2009 at 8:46 AM, Pedro Henrique Calais <
pedro.cal...@gmail.com> wrote:
> Yes, they are available on the web site.
>
> My solut
w|
> count+=1 if !r.match(w).nil?
> end
> output.puts "Case ##{i+1}: #{count}\n"
> end
>
> output.close
>
> Thanks & Regards,
> Dhruva Sagar.
>
>
> Charles de
> Gaulle<http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html&g
in C/C++
>
> Thanks & Regards,
> Dhruva Sagar.
>
>
> Stephen
> Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html> -
> "I detest life-insurance agents: they always argue that I shall some day
> die, which is not so."
>
&
> "If God had wanted man to play soccer, he wouldn't have given us arms."
>
> On Fri, Sep 4, 2009 at 1:18 PM, Monang Setyawan wrote:
>
>> I think the algorithm have more impact than language choice, at least in
>> contest like this one.
>>
>>
&
Just curious.
If we use edit distance to check K submission, what is the complexity? Is it
O(n^K)?
On Wed, May 19, 2010 at 4:20 AM, Muntasir Azam Khan wrote:
>
>
> Actually, last year there were some lists of cheaters put up by users.
> These were generated using something much simpler than the
do this and it worked well
>
> On Wed, May 19, 2010 at 1:43 PM, Monang Setyawan wrote:
> > Just curious.
> >
> > If we use edit distance to check K submission, what is the complexity? Is
> it
> > O(n^K)?
> >
> > On Wed, May 19, 2010 at 4:20 AM, Muntasir
Quick and dirty Java code:
import java.util.Arrays;
public class Subset {
public static void main(String[] args) {
int[] set = { 1, 2, 3, 4 };
boolean[] mask = new boolean[set.length];
int[] picks = new int[set.length];
subs
Oops, pardon my previous reply (misunderstood you question correctly).
I think this one would suffice:
import java.util.Arrays;
public class Subset {
public static void main(String[] args) {
int[] set = { 1, 2, 3, 4 };
int[] picks = new int[set.length];