21 / 26
Aug 2012

i dont have patience to read this much length of code like leppy sir wink wink
but what i caught in 3 seconds was

m1=(points[j][1]-start[i][1])/(points[j][0]-start[i][0]);

if points[j][0]=0 and start[i][0]=0;
x/0 underministic
and rest follow what sir say

@Leppy-----i worked on some more furious test cases and debugged my code .............CODE REMOVED

Please fix your indentation. Please explain your algorithm. Please explain why you think this algorithm is accurate.

1 month later

I have some trouble with that problem though it looks like an easy one. I'm not sure if it's a matter of wrong logic, I/O problem (with Python) or just misunderstanding the problem description. "Segment" is a rectangle, right?

For this testcase from a post above:

1
4 5
0 3
2 2
3 3
4 4
0 0 5 5
3 3 4 4
0 0 1 0
0 0 0 1
0 0 0 5

The output should be:

4
2
0
0
1

Right?

Thanks a lot, leppy! Neither my printed dictionary nor the google translator did offer the correct meaning.

Suggested Topics

Topic Category Replies Views Activity
C and C++ 0 39 Jun 29

Want to read more? Browse other topics in C and C++ or view latest topics.