## Search found 16 matches

Thu Nov 27, 2008 10:33 am
Forum: Volume 107 (10700-10799)
Topic: 10795 - A Different Task
Replies: 9
Views: 5627

### Re: 10795 - A Different Task

how to solve this problem?

i have no idea. is it there are any formula?

i need some help, thx.
Mon Nov 03, 2008 1:06 pm
Forum: Volume 115 (11500-11599)
Topic: 11548 - Blackboard Bonanza
Replies: 17
Views: 5285

### Re: 11548 - Blackboard Bonanza

:o i found i can't understand this problem. Sorry to hear that, it wasn't our intention at all. We had a simple statement initially, then it changed as testers were finding ambiguities... and ended up being the mess it is right now. The original statement was something like: Given N strings, find t...
Sun Nov 02, 2008 4:10 pm
Forum: Volume 115 (11500-11599)
Topic: 11548 - Blackboard Bonanza
Replies: 17
Views: 5285

### Re: 11548 - Blackboard Bonanza

i found i can't understand this problem.
Fri Oct 31, 2008 3:19 pm
Forum: Volume 115 (11500-11599)
Topic: 11525 - Permutation
Replies: 9
Views: 3268

### Re: 11525 - Permutation

should i use BigNum in this problem, i think if n = k! it's a very very big number.

another question is if this problem should use BigNum, it seems O(klgk) is not fast enough in my solution .

i need some help.
Wed Oct 29, 2008 6:16 pm
Forum: Volume 115 (11500-11599)
Topic: 11542 - Square
Replies: 16
Views: 5310

### Re: 11542 Square

10 10 2 2 3 3 5 5 2 2 3 3 3 552 1235 176 10 288 325 371 552 1235 176 288 144 276 138 3 1 1 1 3 1 1 2 2 1000000000000000 1000000000000000 4 1111 111 11 1 5 12 23 34 45 51 8 12 23 34 45 56 67 78 81 1 100000000000000 Answers are.. 127 0 15 7 3 1 1 0 1 1 And I made table like this For 4,6,10,15 case 4 ...
Wed Oct 29, 2008 2:12 pm
Forum: Volume 115 (11500-11599)
Topic: 11542 - Square
Replies: 16
Views: 5310

### Re: 11542 Square

L I M O N wrote:
mrmbdctg wrote:Hi,
any reference to learn (Gaussian elimination over GF[2].)

visit : http://en.wikipedia.org/wiki/Gaussian_elimination

http://www.youngprogrammer.com
what puzzle me most is how can i transform the problem into a "Gaussian elimination" problem ?
Wed Oct 29, 2008 11:12 am
Forum: Volume 115 (11500-11599)
Topic: 11542 - Square
Replies: 16
Views: 5310

### Re: 11542 Square

Robert Gerbicz wrote:Gaussian elimination over GF[2].
can you show me the detail ?
Sat Oct 04, 2008 3:43 pm
Forum: Volume 115 (11500-11599)
Topic: 11511 - Frieze Patterns
Replies: 2
Views: 777

### 11511 - Frieze Patterns

i found the period of the numbers is (n+1), but i can not prove it, can anyone help me?
Sun Sep 28, 2008 10:58 am
Forum: Volume 115 (11500-11599)
Topic: 11504 - Dominos
Replies: 55
Views: 20182

### Re: 11504 - Dominos

For the following input: 1 10 13 1 2 2 1 3 4 4 3 5 6 6 5 4 6 7 8 8 7 9 10 10 9 5 10 10 1 the output should be 2. AC code outputs 3. The input is taken from waterloo site. Then how the case is not included in UVa? :o OMG, i think we should calculate SCC(strongly connected components) first ?
Sun Sep 28, 2008 7:25 am
Forum: Volume 115 (11500-11599)
Topic: 11504 - Dominos
Replies: 55
Views: 20182

### Re: 11504 - Dominos

i got it and AC now.

someone who got WA can use this test:

input:
1
5 4
1 2
3 2
2 4
2 5
output:
2
Sun Sep 28, 2008 6:42 am
Forum: Volume 115 (11500-11599)
Topic: 11504 - Dominos
Replies: 55
Views: 20182

### Re: 11504 - Dominos

jan_holmes wrote:I was using union-find algorithm at the contest. But I got several WA's. I think my program failed in handling reversible connection (i.e. 1->2 and 2->1).

i use union-find algorithm , and i got WA too . i think this algorithm is correct , but why i got wrong ?
Wed Aug 06, 2008 2:45 pm
Forum: Volume 114 (11400-11499)
Topic: 11480 - Jimmy's Balls
Replies: 12
Views: 5553

### Re: 11480 - Jimmy's Balls

wahaha, There is O(1) solution. If it is hard for you, then you can try O(n) solution. Just iterate over number of red balls, for k red balls, try to find out kmax, and kmin, here kmax = maximum number of blue ball you can have when number of red ball is k and kmin = minimum number of blue ball you...
Wed Aug 06, 2008 6:49 am
Forum: Volume 114 (11400-11499)
Topic: 11480 - Jimmy's Balls
Replies: 12
Views: 5553

### 11480 - Jimmy's Balls

can somebody tell me how to solve this problem?

i think it is a Combinatorics problem, what we want to solve is there are how many a,b,c such that a+b+c=n and a<b<c.

but it is out of my ability.

Tue Jul 15, 2008 4:42 pm
Forum: Volume 114 (11400-11499)
Topic: 11463 - Commandos
Replies: 18
Views: 10069

### Re: 11463 - Commandos

i got it and ac finally.

when i draw the graph in paper and finally realize it can simply reduce to a very simple formula.

thx a lot.

Tue Jul 15, 2008 2:30 pm
Forum: Volume 114 (11400-11499)
Topic: 11463 - Commandos
Replies: 18
Views: 10069

### Re: 11463 - Commandos

for the sample 4 3 0 1 2 1 1 3 0 3 it seems i am confused about the problem i know there needs two commandos and the path is 0->1->3 which needs two units time 0->1->2->1->3 which needs four units time i think there are so many status and i can only think the searching algorithm, but it seems too sl...