Search found 12 matches

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

Re: 213

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

Re: 525 - Milk Bottle Data

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

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.
by t_sergiu
Tue Apr 22, 2008 5:28 am
Forum: Volume 111 (11100-11199)
Topic: 11145 - AvreniM
Replies: 7
Views: 4971

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?
by t_sergiu
Sun Apr 20, 2008 6:34 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 31790

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.
by t_sergiu
Sun Apr 20, 2008 4:57 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 31790

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?
by t_sergiu
Sun Apr 20, 2008 8:44 am
Forum: Volume 114 (11400-11499)
Topic: 11428 - Cubes
Replies: 64
Views: 17681

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 >> ...
by t_sergiu
Sun Apr 20, 2008 6:03 am
Forum: Volume 114 (11400-11499)
Topic: 11411 - MiniMice
Replies: 6
Views: 1284

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.
by t_sergiu
Sun Apr 20, 2008 1:14 am
Forum: Volume 114 (11400-11499)
Topic: 11411 - MiniMice
Replies: 6
Views: 1284

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...
by t_sergiu
Thu Apr 17, 2008 3:41 pm
Forum: Volume 114 (11400-11499)
Topic: 11411 - MiniMice
Replies: 6
Views: 1284

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...
by t_sergiu
Sun Mar 02, 2008 6:23 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 52942

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)
by t_sergiu
Sun Mar 02, 2008 10:09 am
Forum: Volume 7 (700-799)
Topic: 706 - LCD Display
Replies: 221
Views: 35959

adding two new lines at the end of all output gave me AC as well, while only putting one new line didnt

Go to advanced search