Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int[] a= {4,1,2,3,4,5,6,7,8,9,10,11,12}
- int cols = a[0];
- int rows = (a.length - 1)/cols;
- int [][]q = {{3,2}, {2,1}};
- int out = new int[q.length];
- for(int i : q.length)
- out[i] = q[rows-1][cols-1]
- return out;
Add Comment
Please, Sign In to add comment