Search found 88 matches
- Fri Nov 18, 2005 12:27 am
- Forum: Volume 109 (10900-10999)
- Topic: 10944 - Nuts for nuts..
- Replies: 35
- Views: 18045
- Fri Nov 18, 2005 12:26 am
- Forum: Volume 109 (10900-10999)
- Topic: 10943 - How do you add?
- Replies: 38
- Views: 16907
- Thu May 19, 2005 2:09 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10261 - Ferry Loading
- Replies: 41
- Views: 25646
10261 - DP problem
I have beein trying this one. I found out that: read a new car - if i cant add any previous cars, dont try this one - i can either add the car to the left or to the right, so try it by doing: for(i=tam;i>=0;i--) if this position is checked THEN if i can add it at position i (which means to the left)...
- Thu Apr 14, 2005 6:08 pm
- Forum: Volume 1 (100-199)
- Topic: 117 - The Postal Worker Rings Once
- Replies: 58
- Views: 23503
Hmmm... i tried going with floyd warshal...... the rest is the same. Any ideas? #include <iostream> #include <string.h> #include <stdio.h> #include <algorithm> using namespace std; #define FOR(a,b) for(int a=0;a<b;a++) #define MAXI (50) int mat[MAXI][MAXI]; int t[MAXI]; void clear() { FOR(i,MAXI) FO...
- Mon Feb 21, 2005 5:17 am
- Forum: Volume 108 (10800-10899)
- Topic: 10817 - Headmaster's Headache
- Replies: 25
- Views: 19165
My algorithm has runtime O(n * 3^s). As I want to reduce the memory usage, I use 2 pieces of 3^s memory, on start of very loop I copy one to another(I guess you know what I say... :) O(n*3^s) here...... but it gets faster and with less memory as it goes bottom up using just one table size (3 ^ s). ...
- Sun Feb 20, 2005 10:28 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10817 - Headmaster's Headache
- Replies: 25
- Views: 19165
- Sun Feb 20, 2005 8:17 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10817 - Headmaster's Headache
- Replies: 25
- Views: 19165
10817
Is this a max flow problem? Any other similar ones in the problem set?
- Wed Feb 16, 2005 5:20 am
- Forum: Volume 108 (10800-10899)
- Topic: 10819 - Trouble of 13-Dots
- Replies: 67
- Views: 54650
- Wed Feb 16, 2005 5:18 am
- Forum: Volume 108 (10800-10899)
- Topic: 10817 - Headmaster's Headache
- Replies: 25
- Views: 19165
- Wed Feb 16, 2005 5:17 am
- Forum: Volume 108 (10800-10899)
- Topic: 10814 - Simplifying Fractions
- Replies: 30
- Views: 20708
- Wed Feb 16, 2005 5:17 am
- Forum: Volume 108 (10800-10899)
- Topic: 10814 - Simplifying Fractions
- Replies: 30
- Views: 20708
- Fri Feb 11, 2005 3:19 am
- Forum: Volume 103 (10300-10399)
- Topic: 10374 - Election
- Replies: 44
- Views: 21370
- Fri Feb 11, 2005 3:19 am
- Forum: Volume 103 (10300-10399)
- Topic: 10374 - Election
- Replies: 44
- Views: 21370
- Fri Feb 11, 2005 3:18 am
- Forum: Volume 103 (10300-10399)
- Topic: 10374 - Election
- Replies: 44
- Views: 21370
I must be missing something here.... I tried this one twice.... first time, wrong answer, rewrote it from scratch, WA again... its easy, I just did what they said... First one is here: #include <stdio.h> #include <string.h> int main() { int i,j,k,l,m,n,o,p; char part[30][100]; char cand[30][100]; bo...
- Thu Feb 10, 2005 12:32 am
- Forum: Volume 7 (700-799)
- Topic: 743 - The MTM Machine
- Replies: 12
- Views: 8867