KCON - Editorial

can someone pls explain why have we made 2A array in this question and how have we arrived at the logic?