Search found 112 matches
- Tue Nov 26, 2002 11:43 pm
- Forum: C++
- Topic: Old G++ version unacceptable
- Replies: 4
- Views: 3363
Also, I'm not sure you would want to use more advanced C++ features anyway, as I believe they will be unnecessarily slow because the compile with optimizations turned off. There are for instance several problems at UVA where you will time out if you use STL vector (without actually using the dynamic...
- Tue Nov 26, 2002 5:25 am
- Forum: C++
- Topic: Grow Array Size
- Replies: 13
- Views: 5760
- Mon Nov 18, 2002 8:28 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10381 - The Rock
- Replies: 8
- Views: 4511
- Fri Nov 15, 2002 2:12 am
- Forum: Volume 103 (10300-10399)
- Topic: 10394 - Twin Primes
- Replies: 101
- Views: 44504
- Thu Nov 14, 2002 9:42 pm
- Forum: Algorithms
- Topic: Game Theory
- Replies: 2
- Views: 4397
This is the basic brute-force method which works on basically all game theory problems where you can enumerate all states of the game: 1. Start by finding all final states and mark them as a win or a loss and put these states in a queue (in 10404, that would be marking 0 as a loss) 2. Pop the front ...
- Thu Nov 14, 2002 8:07 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10394 - Twin Primes
- Replies: 101
- Views: 44504
You start with the original sieve algorithm, like this: char isprime[MAX]; for(int i=0;i<MAX;i++) isprime =i>=2; for(int i=2;i<MAX;i++) if (isprime ) // i is a prime, so make all multiples of it non-prime for(int j=i*2;j<MAX;j+=i) isprime[j]=0; Then you realize you can store the data more compact si...
- Wed Nov 13, 2002 1:26 am
- Forum: Algorithms
- Topic: Finding the heavier rectangle
- Replies: 10
- Views: 5028
- Tue Nov 12, 2002 10:55 pm
- Forum: Algorithms
- Topic: Finding the heavier rectangle
- Replies: 10
- Views: 5028
- Mon Nov 11, 2002 5:09 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10387 - Billiard
- Replies: 5
- Views: 3064
- Mon Nov 11, 2002 2:55 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10410 - Tree Reconstruction
- Replies: 13
- Views: 10464
14 7 8 12 4 5 1 6 11 2 3 10 9 13 14 7 8 4 5 2 3 12 1 6 10 14 11 9 13 5 5 4 3 2 1 5 4 3 2 1 Try this. My (AC) program returns 1: 2: 3: 4: 5: 2 3 6: 10 7: 8 12 8: 4 5 9: 10: 14 11: 9 13 12: 1 6 11 13: 14: 1: 2: 3: 4: 5: 1 2 3 4 After I solved this problem in the contest, I noticed my program was wron...
- Fri Nov 08, 2002 6:27 am
- Forum: Volume 103 (10300-10399)
- Topic: 10394 - Twin Primes
- Replies: 101
- Views: 44504
- Wed Nov 06, 2002 11:41 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10399 - Optimus Prime
- Replies: 14
- Views: 6822
Huh?? c can get as big as 1693182318746371!! For a list of all maximal prime gaps, check out
http://www.utm.edu/research/primes/notes/GapsTable.html
Of course, I don't think that will help you very much in solving the problem...
http://www.utm.edu/research/primes/notes/GapsTable.html
Of course, I don't think that will help you very much in solving the problem...
- Wed Nov 06, 2002 4:49 am
- Forum: Volume 103 (10300-10399)
- Topic: 10394 - Twin Primes
- Replies: 101
- Views: 44504
I wouldn't care too much about the low execution times some people get on some problems. In most cases this is either due some really crazy optimizations (like using inline assembly and tweaking input/output) or really big precalculated lookup tables. There are some people who seem to take a big del...
- Mon Oct 28, 2002 6:27 pm
- Forum: Volume 4 (400-499)
- Topic: 420 - Supercomputer Selection, The Sequel
- Replies: 4
- Views: 2745
- Sun Oct 27, 2002 9:26 pm
- Forum: Volume 4 (400-499)
- Topic: 420 - Supercomputer Selection, The Sequel
- Replies: 4
- Views: 2745
420 - Supercomputer Selection, The Sequel
I just wanted to point out that the sample output in this problem is wrong, it should be
Not many have submitted on this one, maybe it's because of this (?)2 336.83