## Search found 12 matches

Sun Apr 27, 2008 8:34 am
Forum: Volume 2 (200-299)
Topic: 213 - Message Decoding
Replies: 11
Views: 6440

### Re: 213

I'd like some sample cases with this problem as well as I think I my algorithm works but am getting WA.
Sun Apr 27, 2008 12:31 am
Forum: Volume 5 (500-599)
Topic: 525 - Milk Bottle Data
Replies: 4
Views: 4104

### Re: 525 - Milk Bottle Data

Can anyone tell me what the maximum restriction on N is. Thanks.
Fri Apr 25, 2008 5:25 am
Forum: Volume 8 (800-899)
Topic: 816 - Abbott's Revenge
Replies: 9
Views: 6447

### Re: 816 - Abbott’s Revenge

Does anybody know why this would generate a wrong answer. I'm absolutely sure my output is correct, however the judge may want an extra newline or something. Can anyone give me some sample test cases?
Thanks.
Tue Apr 22, 2008 5:28 am
Forum: Volume 111 (11100-11199)
Topic: 11145 - AvreniM
Replies: 7
Views: 5034

### Re: 11145 - AvreniM

I am slightly confused with this problem because of how it's worded. Is there a limit of how many roads there are from one junction to another. I.e. can I have 3 different roads with head 1 and tail 2?
Sun Apr 20, 2008 6:34 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 36235

### Re: 488 TLE

Fixed. I was using cin and cout. Switched it to use printf and scanf, and did it in 1/10 of a second.
Sun Apr 20, 2008 4:57 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 36235

### Re: 488 TLE

I am getting a TLE on this problem as well. I would think it wouldn't take any time at all to run this. Can anybody offer some suggestions?
Sun Apr 20, 2008 8:44 am
Forum: Volume 114 (11400-11499)
Topic: 11428 - Cubes
Replies: 64
Views: 18564

### Re: 11428 - Cubes

Hmm I can't seem to figure out why I'm getting WA. Can someone help? #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector< int > cubes; cubes.reserve( 100 ); for( int i = 1; i < 100; ++i ) { cubes.push_back( i * i * i ); } int n; while( true ) { cin >> ...
Sun Apr 20, 2008 6:03 am
Forum: Volume 114 (11400-11499)
Topic: 11411 - MiniMice
Replies: 6
Views: 1389

### Re: 11411 - MiniMice

Ok, I got it to work by using the sieve idea. This got rid of all the divisions and multiplications in my loops.
Sun Apr 20, 2008 1:14 am
Forum: Volume 114 (11400-11499)
Topic: 11411 - MiniMice
Replies: 6
Views: 1389

### Re: 11411 - MiniMice

#include <iostream> #include <vector> #include <deque> using namespace std; int main() { //find all primes; vector< int > primes; primes.reserve( 400 ); primes.push_back( 2 ); for( int i = 3; i * i <= 5010000; i += 2 ) { bool a = true; for( unsigned int j = 0; j < primes.size() && primes[ j ] * pri...
Thu Apr 17, 2008 3:41 pm
Forum: Volume 114 (11400-11499)
Topic: 11411 - MiniMice
Replies: 6
Views: 1389

### 11411 - MiniMice

Hi, I am currently working on the MiniMice problem. My strategy is to first find all primes from 1 to 5000000, then all divisors of n for 1 <= n <= 5000000, store all of these in arrays, and then proceed with finding what the question asks for. My problem is that I can't seem to find an algorithm ef...
Sun Mar 02, 2008 6:23 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 55793
I have tried various test cases and am confident my code works. I have checked all commands and made sure to check for bounds, x1 being smaller than x2, etc.. any help would be appreciated.

EDIT: NVM, my code works, I was simply filling the empty array with 0 (zero), whereas empty is O (capital o)
Sun Mar 02, 2008 10:09 am
Forum: Volume 7 (700-799)
Topic: 706 - LCD Display
Replies: 221
Views: 39731
adding two new lines at the end of all output gave me AC as well, while only putting one new line didnt