Can someone who has gotten AC offer some sample input? It is really hard to verify cases by hand for me but despite every test I throw at it working, I still get WA.
Also, what should the output be if the input number is 0, or divisible by 2 or 5?
EDIT: I rethought the main loop of my program and ...
Search found 19 matches
- Sat Oct 29, 2005 5:45 am
- Forum: Volume 101 (10100-10199)
- Topic: 10127 - Ones
- Replies: 32
- Views: 18069
- Sat Apr 16, 2005 4:56 am
- Forum: Volume 101 (10100-10199)
- Topic: 10131 - Is Bigger Smarter?
- Replies: 93
- Views: 88834
- Wed Apr 13, 2005 6:20 am
- Forum: Volume 102 (10200-10299)
- Topic: 10252 - Common Permutation
- Replies: 150
- Views: 73282
Something wrong with judge?
Important Edit : A straight LCS-based solution worked like a charm and I've finally gotten AC for this problem. But I wonder what was wrong with this program?
The Programming Challenges judge accepts my program just fine, which seems to work exactly according to the problem specification (it ...
The Programming Challenges judge accepts my program just fine, which seems to work exactly according to the problem specification (it ...
- Sat May 29, 2004 2:49 am
- Forum: Volume 4 (400-499)
- Topic: 457 - Linear Cellular Automata
- Replies: 25
- Views: 14726
- Fri May 28, 2004 4:10 am
- Forum: Volume 4 (400-499)
- Topic: 457 - Linear Cellular Automata
- Replies: 25
- Views: 14726
- Wed May 05, 2004 4:58 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317862
I find when I'm compiling C++ programs to test them before submitting that there are some libraries that my implementation includes implicity (i.e. I don't have to use #include to get them) but they need to be explicitly included when the judge is compiling the program. I try to be really careful ...
- Fri Apr 23, 2004 10:33 pm
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 30241
Yeah, your code looks like it triggers integer division by mistake when printing out the estimate. You don't want integer division here. Try changing the 6 to 6.0 in your printf; that should trigger floating point division which you do want.
Or you can do as the previous poster suggested and change ...
Or you can do as the previous poster suggested and change ...
- Fri Apr 23, 2004 2:47 am
- Forum: Volume 4 (400-499)
- Topic: 457 - Linear Cellular Automata
- Replies: 25
- Views: 14726
I'm trying to solve this too but in C++. I'm not sure what I'm doing wrong, the code seemed so easy... Please help. :cry:
EDIT: Fixed the mixed-up loop indexes (inside a for loop over the variable i I had other for loops over the variable i. That'd be bad) but still WA...
[cpp]
using namespace std ...
EDIT: Fixed the mixed-up loop indexes (inside a for loop over the variable i I had other for loops over the variable i. That'd be bad) but still WA...
[cpp]
using namespace std ...
- Sun Apr 18, 2004 1:22 pm
- Forum: Volume 1 (100-199)
- Topic: 111 - History Grading
- Replies: 135
- Views: 37026
If you're using the length of LCS algorithm on the sequences exactly as they appear in the input, you are out of luck. There is a subtlety to this problem that you haven't accounted for. I compiled your code on my own system and run the Sample Input 2 on it and gotten the wrong answer. Sample Input ...
- Wed Mar 03, 2004 12:25 am
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 83831
That's not true either. Think of 22000. The difference between the sum of the even and odd digits is 4 which is not divisible by 11. Does anyone have a good rule for determining if a number is divisible by 11?
EDIT: Sorry, that post is correct. A number is divisible by 11 if the difference between ...
EDIT: Sorry, that post is correct. A number is divisible by 11 if the difference between ...
- Tue Mar 02, 2004 3:10 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10038 - Jolly Jumpers
- Replies: 445
- Views: 152630
- Tue Mar 02, 2004 3:03 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10038 - Jolly Jumpers
- Replies: 445
- Views: 152630
- Tue Mar 02, 2004 2:57 pm
- Forum: Volume 1 (100-199)
- Topic: 111 - History Grading
- Replies: 135
- Views: 37026
- Sat Feb 28, 2004 3:01 am
- Forum: Volume 100 (10000-10099)
- Topic: 10033 - Interpreter
- Replies: 88
- Views: 39289
I'm confused too...
I understand this problem pretty well but the problem statement doesn't say anything about what should happen if the interpreter comes across an illegal instruction. Should the interpreter halt? Will a case like this even occur?
- Sat Feb 21, 2004 6:34 am
- Forum: Volume 101 (10100-10199)
- Topic: 10137 - The Trip
- Replies: 159
- Views: 70204