## Search found 56 matches

- Thu Jun 19, 2008 10:44 am
- Forum: Algorithms
- Topic: Bar cutting problem
- Replies:
**0** - Views:
**1212**

### Bar cutting problem

I have to write an algorithm to optimize cutting smaller bars from a minimum number of full length (uncut) bars. The full length of an entire (uncut) bar is 1200. Then I get a set of smaller bars in length&number pairs like 12bars of length 350, 6bars of length 400, etc. The problem is to find the b...

- Fri Jun 24, 2005 10:04 am
- Forum: Algorithms
- Topic: algorithm/ideas needed
- Replies:
**4** - Views:
**1658**

- Thu Jun 23, 2005 2:54 pm
- Forum: Algorithms
- Topic: algorithm/ideas needed
- Replies:
**4** - Views:
**1658**

- Thu Jun 23, 2005 2:50 pm
- Forum: Algorithms
- Topic: algorithm/ideas needed
- Replies:
**4** - Views:
**1658**

i have no theorem to back me up, but here's a guess: if lh is the hexagon's side length, ah it's area, lt1..ltn the triangle sides and atn their areas, then if u can write lh as a sum of lt1..ltn and ah as a sum of at1..atn then i belive the hexagon can be splited. at = lt *lt *sqrt(3)/4; ah = lh*lh...

- Thu Jun 23, 2005 1:42 pm
- Forum: Algorithms
- Topic: Usaco problem (contact) in section 2.1
- Replies:
**6** - Views:
**1788**

hi. my idea is something like: generate all possible sequences in A-B bit range and convert to a string. use the strstr function to go through the message string and count occurences. of course, if a=1 and b=12 there are a lot of cases, but there is a catch: 00 will allways have less occurences than...

- Mon Jun 06, 2005 12:34 pm
- Forum: Volume 1 (100-199)
- Topic: 119 - Greedy Gift Givers
- Replies:
**145** - Views:
**25715**

- Fri Jun 03, 2005 2:22 pm
- Forum: Algorithms
- Topic: Panel
- Replies:
**5** - Views:
**1277**

hi. i assume BF comes from brute force. also i assume by BF in this case u mean the one presented on the page for the easy test-case. what is the monte-carlo solution? what euristic method have u used, the one they present? please clarify theese things to me. here's some math i did on this. is it ac...

- Fri Jun 03, 2005 12:08 pm
- Forum: C
- Topic: quicksort built in
- Replies:
**8** - Views:
**8355**

- Fri Jun 03, 2005 12:02 pm
- Forum: C
- Topic: about using "sscanf" :=)
- Replies:
**5** - Views:
**3704**

actually, "%s" skips all preceeding blank spaces (specified in isspace() for instance), which are more then " ", "\n" and "\r". (the tab is a blank surely "\t"). as for reding from a string, here's a good topic, which gives u all the solutions u need: http://acm.uva.es/board/viewtopic.php?t=7539&sid...

- Fri Jun 03, 2005 11:42 am
- Forum: C
- Topic: scanf in 10013!
- Replies:
**1** - Views:
**2193**

- Fri Jun 03, 2005 11:27 am
- Forum: C
- Topic: Things that produce compile error
- Replies:
**3** - Views:
**3531**

- Fri Jun 03, 2005 11:24 am
- Forum: C
- Topic: Weird Invalid Memory Reference?
- Replies:
**5** - Views:
**3101**

- Wed Jun 01, 2005 3:45 pm
- Forum: C
- Topic: Passing bidimentional mtrx to functions as pointer argument
- Replies:
**3** - Views:
**2221**

it is possible to pass anything, it's just that things get complicated fast the more u reference. if u have int mat[N][M]; => void doSomething(int m[][M]); //or int *m[M] (this is an array of arrays of int) int *mat[M]; => void doSomething(int *m[M]); // or int **m (this is an array of pointers to i...

- Wed Jun 01, 2005 3:13 pm
- Forum: C
- Topic: Exchanging two integers
- Replies:
**5** - Views:
**3011**