Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

3 of 6
r=R=V(i) instead of r=V(i),R=V(i)
AZTECCO
  • 11k
  • 1
  • 17
  • 60

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];}

Try it online!

AZTECCO
  • 11k
  • 1
  • 17
  • 60

AltStyle によって変換されたページ (->オリジナル) /