HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50400 - nth Row rth Element of a Table

Guest
• Review clarifications (1)

Volume problems

• 50311 - Student Line Up
• 50384 - Permutations revisited
• 50841 - My grand-grand-grandfather
• 50380 - Sum of the Numbers in the ...
• 50395 - Page "Like" Averages
• 50332 - Variance of a series
• 50398 - Sum of kth Anti-diagonal
• 50323 - Filtering Contact List
• 50400 - nth Row rth Element of ...
• 50364 - Student averages
• 50410 - Zero Padding
• 50407 - Missing Number
• 50337 - Exam Averages
• 50413 - Valid Permutations
• 50861 - The largest Student Group
• 50406 - Draw Pattern 178
• 50419 - The longest bitonic sequence

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.
Prepared by Ibrahim Mesecan.

nth Row rth Element of a Table

We frequently use tables, in computers. But normally, there is no tabular structure in the memory. Computer memory is a vectoral form series of memory locations. The data is stored in a vectoral form but whenever needed it's treated in a tabular format.

Question:
Write a program that reads a list of numbers in vectoral format, Then, you will be given the row and col positions of two elements from the table. Show the sum of these numbers

Input specification
You will be first given 2 integers: dimensions of the table (numRows and numCols) where 0 < (numRows and numCols) < 1000. The numbers in the table are integers between -30000 and 30000. Then, you will be given the row and column positions of two elements from the table. The last line will contain the numbers of the table in vector format. And, there will be at most 1000 integers in every line.

Output specification
Show just one integer number: sum of the two numbers.

Sample Input I   
  3 2
  2 2 3 1
  19 22 -14 17 19 -6  
Sample Output I   
  36


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

www.contester.ru