Search found 45 matches
- Thu Feb 14, 2002 3:59 am
- Forum: Volume 1 (100-199)
- Topic: 139 - Telephone Tangles
- Replies: 66
- Views: 8277
Wow, your test case got me to correct my problem. Now I'm the 28th person to solve that one, and the 26th to get a presentation error. Haha, that's funny. Thanks for the help. Now my name is one the ranklist, smack right there, "Ho Seung Ryu," though I am kinda using excessive time & mem. I'll look ...
- Tue Feb 12, 2002 1:45 am
- Forum: Volume 1 (100-199)
- Topic: 139 - Telephone Tangles
- Replies: 66
- Views: 8277
One of those really murky things on this page is how they put a picture for the output and expect us to figure out what's going on. Okay, problem 139. It looked really easy so I tried it, not heeding that 2% success rate. And I seem to have a perfectly good program, but I don't get how you're suppos...
- Tue Feb 12, 2002 1:37 am
- Forum: Volume 1 (100-199)
- Topic: 120 - Stacks of Flapjacks
- Replies: 118
- Views: 13413
Well, I can help you with 120. Okay, well, you see, say you have: 4 3 5 2 1 You start from the right and sort the pancakes one by one, kind of like a backwards selection sort. 4 3 5 2 1 So you try to get 5 into the last spot, but you can't with a single flip. So instead you flip so that the 5 comes ...
- Sun Feb 10, 2002 11:56 pm
- Forum: Volume 1 (100-199)
- Topic: 133 - The Dole Queue
- Replies: 42
- Views: 5707
- Sun Feb 10, 2002 11:56 pm
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 21173
- Sat Feb 09, 2002 8:46 pm
- Forum: Volume 1 (100-199)
- Topic: 104 - Arbitrage
- Replies: 223
- Views: 13810
Hey, for some code to this, go to http://www.pi.informatik.tu-darmstadt.d ... eme/1/104/ It's not in English but there's like three DIFFERENT solutions there, in C code!!!
- Sat Feb 09, 2002 8:27 pm
- Forum: Volume 1 (100-199)
- Topic: 133 - The Dole Queue
- Replies: 42
- Views: 5707
It still doesn't work // @BEGIN_OF_SOURCE_CODE /* @JUDGE_ID: 17243NT 133 C++ "Brute Force" */ // Send to judge@uva.es #include <iostream.h> #include <fstream.h> #include <iomanip.h> #ifdef ONLINE_JUDGE #define ins cin #define outs cout #else #define ins fin #define outs fout ifstream fin("myprog.in"...
- Sat Feb 09, 2002 8:22 pm
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 21173
Yes, dynamic programming, but someone help me. This ain't workin'! Why not?!? // @BEGIN_OF_SOURCE_CODE /* @JUDGE_ID: 17243NT 147 C++ "Dynamic Programming" */ // Send to judge@uva.es #include <iostream.h> #include <iomanip.h> const int MAX = 5000; int am[MAX + 1]; int units[11] = {5, 10, 20, 50, 100,...
- Tue Feb 05, 2002 2:40 am
- Forum: Volume 1 (100-199)
- Topic: 111 - History Grading
- Replies: 135
- Views: 22128
Really, I don't get this problem. See, we have sample test 2. 10 3 1 2 4 9 5 10 6 8 7 1 2 3 4 5 6 7 8 9 10 4 7 2 3 10 6 9 1 5 8 3 1 2 4 9 5 10 6 8 7 2 10 1 3 8 4 9 5 7 6 Well, I see that the correct order is: 3 1 2 4 9 5 10 6 8 7, so look at the second student's sequence: 4 7 2 3 10 6 9 1 5 8. Then,...
- Mon Feb 04, 2002 12:06 am
- Forum: Volume 1 (100-199)
- Topic: 133 - The Dole Queue
- Replies: 42
- Views: 5707
I don't get it! I am doing 133, Dole Queue, and I get it to work and all with the test case, but what's wrong with the code? It doesn't get accepted. (WA) // @BEGIN_OF_SOURCE_CODE /* @JUDGE_ID: 17243NT 133 C++ "Brute Force" */ // Send to judge@uva.es #include <stdio.h> int eeny[110]; int napplic, nt...
- Mon Feb 04, 2002 12:05 am
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies: 93
- Views: 7107
- Sun Feb 03, 2002 9:47 pm
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies: 93
- Views: 7107
- Sat Feb 02, 2002 9:49 pm
- Forum: Volume 1 (100-199)
- Topic: 136 - Ugly Numbers
- Replies: 156
- Views: 18377
How about this? It works in like 0.3 seconds. // @BEGIN_OF_SOURCE_CODE /* @JUDGE_ID: 17243NT 136 C++ "O(n^2) algorithm" */ // Send to judge@uva.es #include <iostream.h> const int INF = 1000000000; int main() { int i, j; int ugly[1500]; ugly[0] = 1; for(i = 1; i < 1500; i++) { ugly = INF; for(j = 0; ...
- Sat Feb 02, 2002 9:48 pm
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies: 93
- Views: 7107
My code is as follows: // @BEGIN_OF_SOURCE_CODE /* @JUDGE_ID: 17243NT 138 C++ "m^2 = n (n + 1) / 2" */ // Send to judge@uva.es #include <stdio.h> #include <math.h> int main() { int i = 0, m, n, tri; for(n = 2; i < 10; n++) { tri = (n * (n + 1)) >> 1; m = sqrt(tri); if(m * m == tri) { printf("%10d%10...
- Sat Jan 26, 2002 3:23 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 38594
I have this solution that seems to work... yet, it doesn't get accepted. Any ideas? #include <iostream.h> #include <fstream.h> #include <string.h> #define ins cin #define outs cout int blocks[30][30]; int nblocks[30]; int hashtbl[30]; int num; void pileblocks(int dest, int sn, int smin); void return...