Official

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


This problem can be solved without a for statement but just with if statements, but this time, we dare to show the implementation using for statements.

In competitive programming, two-dimensional arrays are often given from the Standard Input; for this problem, you can receive one as the following sample input.
Then, output \(A_{R,C}\) in the received matrix \(A\).

Sample code (C++):

#include<bits/stdc++.h>

using namespace std;

int main(){
  int r,c;
  cin >> r >> c;
  int a[4][4];
  for(int i=1;i<=2;i++){
    for(int j=1;j<=2;j++){
      cin >> a[i][j];
    }
  }
  cout << a[r][c] << '\n';
  return 0;
}

posted:
last update: