Please go to the UVA problem link..****
I was considering as length = N, width = 1, height = 1, which leads us to surface area = 2(N*1 + 1*1 + N*1)?
Why this is incorrect, and we need to go through all the combination of length, width, and height?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3757 |
2 | jiangly | 3647 |
3 | Benq | 3581 |
4 | orzdevinwang | 3570 |
5 | Geothermal | 3569 |
5 | cnnfls_csy | 3569 |
7 | Radewoosh | 3509 |
8 | ecnerwala | 3486 |
9 | jqdai0815 | 3474 |
10 | gyh20 | 3447 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | maomao90 | 171 |
2 | awoo | 165 |
3 | adamant | 164 |
4 | TheScrasse | 159 |
5 | nor | 154 |
5 | maroonrk | 154 |
7 | -is-this-fft- | 152 |
8 | Petr | 147 |
9 | orz | 146 |
10 | pajenegod | 145 |
Please go to the UVA problem link..****
I was considering as length = N, width = 1, height = 1, which leads us to surface area = 2(N*1 + 1*1 + N*1)?
Why this is incorrect, and we need to go through all the combination of length, width, and height?
Название |
---|
If N = n^3 then your solution requires Θ(n3) area but an n x n x n cube can be wrapped by a paper with Θ(n2) area.
You are just putting cubes like 1xn tower in your solution, but let's see one example:
n = 8
which needs 34 area.
which needs 24 area.
Hope you understood.
(Sorry for poor paint skills)