102550: [AtCoder]ABC255 A - You should output ARC, though this is ABC.

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

Problem Statement

Given integers $R$, $C$, and a $2 \times 2$ matrix $A$, print $A_{R,C}$.

Constraints

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

Input

Input is given from Standard Input in the following format:

$R$ $C$
$A_{1,1}$ $A_{1,2}$
$A_{2,1}$ $A_{2,2}$

Output

Print the answer as an integer.


Sample Input 1

1 2
1 0
0 1

Sample Output 1

0

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


Sample Input 2

2 2
1 2
3 4

Sample Output 2

4

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


Sample Input 3

2 1
90 80
70 60

Sample Output 3

70

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

Input

题意翻译

给定整数 $R,C$ 和一个两行两列的矩阵 $A$ ,输出 $A_{R,C}$ 。

Output

分数:100分

问题描述

给定整数$R$,$C$和一个$2\times2$的矩阵$A$,输出$A_{R,C}$。

限制条件

  • 输入中的所有值都是整数。
  • $1\le R,C\le 2$
  • $0\le A_{i,j}\le 100$

输入

从标准输入按照以下格式给出输入:

$R$ $C$
$A_{1,1}$ $A_{1,2}$
$A_{2,1}$ $A_{2,2}$

输出

将答案作为整数输出。


样例输入1

1 2
1 0
0 1

样例输出1

0

我们有$A_{1,2}=0$。


样例输入2

2 2
1 2
3 4

样例输出2

4

我们有$A_{2,2}=4$。


样例输入3

2 1
90 80
70 60

样例输出3

70

我们有$A_{2,1}=70$。

加入题单

算法标签: