Next Spaceship

Driving into future…

How to Record Time in C++?

| Comments

To record the time your program costs, you can use the function clock(), that is defined in <ctime>. Here is an example showing how to use this function:

POJ 2002 Squares

| Comments

Here is my pseudo code:

1
2
3
4
5
6
7
count <-- 0
for each edge( two points) do
    find the possible other two points to construct a square, there will be two pairs.
    for each pair of points do
        use binary search or hash to check if both points are given
        if both are given then count <-- count+1
return count

VC6.0 Has a Stack Overflow

| Comments

When VC6.0 breaks down due to a stack overflow, sometimes you can adjust the stack allocations to get around this problem.

Project->Settings->Link->Category->Output

Write the bytes you need in Stack allocations->Reserve.