Search found 7 matches
- Fri Apr 23, 2004 3:37 am
- Forum: C++
- Topic: How to make this code faster
- Replies: 1
- Views: 1597
How to make this code faster
Can anyone offer any suggestions for how to speed this code up? I am looking but failing to see anything (probably due to my inexperience in C++). I have a little program that works with Visual Basic to show how long each section of code runs, does anyone know of anything like that for C++? [cpp] #i...
- Fri Apr 23, 2004 3:22 am
- Forum: Volume 1 (100-199)
- Topic: 106 - Fermat vs. Pythagoras
- Replies: 138
- Views: 15232
- Fri Apr 23, 2004 3:11 am
- Forum: Volume 1 (100-199)
- Topic: 106 - Fermat vs. Pythagoras
- Replies: 138
- Views: 15232
(pow((double)ii, 2.0) --> Is there a better way?
I am wanting to square some numbers (for problem 106).
ie
5^2
However the only way that I can see to do it is to use the pow function.
I tried ii^2, however errors where returned.
Does anyone know a better (faster) way?
ie
5^2
However the only way that I can see to do it is to use the pow function.
I tried ii^2, however errors where returned.
Does anyone know a better (faster) way?
- Fri Apr 23, 2004 3:09 am
- Forum: Volume 1 (100-199)
- Topic: 106 - Fermat vs. Pythagoras
- Replies: 138
- Views: 15232
106 - Wrong Examples?
I am working on problem 106, the program seems to work correctly, except my output is different to the sample output. input: 10 25 100 my output: 1 4 4 9 36 27 sample output: 1 4 4 9 16 27 I tailored the program to print out all the hits to see why I counted 36 and the sample counted only 16. After ...
- Sun Apr 18, 2004 3:51 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 55953
Thanks, I have been working on it for two days trying to figure out where the speed issue is. I had some recurssive functions, but dropt them, and still the speed is an issue. I can't see where else it could be. I haven't really done alot of C++ since university (mostly VB) so I thought this would b...
- Sat Apr 17, 2004 6:09 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 55953
- Sat Apr 17, 2004 4:28 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 55953
Time Limit Exceeded
My submission for 101 is coming back time limit exceeded. The time being usually 10.012 to 10.070 seconds, the limit is 10.000 seconds. I was trying to shave that hundredth of a second, however it has occured to me that perhaps the online judge automatically stops a program that has been running lon...