HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Linear Data Structures: Arrays > problem:


51125 - Filling an Array 3

Section problems

• 51044 - Number of Trees
• 51098 - Rotate a matrix
• 51061 - The Longest Path
• 51083 - Grades Histogram
• 51084 - Reflect a matrix
• 51011 - Decoding the Path
• 51088 - Number of letters
• 51172 - The biggest Minute
• 51125 - Filling an Array 3
• 51085 - xyx Divisible by k
• 51087 - Are they the same?
• 51091 - Guess the number - 1
• 51015 - Student Scholarships
• 51008 - Sum of Regional Maxes
• 51020 - Number of nodes removed
• 51141 - Most valuable stock items
• 51014 - Nine Men's Morris game

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Filling an Array 3

Question: Write a program that fills an array diagonally starting from upper-right corner.

Input specification: You will be given two integers: number of rows (n) and number of columns (m) for 2D array where 1 ≤ (n and m) ≤ 100.

Output specification: Show 2D array.

Sample Input 1 Sample Input 2
3 4 5 4
Sample Output 1 Sample Output 2
7 4 2 1
10 8 5 3
12 11 9 6
7 4 2 1
11 8 5 3
15 12 9 6
18 16 13 10
20 19 17 14



Для отправки решений необходимо выполнить вход.

www.contester.ru