#include using namespace std; #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } #define rep(i, a, b) for(int i = a; i < b; i++) #define rrep(i, a, b) for(int i = a; i >= b; i--) typedef vector vi; typedef vector vvi; int main() { fastcin; int n, c = 1, x = 0, y = 0; cin >> n; vvi b(n, vi(n)); for(x; xtmp-i; x--) { b[y][x] = c; c++; } x++; y--; mn++; } else if(m[mn]=='u') { int tmp = y; for(y; y>tmp-i; y--) { b[y][x] = c; c++; } y++; x++; mn++; } else if(m[mn]=='r') { int tmp = x; for(x; x