N
N
Nonpacie2020-09-20 01:46:42
C++ / C#
Nonpacie, 2020-09-20 01:46:42

Calculating rows and columns that monotonically fall off?

The task is given:
The matrix of the size m * n is given. Print the number of 1) lines; 2) columns, the elements of which grow monotonously (come).

I ask you to help not with solving the problem, but with understanding what exactly they want from me. In what sense monotonously grow\fall down. Let's say, I just can't understand in principle what the essence of the task is and what they want from me. We need an outreach team :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Belyaev, 2020-09-20
@Nonpacie

I think it's about this: https://ru.wikipedia.org/wiki/Monotone_function
Simply put, if the rule works for each cell of a row/column cell[i] >= cell[i - 1], then the row/column fits the conditions of the problem and they need to be counted

N
Nonpacie, 2020-09-20
@Nonpacie

I will clarify:
We have a 4x4 matrix
3 5 9 12
2 4 7 3
1 3 5 9
0 2 9 12
The first row fits the condition "monotonously growing", and the first two columns monotonously decrease, we output Rows: 1, columns: 2, for example , right?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question