Search found 3 matches

by Casimiro
Tue Dec 11, 2001 8:37 pm
Forum: Volume 2 (200-299)
Topic: 218 - Moth Eradication
Replies: 60
Views: 19704

In this problem you must find the Convex Hull, but you must consider co-linear points.
So, if you have an input which is formed only by colinear points, all of them will be in the Hull. If the input has only one point, the Hull will be itself.
Notice that even if you have a polygon (let's say a ...
by Casimiro
Thu Nov 22, 2001 3:15 am
Forum: C
Topic: Clarifications
Replies: 3
Views: 3477

About reading until the end of line, I
usualy do a gets(s) and then a sequence of
sscanf's in the string s. You can do
something like this, for reading a variable
number of integers:

gets(s);
for(i = 0; sscanf(s,"%d %[^n]",&num ,
tail); i++, strcpy(s,tail));

Well, maybe something like this, but I ...
by Casimiro
Thu Oct 18, 2001 9:47 pm
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 96691

Hi!

Well, only if you do some sort of precalculation. Otherwise, the primality test could be done in constant time too... :wink:

Best Regards, Casimiro

Go to advanced search