(https://pintia.cn/problem-sets/1433281645203116032/problems/1437018860810612736)
#include<iostream>
#include<cmath>
using namespace std;
int a[1000][1000];
void f(int k,int n)
{
if(n==2)
{
a[k][1]=k;
a[k][<
(https://pintia.cn/problem-sets/1433281645203116032/problems/1437018860810612736)
#include<iostream>
#include<cmath>
using namespace std;
int a[1000][1000];
void f(int k,int n)
{
if(n==2)
{
a[k][1]=k;
a[k][<