Search found 2 matches

by otavio
Sat Oct 19, 2002 9:52 pm
Forum: Volume 100 (10000-10099)
Topic: 10003 - Cutting Sticks
Replies: 59
Views: 24258

10003 - Cutting Sticks

I have written a program for the 10003 problem, but Jugde tells me that it uses more time than allowed.

I can't understand, because I have generated a long test set (over 160 entries with 50 cutting points each) and my program runs for less than 1 second in a Pentium 200.

What's wrong?

Ot
by otavio
Wed Oct 16, 2002 4:23 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 181705

What could be wrong with my code?

#include <stdio.h> main (){ /* @JUDGE_ID: 100 C */ long int i, first, last, count, n, greatest; long int tam, temp; long int firstorig, lastorig; while (scanf("%d %d", &first, &last) == 2){ greatest = 0; /* guarda os valores originais */ firstorig = first; lastorig = last; /* trocar se estiver fora ...

Go to advanced search