Professional Documents
Culture Documents
Matrix operations:
- Reversal from the midline
- Reversing toward the median column
- Reversal from the center of the matrix
- A matrix transpose
Example:
f.in
3 4
1 2 3 4
5 6 7 8
9 10 11 12
f.out
Invert from the midline:
9 10 11 12
5 6 7 8
1 2 3 4
Invert compared to the median column:
4 3 2 1
8 7 6 5
December 11 10 9
Invert from the center of the matrix:
December 11 10 9
8 7 6 5
Class IX
[2010-12-13 - 22:53:38]
The decrease in large numbers
Natural numbers with many digits can save by using vectors. Compute and it displ
ays the difference of two integers stored in two vectors and b n m elements resp
ectively.
Figures numbers will be introduced from the keyboard without any space between t
hem.
Example: see figure above
Resolution
[2010-12-13 - 22:53:46]
Multiplication of large numbers
Natural numbers with many digits can save by using vectors. Compute and it displ
ays the product of two integers stored in two vectors and b n m elements respect
ively.
Figures numbers will be introduced from the keyboard without any space between t
hem.
Example: see figure above
Resolution
[2011-02-13 - 11:10:43]
Generare.in file reads a natural number n at most 20. It is written in the file
generare.out the nth term of the sequence 1, 11, 21, 1211 111 221, 312 211, 3111
2221 ...
Resolution
[2011-02-13 - 11:46:39]
A black and white image is represented MXM encoded in a matrix with elements 0 o
r 1. Whether the image can do the following:
- Reversal, that values ??1 and 0 turns the 1 in 0;
rama.in
4
1 1 1 0
1 0 1 0
1 1 0 1
0 0 0 1
rama.out
3
2 4
4 2
February 2
Resolution
[2011-03-01 - 09:20:13]
Matrix operations:
- Reversal from the midline
- Reversing toward the median column
- Reversal from the center of the matrix
- A matrix transpose
Example:
f.in
3 4
1 2 3 4
5 6 7 8
9 10 11 12
f.out
Invert from the midline:
9 10 11 12
5 6 7 8
1 2 3 4
Invert compared to the median column:
4 3 2 1
8 7 6 5
December 11 10 9
Invert from the center of the matrix:
December 11 10 9
8 7 6 5
4 3 2 1
Transposed:
1 5 9
2 6 October
3 July 11
4 8 December
Resolution
[05/13/2013 - 10:15:07]
A pool table can be represented by a matrix of n rows and m columns (m odd)
ered from 1.
The billiard table has a total of six openings arranged in the four corners
in the middle of one line (1, m / 2 + 1) and the line miljlocul n (n, m / 2
.
Position 1.1 launches a ball at 45 degrees (southeast). Establish where the
s will enter the ball after how many steps.
Steps are taken as the positions of the matrix through which bile. When the
touches the edge of the table, the ball bounces symmetrical.
Example:
n = 4 m = 5
numb
and
+ 1)
hole
ball