Search found 27 matches

by rbuchan
Sun Mar 09, 2003 3:49 am
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16237

Off subject

If anyone has test data and correct answers for 173, that would be of a big help. I keep getting a wrong answer, but the problem here is not the messages being correct, but the order of the messages that I am concerned about.
by rbuchan
Fri Mar 07, 2003 5:32 am
Forum: Volume 1 (100-199)
Topic: 173 - Network Wars
Replies: 29
Views: 2738

173 - Network Wars

Does anyone have any test data, more than what is with the problem? I have walked through several scenarios I created, but get correct answers.
by rbuchan
Sun Mar 02, 2003 7:42 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

Thanks

Thank you for the response, but as it turns out, I got it accepted. As it turns out, I put the code over to Unix, and loaded it in vi. I removed all Windows characters, and then resubmitted. After that, everything worked.

Again, thanks for the comments.
by rbuchan
Sat Mar 01, 2003 7:45 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

Ignore my previous posts...

My program worked fine. I transfered everything to Unix. Got rid of any invisible characters in the code, and everything worked fine.

:evil: Windows :evil:

Anyway, I am just glad it is working.
by rbuchan
Sat Mar 01, 2003 4:11 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

[107] Need help to figure this out...

I have posted replies to several people on this problem. I have ran my program against several inputs, all from this site, and my program answers every one of them correctly. I have tested this program with every possible set of data I can find, or make up, including the extreme cases. However, the ...
by rbuchan
Sat Mar 01, 2003 4:02 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

Thanks for the reply and the correction. However, I ran the two other tests you gave me, and I get the correct answers for those as well, but the judge STILL says I have a "Wrong Answer".
by rbuchan
Fri Feb 28, 2003 2:57 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

TLE

I didn't debug all of your code, but I would think your bottleneck is the while loop, where you are using several log functions at once. This is very time consuming to a machine...and with division as well! :wink:
by rbuchan
Fri Feb 28, 2003 2:50 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

Ignore...

Ignore that last bit of code. I figured out what is wrong with it. It is still getting a wrong answer, but don't know why now. :oops:
by rbuchan
Fri Feb 28, 2003 9:45 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

...

I ran my program again, and I come up with the following:

390625 65535 -> 21845 1690980 (instead of 1690981)

ALL of my other answers are right. I am still not following why we would have to worry about this case because 4^8 is 65536, and 5^8 is 390625???
by rbuchan
Fri Feb 28, 2003 8:31 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

Suggestion...

Check out the input of "1 1". You are getting a funky result.

Hope this helps.

Ron
by rbuchan
Fri Feb 28, 2003 8:22 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

Questioning input...

How can 65535 be a proper input? The problem is based on the two inputs being of the form: (N+1)^k and N^k 65535 has a prime factorization of 3, 5, 17, 257. So, how does this work for the problem? That means that N would have to be each of these numbers, but N is a constant number, not a variant. ???
by rbuchan
Fri Feb 28, 2003 8:08 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20728

Getting the wrong answer, although seems to be correct...

[cpp]#include <iomanip.h> #include <iostream.h> #include <math.h> #include <stdlib.h> void findTheRoot(); bool checkForAMatch(long); long findPower(long); long bigCatHeight = 1; long workerCats = 1; long theTotalCats = 0; long theRoot = 0; long thePower = 0; long theLazyCats = 0; double theStackHeig...

Go to advanced search