#include <iostream>
#define ROWS 5
#define COLS 4
int main(void) {
int matrix[ROWS][COLS] = {
{ 0, 1, 2, 3},
{ 4, 5, 6, 7},
{ 8, 9, 10, 11},
{12, 13, 14, 15},
{16, 17, 18, 10}
};
int x = 2, y = 2;
std::cout << x * COLS + y << "\n";
x = 3, y = 2;
std::cout << x * COLS + y << "\n";
return 0;
}
/*
run:
10
14
*/