-=1=-
There are cubs put one on other.You
have array
3 6
3 3 4 5 4 2
3 1 3 2 1 3
6 3 1 4 3 1
First two number means rows and collumns.
Other numbers means how many cubs
are put one on other.
It`s like swiming pool in deepest
places are water.
If theere is a hole water is flowing
away.
You have to get how many cubs of water
are possible to
put in this swiming pool.
Rows and collumns are not bigger then
100.
Cubs put one on other aren`t higer
than 1000.
output must be 5
-=2=-
Army mades a rocket defending system.
But there is broblem. When
Enemy sends a rocket army blows it
but if enemy sends a rocket that is
uper in the sky defending system cannot
blow it. Only if height is smaler
or similar with the blower rockets
height. Defendings rocket can blow
more than on enemys rocket. It only
can`t get higer in the sky.
if input is:
389
207
155
300
299
170
158
65
-1
Row ends with -1. Every number
means enemy rockets height in meters.
output must be 6.
-=3=-
There is rectangle. It`s a game. you
have to drave on vertival line
over the middle of rectangle. Rect.
will be in 2 pices. Then draw
a line that will be horizontal over
the middle of rectangle.
Now draw vertical line in midle over
two smaler rectangles. And
do like this(draw lines)so many times
what are say in input.
you have to get in how many small
rectangles will shall stay one big
rectangle.
if input:
1
output must be: 2
if input:
2
output must be: 4
-=4=-
Its compearing.
if input:
*3*4
7*8
10123
output must be:
9334
789
10123
Or something like this cause there
is more than one possibilities.
*3*4+7*8=10123 you have to put in
`*` some numbers that
compearing is corect.
|