## Search found 15 matches

Sat Jun 17, 2006 6:43 pm
Forum: Other words
Topic: Bricks problem
Replies: 1
Views: 1796

### Bricks problem

You have chess board of size N x M and a lot of bricks of size K x 1.
How many bricks can you place on this board (brick edges must be
pallarel to board edges)

Sample data:
N = 10, M = 10, K = 4
RESULT = 24

N = 8, M = 5, K = 5
RESULT = 8
Wed Feb 16, 2005 12:44 am
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 15507

### Tip: Styles can be applied quickly to selected text.

Thanks, but I'm still looking for O(n^3) solution .
Fri Feb 11, 2005 9:42 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 15507

### 104 - "Arbitrage" - plz help

Could anybody tell me, how should I modify Floyd-Warshall algo O(n^3), to receive correct answer? I know how to solve same problem (using F-W) but without limit to number of exchanges and this great 1% ;]. What I already know: 1) I change the d [j] = min(d [j], d [k] + d[k][j]) to d [j] = max(d [j],...
Tue Jun 17, 2003 9:40 am
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 14086
Thanks a lot ( I got accepted ).
Wed Jun 11, 2003 4:15 pm
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 14086

### 594 - problem with converting

Hello. If I have understood problem number 594 I should only reverse all the bytes in the data. So, I convert the data into binary ( in the string of course ), then reverse each 8-bits blocks and for half of examples I receive good answer. What's wrong in my thinking? Exaple: input: x output: y x ( ...
Mon May 12, 2003 10:26 am
Forum: Algorithms
Replies: 1
Views: 2076

Hello.

Can anyone tell me some about backtracking.
There's a lot of such problems. For ex. 524 - "Prime Ring Problem".
There are very interesting, so I want to learn some about

Thanks.

Yo
Fri May 09, 2003 2:30 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 45100
1) Could you move your code into "C++" statements ? It will be readable.

3) Possibly, the error occurs, because you are using classes in some uncompatible
style. This problem is realy easy, so you musn't use classes. One array should be enought.

Yo
Mon May 05, 2003 11:01 am
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 30341
1) I think you should better use "long long" ( 64bit integer ) than double.
It will make less problems.

2) Use precalculation ( first count everything into to table, later read

Yo
Thu Apr 24, 2003 7:54 pm
Forum: Volume 1 (100-199)
Topic: 144 - Student Grants
Replies: 21
Views: 3802
Ok

I repaired that and I accepted.

Thx.
Thu Apr 24, 2003 7:53 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579
Ok

I repaired that and I accepted.

Thx.
Thu Apr 24, 2003 7:52 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579
It's working now. There was an error in line

[cpp]
max = 0xffffffffff;
[/cpp]

There was too small

Thx everyone.
Thu Apr 24, 2003 3:48 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579
I sent it as cpp code, so it should work.
Wed Apr 23, 2003 2:58 pm
Forum: Volume 1 (100-199)
Topic: 144 - Student Grants
Replies: 21
Views: 3802

### 144 - Students Grans -WA

Hello. My program seems to work good, but the judge gives WA. Could you look at that and tell me, what wrong?! [cpp] #include <stdio.h> int lenghtof(int); int main() { int count, // ilosc studentow max, // maksymalna kwota w automacie amount, // aktualna kwota w automacie amount2, // tymczasowa kwot...
Wed Apr 23, 2003 2:53 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 25181