## Search found 174 matches

Thu Feb 19, 2004 3:54 pm
Forum: Volume 1 (100-199)
Topic: 137 - Polygons
Replies: 44
Views: 3370
If these are the test cases which I provided answers for, then the test cases are faulty... my answers were faulty as well..
Thu Feb 19, 2004 6:05 am
Forum: Volume 105 (10500-10599)
Topic: 10510 - Cactus
Replies: 31
Views: 22356
Is finding cactus related to finding articulation points in a directed graph anyway? i think in a cactus, the simple cycles are connected to each other only through articulation vertices. i tried in this way, but still WA :cry: Can anybody tell me the correct approach to solving this problem? This ...
Fri Feb 13, 2004 4:16 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 12351

### Re: Input !

Is there any helpful guy who can post some test cases , cause my program works fine with test cases and I used DP . Please helppppp!!! :( Tips: 1) Check your floating point numbers.. the judge has some data that is VERY close to 1.01. If I remember right, you need to get MORE than 1.01.. (do floati...
Thu Feb 12, 2004 5:47 pm
Forum: Volume 3 (300-399)
Topic: 358 - Don't Have A Cow
Replies: 52
Views: 10345
I'm using the following four functions to evaluate the length of rope... but all four give me WA. Anyone knows which function will get AC? // Binary search for angle between the two radii // invpi = (1 - p) * pi ft calculate(ft x, ft invpi) { ft cosx; cosx = cos(x); return (4 * x * cosx * cosx) + in...
Wed Feb 11, 2004 12:18 am
Forum: Volume 2 (200-299)
Topic: 250 - Pattern Matching Prelims
Replies: 15
Views: 8047
zizi wrote:What's the correct data set for this problem . ??
I have another question ,can the i comlumn of the gravity be m and or j column be n?
I think the gravity column can be any of the valid columns.
Tue Feb 10, 2004 7:38 am
Forum: Volume 3 (300-399)
Topic: 358 - Don't Have A Cow
Replies: 52
Views: 10345
I'm trying to solve q358 Don't Have A Cow, Dude and I keep getting WA, though my answers correspond to all the test data I can find... I've tried 4 different methods: 1) Estimating rope length using binary search 2) Estimating angle between radii of both circles using binary search 2) Estimating ang...
Tue Feb 10, 2004 6:08 am
Forum: Volume 3 (300-399)
Topic: 359 - Sex Assignments And Breeding Experiments
Replies: 12
Views: 4787
I don't think the input contains any especially tricky cases... I even stopped myself from including a graph with 0 vertices (which shouldn't be a problem, but anyway...). ;) If you want, you can send me your code and I'll check it. Btw, what do you mean by "vertical" cycles? Are they any different...
Mon Feb 09, 2004 6:59 pm
Forum: Algorithms
Topic: Bisection Method
Replies: 30
Views: 7176
In bisection method for a & b f(a) & f(b) should be of opposite sign.But how to determine a & b while implementing it in C??????? Easy! For instance, in Q358, first you should derive a formula f(x) = 0 . Then, you can clearly see that the function f(x) is strictly increasing . Now choose the upper ...
Mon Feb 09, 2004 4:27 pm
Forum: Volume 3 (300-399)
Topic: 359 - Sex Assignments And Breeding Experiments
Replies: 12
Views: 4787
Hi! Here are some answers: 1) ...and as long as noone has more than two parents, yes. 2) Yes. 3) Only in order for the graph to be sexy, the input doesn't have that restriction. :) Your I/O is correct. I don't understand.. my code churns out the right output for all possibilies.. and I reserve enou...
Mon Feb 09, 2004 1:17 pm
Forum: Volume 3 (300-399)
Topic: 359 - Sex Assignments And Breeding Experiments
Replies: 12
Views: 4787

### 359 - Sex Assignments And Breeding Experiments

I'm trying to solve q359 Sex Assignments And Breeding Experiments and keep getting WA. I need to clarify some doubts: 1) As long as there are no vertical cycles in the graph, ie: node A is not the ancestor of itself, and there is a valid male/female assignment, then the graph is sexy. 2) A node can ...
Mon Feb 09, 2004 11:14 am
Forum: Volume 1 (100-199)
Topic: 181 - Hearts
Replies: 9
Views: 2382

### Re: 181 Hearts

i have some problem with this one :cry: everything seems fine but the output is not correct. i've made debug output for it, and nothing seems to be wrong. Below is my debug output, and if anyone knows which one is wrong, please let me know. TIA. 1:QH 2H JH TD 4D 5S 8C AS JC QD 2:TS 2D TH 7H 2C 5D 7...
Sun Feb 08, 2004 4:49 pm
Forum: Volume 3 (300-399)
Topic: 330 - Inventory Maintenance
Replies: 26
Views: 7175
Can I check if anyone has solved this question within the last few days? All my code got rejected as output limit exceeded. When I tried to check, I find that the judge's test data asks for over 500 "report"'s... which will very likely in itself be a very large output. Did I miss something or is the...
Sun Feb 08, 2004 4:13 pm
Forum: Volume 3 (300-399)
Topic: 330 - Inventory Maintenance
Replies: 26
Views: 7175
Actually, I think the test data is wrong... I sent the following code in and it gave me SIGFPE (floating point error, division by zero). The program below will not print anything. It will go into an infinite loop if there isn't at least one line that has '*' as the starting character (terminating co...
Sat Feb 07, 2004 6:49 pm
Forum: Volume 1 (100-199)
Topic: 122 - Trees on the level
Replies: 103
Views: 9317
I changed const kolichestvo to 100000. But also WA :cry: Maybe else mistke ... :oops: just create a test data where there are 255 nodes. Each node is a right child (except root node). Then create another test data where each node is a left child (except root node). Lastly, create one test data wher...
Sat Feb 07, 2004 6:43 pm
Forum: Volume 3 (300-399)
Topic: 319 - Pendulum
Replies: 5
Views: 2367
Per wrote:I use

const double pi = 2.0*acos(0.0);

for pi, which IMO is better than using a numerical constant. For epsilon, I have 1e-7.
Thank you for your help.. I've managed to get AC'ed..