package src; import java.util.*; class B{ static Scanner s = new Scanner(System.in); public static void main(String[] args) { int size = s.nextInt(); int[][] in = new int[size][size]; Card[] cards = new Card[s.nextInt()]; for (int i=0;i edge; Card(int[][] in,int max) { int size = in.length; edge = new ArrayList<>(in.length*2+2); BitSet h =new BitSet(max), v =new BitSet(max), t1=new BitSet(max), t2=new BitSet(max); for(int i=0;i