Search found 112 matches

by epsilon0
Mon Jan 27, 2003 12:38 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38134

i compiled and tested your program, and it doesn't work. i could notice that: "move" behaves like "pile" "onto" behaves like "over" the problem is perhaps in your Return function.... i didn't take time to understand how you store the blocks info, but it seems that u forget to delete the blocks when ...
by epsilon0
Sun Jan 26, 2003 3:16 pm
Forum: Volume 2 (200-299)
Topic: 253 - Cube painting
Replies: 28
Views: 12515

YEAH! JUST GOT ACCEPTED! this problem was a real torture to my brain since i had to mental rotate this damn cube to get my rotation tables... i got mixed up in the process and had to modify my code and rewrite the table from scratch. my solution is a little better than naive table, since i only cons...
by epsilon0
Tue Jan 07, 2003 1:55 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 19566

i'm sorry your code is too messy so i can't really read thru it (try to use functions and some comments) but i can still try to help you since i solved it. ok i see why you make the 2nd sort of all "strings" in lexicographic order. but this doesn't imply a box will fit in all the boxes after it in t...
by epsilon0
Mon Jan 06, 2003 8:10 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 19566

i think your algo is wrong... it's a bit suspicious to sort the strings in lexicographic order.... sorting the dimensions of each cube is good, to see whether a box fits in another. i just got accepted, my algo is: build a N*N table like this: tab[i,j] = 1 iff box i fits in box j find longer path in...
by epsilon0
Tue Dec 31, 2002 12:08 pm
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 2427

dear zsepi,

your c++ code compiles and run just fine on my box.
although i only tested it with a same input as i gave you.

if you have more input test, please give them to me and i'll test it with your code and mine to compare the output.
by epsilon0
Mon Dec 30, 2002 8:49 am
Forum: Volume 5 (500-599)
Topic: 502 - DEL command
Replies: 21
Views: 9155

this problem is easy, i'm surprised it only has 4-5% of AC. as Picard put it, all you have to do is cook the tightest rule to describe the set of files to delete, then check wether this rule (wildcard) is incompatible with all files to keep. there are 3 kind of rules: 1- the name of all files to be ...
by epsilon0
Sun Dec 29, 2002 2:27 pm
Forum: Volume 3 (300-399)
Topic: 340 - Master-Mind Hints
Replies: 27
Views: 8342

deddy one it doesn't matter wether you print stuff before or after you read the input!!! what matters is what you output... you could read all the input at once in a large buffer, or one job at a time, as you like. this problem is not hard...think about special cases.. things like 123456789 111111111
by epsilon0
Sun Dec 29, 2002 10:51 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 37630

i see... you do not have to test ALL n! possibilities... my idea would be to use a stack and explore the possibilities like a tree... BUT you can "go back" as soon as the sum of bottle movement gets greater than MAX (the temp max number of bottle movement).. not sure i'm being very clear :/ example:...
by epsilon0
Sat Dec 28, 2002 5:44 pm
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 2427

what error do you get? TL or WA?

if it's TL it might be a problem with the cin.feof() test... or the cin >> a >> b that blocks (i don't know C++ so i'm not sure)

if it's WA it's really weird since you tested your program a lot... unless it's a formatting problem but your code looks correct
by epsilon0
Fri Dec 27, 2002 9:59 am
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 2427

.. there are skew patterns if a, or b or both are < 2

input "1.95 1.95" gives best fit " 2 skew"
...____.................
./..........\...............
|............|.._____..
.\.____./../..........\.
..............|............|
...............\_____/.
by epsilon0
Fri Dec 27, 2002 9:50 am
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 2427

since my explanations were very poor i'd like to post my code, hope this helps you: [c]#include <stdio.h> #include <math.h> #define GRID 0 #define SKEW 1 char *method[] = {"grid", "skew"}; int comp_grid(float a, float b) { return (int)(floor(a) * floor(b)); } int comp_skew(float a, float b) { int x ...
by epsilon0
Fri Dec 27, 2002 9:43 am
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 2427

sorry, the formatting went bad... case 2 should look like _O_O O_O_O and the special case to consider: _O_O_O O_O_O where O denotes a pipe and _ a mere separator... my explanations are very unclear i'm sorry :( anyway like i said the first step in this problem is work out trigonometry in the SKEW ca...
by epsilon0
Fri Dec 27, 2002 9:36 am
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 2427

pipe fitters is an interesting problem. first off, there are 2 ways of arranging pipes. one is obvious, the other one requires basic trigonometry to figure out the difference in height between two row of pipes. 1: O O O O O O 2: O O O O O in case 2, the height is less than case 1!!!! second, conside...
by epsilon0
Fri Dec 27, 2002 9:27 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 37630

you could read my code. note that it's still not very elegant, since i handtyped the table of permutations... if there were more bin, i'd rather generate this table at run time (which is not difficult). [c]/* Ecological Bin Packing */ #include <stdio.h> #include <stdlib.h> #include <string.h> #defin...
by epsilon0
Tue Dec 24, 2002 1:07 pm
Forum: Volume 101 (10100-10199)
Topic: 10190 - Divide, But Not Quite Conquer!
Replies: 105
Views: 23756

the judge is nuts.
1 1 should be accepted.. but it's Boring!

if (a < 2 || b < 2 || (a < b)) /* Boring! */

Go to advanced search