## Search found 110 matches

Thu Jul 18, 2002 4:37 am
Forum: Volume 103 (10300-10399)
Topic: 10332 - The Absent Minded Professor
Replies: 22
Views: 6635
in my opinion, they're the same sentence. 'A is similar to B' is same as 'B is similar to A'. just which one you want to place more emphasis, giving you the feeling that A is derived from B.
Thu Jul 18, 2002 4:36 am
Forum: Volume 103 (10300-10399)
Topic: 10326 - The Polynomial Equation
Replies: 18
Views: 6221
[pascal]procedure work;

var
ans :Tshi;
i :integer;

begin
ans:=shi[1];
for i:=2 to n do Pmul(ans,shi,ans);
write('x^',n,' ');
[/pascal]

if n=1, then you'll have "x^1", right?
Wed Jul 17, 2002 8:33 am
Forum: Volume 103 (10300-10399)
Topic: 10332 - The Absent Minded Professor
Replies: 22
Views: 6635
i'd like to give a hint.

let sequence be A[1],A[2],...,A[N]. with A[1]=0, then
1. there must be an input number k, where k=A, 2<=i<=N
2. and, the largest input number must be A[N].

i think my approach is not very fast, anyway.
Tue Jul 09, 2002 5:28 pm
Forum: Volume 103 (10300-10399)
Topic: 10321 - Polygon Intersection
Replies: 17
Views: 7355
well, maybe i'm naive (that's why i'm just an amateur). i never consider such things (that's why it's so hard for me to understand or get AC in difficult questions). anyway, if -0.005, i'd output -0.01if the two polygons touch, consider that is an intersection point. btw, did you try problem 137? th...
Mon Jul 08, 2002 8:12 am
Forum: Volume 5 (500-599)
Topic: 502 - DEL command
Replies: 21
Views: 9353

-ABC.EXE
-BCD.EXE
+ABCD.EXE
+AB.EXE
Mon Jul 08, 2002 8:09 am
Forum: Volume 103 (10300-10399)
Topic: 10321 - Polygon Intersection
Replies: 17
Views: 7355
1. i think it's just normal rounding method, <4, drop it, >=5, one unit up. 0.995 will be 1.00. btw, your -0.5 will just be -0.50.
2. i think two points, if rounding is the same, still output twice.
3. sort by x coordinates, if same x, then sort by y.
Thu Jul 04, 2002 7:26 pm
Forum: Volume 103 (10300-10399)
Topic: 10321 - Polygon Intersection
Replies: 17
Views: 7355
i believe not
Wed Jun 19, 2002 3:35 am
Forum: Volume 100 (10000-10099)
Topic: 10002 - Center of Masses
Replies: 59
Views: 26753
I'm afraid your code cannot even get the exact output from the sample input.

That's not the way it works. ie. average of coordinates cannot get you centre of mass. In general, average of coordinates works only when n=3, if my understanding is correct.
Tue Jun 18, 2002 3:59 am
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 21139
my approach is: pick point with min y, if more than one, pick min x with y, say P sort the angles of all points to P while(pts>=3 && first_three_points_collinear) remove_second_point while(pts>=3 && last_three_points_collinear) remove_second_last_point for(i=3; i<pts; ++i) { while(i && V ,V[i-1],V[0...
Tue Jun 18, 2002 3:36 am
Forum: Volume 101 (10100-10199)
Topic: 10179 - Irreducible Basic Fractions
Replies: 28
Views: 9965
i GUESS it should be 1. as 0/1 is irreducible

have you heard about phi function? where phi(n) = number of integers less than n and relatively prime to n. so an irreducible fraction p/n is just p, n relatively prime. so, get phi(n), u're close to the answer.
Mon Jun 17, 2002 4:25 pm
Forum: Volume 102 (10200-10299)
Topic: 10217 - A Dinner with Schwarzenegger!!!
Replies: 28
Views: 9393
your output ... if all numbers +1, then all match with mine,

eg.
100
10.51 11
Mon Jun 17, 2002 6:29 am
Forum: Volume 5 (500-599)
Topic: 533 - Equation Solver
Replies: 6
Views: 2276
how would you handle cases with x^2, any overflow? i suspect that there's a chance that terms with x^2 would come up.

just a thought,
(x-5+x+x)*2=5*(1+x+2)*3-10
cases like this, to me, is complicated enough.
Mon Jun 17, 2002 4:39 am
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 21139
i think i used Graham scan, too. i think the bug may be in the implementation, I/O etc. as a normal implementation of this algorithm should be able to solve any tricky cases, unless... (i think it's not likely that the output would only be 2 points, ie. the input points lies on a straight line only)...
Mon Jun 17, 2002 3:50 am
Forum: Volume 100 (10000-10099)
Topic: 10005 - Packing polygons
Replies: 49
Views: 15703
I'm sorry for not expressing well. and I didn't notice integer coordinates. plus I forget all my Pascal, so I cannot verify, but the following test case may fail:

4
100 90
100 110
99 100
111 100
10

I believe the above polygon cannot be packed. Tell me if I'm wrong.
Sun Jun 16, 2002 4:32 pm
Forum: Volume 5 (500-599)
Topic: 506 - System Dependencies
Replies: 17
Views: 6703
i checked the output, the order is a bit different, but it looks ok. as it's claimed as a special judge problem, unless the judge program itself has problem. maybe test your program on cases on components cannot be removed. in installing A, my output would be: INSTALL A Installing D Installing S Ins...