Search found 4 matches

by Scryer
Mon Jul 28, 2003 2:35 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 54877

I found your problem running under linux/gcc: the double->u32 conversion truncates downward in your inner loop on this case. I imagine the libraries are enough different that you were unlucky this time. Try modifying it as follows:
u32CatsPerHat = (uint32)(dCatsPerHat + .0001);
by Scryer
Mon Jul 28, 2003 7:38 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 54877

El-idioto wrote: I use Visual Studio.NET 2003 as compiler. What do you use?
I compiled your program with the gcc (g++) compiler v. 3.2.1 under Linux. It gives the same result that you reported for your other test cases, but not for this one.
by Scryer
Sat Jul 26, 2003 5:18 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 54877

Re: 107 Wrong answer (many examples)

Input:

Code: Select all

216 125
0 0
My AC program's output:

Code: Select all

31 671
Your output:

Code: Select all

4294967205 215
Good luck!
by Scryer
Fri Jul 11, 2003 12:26 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 77185

[quote="jpfarias"]do the following:

1. read command (as a string)
2. switch on the first letter of command
3. process the command (with no error checking)
4. if command is not on the list of commands, ignore just the command, not the whole line...
5. done!


#4 seems to contradict the problem ...

Go to advanced search