C++ (gcc), (削除) 148 (削除ここまで) 143 bytes
#import<vector>
#define q[o[i/z]*z+o[i%z]]
using V=std::vector<int>;int f(V m,V o,V&r,V&R,int z){int i=z*z;for(r=R=V(i);i--;r[i]=m q)R q=m[i];}
AZTECCO
- 11k
- 1
- 17
- 60