Search found 131 matches

by abishek
Tue Oct 19, 2004 8:27 pm
Forum: Volume 107 (10700-10799)
Topic: 10740 - Not the Best
Replies: 23
Views: 12968

there is nothing special about that case. I was just wondering if you had made that assumption some where else in the code.
by abishek
Tue Oct 19, 2004 3:32 pm
Forum: Volume 107 (10700-10799)
Topic: 10740 - Not the Best
Replies: 23
Views: 12968

how about the case when the weight of the edge is 0. the problem says the weights are >=0;
by abishek
Wed Oct 13, 2004 8:55 am
Forum: Volume 107 (10700-10799)
Topic: 10733 - The Colored Cubes
Replies: 14
Views: 4043

better search term
google for "burnside's lemma"
by abishek
Sun Sep 26, 2004 4:43 pm
Forum: Volume 107 (10700-10799)
Topic: 10723 - Cyborg Genes
Replies: 7
Views: 4113

I think all you reply are correct.
try this one case
3
AAA



EMPTYLINE
ISIMPORTANT
my answers are


Case #1: 3 1
Case #2: 0 1
Case #3: 16 32
by abishek
Sun Sep 26, 2004 4:36 pm
Forum: Volume 107 (10700-10799)
Topic: 10723 - Cyborg Genes
Replies: 7
Views: 4113

my output Case #1: 22 16 Case #2: 23 2520 Case #3: 12 173 Case #4: 38 135000 Case #5: 30 30907 Case #6: 39 99840 Case #7: 27 9360 Case #8: 26 1485 Case #9: 28 6074 Case #10: 22 19 Case #11: 23 2527 Case #12: 17 45 Case #13: 28 4026 Case #14: 25 924 Case #15: 26 657800 Case #16: 44 189053520 Case #17...
by abishek
Sun Sep 26, 2004 4:24 pm
Forum: Algorithms
Topic: Combinatorial Question
Replies: 1
Views: 784

sure we can obtain it efficiently as follows lets say we want to find the position of 2341 first step: how many permutations start with 1; 3! second step: how many permutatoins start with 2 and contain 1 as next character 2! third step: how many permmutation have 23x* where x<4, only 1 so there are ...
by abishek
Thu Sep 23, 2004 5:07 am
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30473


3. check for degree sequence degree sequence as per said
can you tell me what this is. I checked for the special case of n==1 and still got WA.

bye
abi
by abishek
Wed Sep 22, 2004 9:35 pm
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30473

actually the only shorcut in the second summation i use is as follows i sorted the degree sequence and then when i find d >r, i just add (n-i+1)*r to the second sum. i tried without that too,but that got a tle. so i think i must be doing some very trivial mistake some where. sohel: what is this gree...
by abishek
Wed Sep 22, 2004 11:29 am
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30473

it cleared all of them but still WA using erdos galloi:-( dunno what to do.
by abishek
Wed Sep 22, 2004 11:26 am
Forum: Volume 107 (10700-10799)
Topic: 10722 - Super Lucky Numbers
Replies: 25
Views: 9421

10722 - Super Lucky Numbers

hi,
i got the problem AC. the judge thinks that 0 is not a valid 1-digit number is base b.
i think this is wrong.
bye
abi
by abishek
Wed Sep 22, 2004 11:02 am
Forum: Volume 107 (10700-10799)
Topic: 10718 - Bit Mask
Replies: 29
Views: 8950

no it is not a brute force solution at all
the complexity is O(n) where n is number of bits of the given numbers (32 steps in this case)

we need to build this number bit by bit starting from the Most significant bit.
by abishek
Wed Sep 22, 2004 10:35 am
Forum: Volume 107 (10700-10799)
Topic: 10718 - Bit Mask
Replies: 29
Views: 8950

I solved it in the contest using the following idea: 1. i decide upon the bits of M from the left most one by one. 2. when deciding upon i ensure that value of M is inbetween low and high. 3. and finally with this constraint, i will turn on a bit in M if the same bit is off in N. (this is to minimis...
by abishek
Wed Sep 22, 2004 10:30 am
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30473

After the contest, I looked it up and found the Erd
by abishek
Wed Sep 22, 2004 5:28 am
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30473

10720 - Graph Construction

hi,
i used the havel hakimi theorem and got ac in 6 secs. Then i tried the erodos galloi theorem.
but i am getting WA? can anyone tell me if there is a special case to handle with the erdos galloi theorem. I use the version found here
http://mathworld.wolfram.com/GraphicSequence.html

thanks
abi
by abishek
Tue Sep 21, 2004 7:19 am
Forum: Volume 105 (10500-10599)
Topic: 10506 - The Ouroboros problem
Replies: 6
Views: 2503

i think you should try to read the new fasicles of Donald Knuth. One of them (Generating all n-tupules) contains the FKM algorithm in a beautiful manner.

Go to advanced search