Search found 78 matches

by Sanny
Mon Oct 10, 2005 5:18 pm
Forum: Volume 8 (800-899)
Topic: 811 - The Fortified Forest
Replies: 12
Views: 7034

Then there may be some mistakes in my code. Let me find it....
Thanks anyway for the reply.

Regards
Sanny
by Sanny
Mon Oct 10, 2005 4:52 pm
Forum: Volume 8 (800-899)
Topic: 811 - The Fortified Forest
Replies: 12
Views: 7034

811 - The Fortified Forest Why no multiple corrector?

What will be the output in cases where multiple "minimum-value and smallest number of trees" subset exists? This program doesn't have a multiple corrector. The idea of this problem is simple I think - try all possible subsets and see whether you can do with this subset finding convex hull etc... Reg...
by Sanny
Tue Sep 20, 2005 6:57 pm
Forum: Other words
Topic: contests - it's getting worse again...
Replies: 18
Views: 6493

Thanks misof for pointing out the mistake.

Regards
Sanny
by Sanny
Tue Sep 20, 2005 6:20 pm
Forum: Other words
Topic: contests - it's getting worse again...
Replies: 18
Views: 6493

I saw the clarification. That's not the problem.

Bipartite matching can be applied in this way:
On left are 2*n people and on the right are those same 2*n people. Then you find mincost matching and divide total cost by two.


Regards
Sanny
by Sanny
Tue Sep 20, 2005 5:53 pm
Forum: Other words
Topic: contests - it's getting worse again...
Replies: 18
Views: 6493

There were lots of Runtime Error on Problem-G (Forming Quiz Teams). I used weighted bipartite matching and got lots of RTEs and I am pretty sure that my code is correct. Can anybody give any tricky cases that might cause RTE?

Regards
Sanny
by Sanny
Thu Jul 28, 2005 9:06 am
Forum: Volume 104 (10400-10499)
Topic: 10495 - Conic Distance
Replies: 16
Views: 6364

Can anyone explain sample input #4. I think it should be either 2*pi*3 *(1/4) = 4.71 or sqrt(3*3+3*3)=4.24. But how can it be 4.54?

Regards
Sanny
by Sanny
Mon Jul 11, 2005 7:33 pm
Forum: Volume 107 (10700-10799)
Topic: 10772 - Rose windows
Replies: 8
Views: 2202

Thanks. Got AC now. Had a funny mistake in code. I gave a special check for cases k==n/2 and I typed it wrong. :(

Regards
Sanny
by Sanny
Sat Jul 09, 2005 2:42 pm
Forum: Volume 107 (10700-10799)
Topic: 10719 - Quotient Polynomial
Replies: 51
Views: 17246

I use it in this way: #include<stdio.h> #include<string.h> int main() { char str[100],*p; long int temp; gets(str); while(1) { sscanf(str,"%ld",&temp); p=strtok(str," "); p=strtok(NULL,""); if(!p) break; else strcpy(str,p); } return 0; } As you can see, it involves lots of string copy. So it is very...
by Sanny
Sat Jul 09, 2005 10:44 am
Forum: Volume 107 (10700-10799)
Topic: 10719 - Quotient Polynomial
Replies: 51
Views: 17246

Then maybe you use strtok() in a more efficient way than me. During contest time, I got TLE on this problem for using strtok().

Regards
Sanny
by Sanny
Sat Jul 09, 2005 4:56 am
Forum: Volume 107 (10700-10799)
Topic: 10719 - Quotient Polynomial
Replies: 51
Views: 17246

I'm not sure if this TLE is for input parsing. But I'm pretty much sure that if you use strtok(), you'll get TLE. I took input character by character in this problem.

Regards
Sanny
by Sanny
Fri Jul 08, 2005 1:05 pm
Forum: Volume 107 (10700-10799)
Topic: 10772 - Rose windows
Replies: 8
Views: 2202

I'm getting WA in this problem. Can anyone check these i/o please. Input: 22 100 40 1 100 40 2 100 40 3 100 40 5 100 40 10 100 40 20 100 40 15 100 40 19 100 38 1 100 38 2 100 38 4 100 38 9 100 38 18 50 6 1 50 6 2 50 6 3 50 8 3 9.238794 8 2 10 4 1 20 4 1 50 6 2 50 6 3 Output: 193.7897 576.5974 945.20...
by Sanny
Sat Jul 02, 2005 3:45 pm
Forum: Algorithms
Topic: Archive 2155 - Complete the Sequence
Replies: 2
Views: 788

Thanks for the hint. Actually I thought of this method. But can't remember why I didn't implement it. :oops:

Regards
Sanny
by Sanny
Fri Jul 01, 2005 8:29 pm
Forum: Algorithms
Topic: Archive 2155 - Complete the Sequence
Replies: 2
Views: 788

Archive 2155 - Complete the Sequence

I need a hint or two for this problem.
http://acmicpc-live-archive.uva.es/nuev ... php?p=2155

Regards
Sanny
by Sanny
Fri Jul 01, 2005 8:11 am
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 29247

String lengths can be as much as 1000.

Regards
Sanny
by Sanny
Fri Jul 01, 2005 8:04 am
Forum: Algorithms
Topic: Big int code for adding
Replies: 1
Views: 788

Re: Big int code for adding

smilitude wrote: if(carry) ans[++i] = 1 + '0';
This line is wrong.

Regards
Sanny

Go to advanced search