#abc255a. A - You should output ARC, though this is ABC.

A - You should output ARC, though this is ABC.

Score : 100100 points

问题描述

给定整数 RRCC 以及一个 2×22 \times 2 矩阵 AA,输出矩阵 AA 中的元素 AR,CA_{R,C}

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Given integers RR, CC, and a 2×22 \times 2 matrix AA, print AR,CA_{R,C}.

Constraints

  • All values in input are integers.
  • 1R,C21 \le R,C \le 2
  • 0Ai,j1000 \le A_{i,j} \le 100

Input

Input is given from Standard Input in the following format:

RR CC

A1,1A_{1,1} A1,2A_{1,2}

A2,1A_{2,1} A2,2A_{2,2}

Output

Print the answer as an integer.

Sample Input 1

1 2
1 0
0 1

Sample Output 1

0

We have A1,2=0A_{1,2}=0.

Sample Input 2

2 2
1 2
3 4

Sample Output 2

4

We have A2,2=4A_{2,2}=4.

Sample Input 3

2 1
90 80
70 60

Sample Output 3

70

We have A2,1=70A_{2,1}=70.

update @ 2024/3/10 10:50:58