## Search found 72 matches

Fri Sep 18, 2009 4:34 pm
Forum: Volume 116 (11600-11699)
Topic: 11643 - Knight Tour
Replies: 12
Views: 3011

### Re: 11643 - Knight Tour

Actually judge data set was wrong. They missed this case . One particular case or one critical case is not covered by judge data does not imply that judge data set is wrong. I should admit that judge data could have been stronger, but I merely believe data is correct. Actually I wanted to say that ...
Fri Sep 18, 2009 12:25 am
Forum: Volume 115 (11500-11599)
Topic: 11512 - GATTACA
Replies: 23
Views: 9360

### Re: 11512 - GATTACA

Can anyone give me some hint to solve this problem? I tried to use map, but got TLE. Thanks in advance. This is a simple dp problem. Think like below: C[i][j]= 1+C[i+1][j+1] if DNA[i]=DNA[j] otherwise 0 Take this maximum length form the above relation.( for every i,j) Then think other constraint of...
Thu Sep 17, 2009 12:10 pm
Forum: Volume 116 (11600-11699)
Topic: 11669 - Non Decreasing Prime Sequence
Replies: 2
Views: 847

### Re: 11669 - Non Decreasing Prime Sequence

To "tryit1" I think there have no critical input for that problem. If you structure correctly then you will get AC. See your code carefully. I think you have typo error. see case 15 and below and compare it to yours. AC output to tryit1 : Case 1: 2 Case 2: 3 Case 3: 5 Case 4: 7 Case 5: 2 2 Case 6: 2...
Wed Sep 16, 2009 5:47 pm
Forum: Volume 116 (11600-11699)
Topic: 11667 - Income Tax Hazard II
Replies: 5
Views: 3042

### 11667 - Income Tax Hazard (II) re statement of problem

I am giving extra test case : Input: 120000 50000 100000 400000 50000 200000 0 0 0 Output: Case 1: 9000.00 Case 2: 55000.00 Here hints to solve this problem. if M<MIN then output must be 0.00 if M>MAX then output .2*(M-MAX)+.1*(MAX-MIN) But if MIN<=M<=MAX then you have to calculate probability based...
Wed Sep 16, 2009 5:30 pm
Forum: Bugs and suggestions
Topic: 11643-Knight Tour
Replies: 0
Views: 1217

### 11643-Knight Tour

I think there have problem regarding dataset. For the below input: 1-------> test case 4 2 1 1 1 4 output should be: 10 But every solution with output 6 for the above input getting AC. And I already mail to solve that. http://acm.uva.es/board/viewtopic.php?f=51&t=43066&p=103691&hilit=11643&sid=6f8c7...
Tue Sep 15, 2009 5:16 pm
Forum: Volume 116 (11600-11699)
Topic: 11667 - Income Tax Hazard II
Replies: 5
Views: 3042

### Re: 11667 - Income Tax Hazard (II)

WoW
This is a probability problem.
I have found the hidden description.

But in real life how tax payment can be a probability? confused
Tue Sep 15, 2009 1:40 pm
Forum: Volume 116 (11600-11699)
Topic: 11667 - Income Tax Hazard II
Replies: 5
Views: 3042

### Re: 11667 - Income Tax Hazard (II) explanation needed

What does expected amount of tax means? I am totally unable to realize the problem. Please explain problem description::: you have two find the expected amount of income tax that you need to pay. You should assume that all distinct combinations of S1 and S2 satisfying the above conditions are equall...
Tue Sep 15, 2009 7:18 am
Forum: Volume 116 (11600-11699)
Topic: 11643 - Knight Tour
Replies: 12
Views: 3011

### Re: 11643 - Knight Tour

I have got AC.
My solution giving 10 for the below case.

Code: Select all

``````4 2
1 1
1 4``````
but "tryit1's" solution giving 6.

which one is correct solution?

Actually judge data set was wrong.
They missed this case.
Mon Sep 14, 2009 3:20 pm
Forum: Volume 116 (11600-11699)
Topic: 11675 - Happy Friends
Replies: 6
Views: 3136

### Re: 11675 -Happy Friends

step4: print K-th row of resultant matrix. Problem description::: "How did you discover this? I couldn't see that the K was explained in the problem statement. I only saw it in the input format section, without explanation. N(1 ? N ? 30), M(N-1 ? M ? N*(N-1)/2), K(0 ? K ? N-1) and D(0 ? D ? 1000000...
Mon Sep 14, 2009 1:17 pm
Forum: Volume 116 (11600-11699)
Topic: 11643 - Knight Tour
Replies: 12
Views: 3011

### Re: 11643 - Knight Tour

Thanks "tryit1" for your reply. I am confused about the first case. 4 2 (4x4) 1 1 1 4 how can the output be only 6? In 4x4 matrix the cost matrix from 1,1 position is below 4| 5 2 3 2 3| 2 1 4 3 2| 3 4 1 2 1| 0 3 2 5 ------------------ --> 1 2 3 4 That means from (1,1)-> (1,4) cost is 5. so total co...
Mon Sep 14, 2009 12:40 pm
Forum: Volume 116 (11600-11699)
Topic: 11675 - Happy Friends
Replies: 6
Views: 3136

### Re: 11675 -Happy Friends

I spent huge time to figure out the solution. It was MATRIX exponent in log(D) time. But how can handle the turn of friend's happiness? I solved it. I think someone need hints to solve this problem. Hints for someone: step1: Color every node using only two colors. step2: split the original matrix of...
Sun Sep 06, 2009 7:36 pm
Forum: Volume 102 (10200-10299)
Topic: 10238 - Throw the Dice
Replies: 6
Views: 4116

### Re: 10238 - Throw the Dice!

Here have some input and AC output for verification of someone's program. Input: 50 50 50 6 0 100 50 50 110 50 50 2440 50 50 1000 49 25 1200 50 50 2500 50 50 2501 Output: 1/8881784197001252323389053344726562500000000000000000000000000000000000000000000000000 0/1 28526286665085339275737392834930/8881...
Sun Sep 06, 2009 4:33 pm
Forum: Volume 102 (10200-10299)
Topic: 10278 - Fire Station
Replies: 59
Views: 20852

### Re: 10278 - Fire Station

Actually the tricky part is below.
input:

Code: Select all

``````1
2 2
1
2
1 2 10
``````
output will be:

Code: Select all

``1``
No intersection without fire station. so Answer is 1.
Sun Aug 30, 2009 5:32 pm
Forum: Volume 101 (10100-10199)
Topic: 10128 - Queue
Replies: 9
Views: 7767

### Re: 10128 - Queue !Strange AC!!!!

My solution was a DP,Memoization. my recursion was like fun(L,pre,mask){ memo[L][pre][mask] // it is memoization }; And initial call was: cout<<fun(L,-1,0); here pre is negative for first call. But I am AC.!!!!!!!!!!!!!! Need Explanation. Thanks in advance. Note: The tallest person is always n(Middl...
Fri Aug 28, 2009 6:18 pm
Forum: Volume 116 (11600-11699)
Topic: 11643 - Knight Tour
Replies: 12
Views: 3011

### Re: 11643 - Knight Tour

Thanks sohel vai. After your hints now I am getting WA. someone please verify below input: 9 4 2 1 1 1 4 42 3 2 2 2 3 1 1 963 15 6 6 13 2 12 2 3 11 7 13 10 7 4 3 8 8 12 7 6 9 7 3 4 12 8 10 5 3 10 11 704 7 3 5 3 6 5 1 2 2 2 5 5 1 1 4 724 7 2 6 5 4 2 1 7 2 4 4 4 1 6 7 891 10 1 1 2 7 9 4 4 10 5 5 1 7 7...