#include #include using namespace std; typedef long long int Long; char display[100][100]; char newdisplay[100][100]; struct Vec{ int x; int y; Vec(){ x = y = 0; } Vec(int X, int Y){ x = X; y = Y; } void rotL(){ Vec t = *this; x = -t.y; y = t.x; } void rotR(){ Vec t = *this; x = t.y; y = -t.x; } void flipH(){ y = -y; } void flipV(){ x = -x; } void flipD(){ Vec t = *this; x = -t.y; y = -t.x; } void flipAD(){ Vec t = *this; x = t.y; y = t.x; } void add(const Vec& v){ x+=v.x; y+=v.y; } }; string cmap[] = { "|||||", " \\^/ ", "-< >-", " /v\\ ", "|||||" }; char Rot(const Vec& X, const Vec& Y, char c){ Vec v; switch(c){ case '^': v = Vec(0,1); break; case '>': v = Vec(1,0); break; case 'v': v = Vec(0,-1); break; case '<': v = Vec(-1,0); break; case '|': v = Vec(0,2); break; case '-': v = Vec(2,0); break; case '\\': v = Vec(1,-1); break; case '/': v = Vec(1,1); break; default: return c; } Vec v2; v2.x = v.x * X.x + v.y * Y.x; v2.y = v.x * X.y + v.y * Y.y; v = v2; return cmap[4 -(2+v.y)][2+v.x]; } int main() { int N; while(cin >> N){ string s; getline(cin,s); for(int y=0; y': X.rotR(); Y.rotR(); start.rotR(); break; case '|': X.flipV(); Y.flipV(); start.flipV(); break; case '-': X.flipH(); Y.flipH(); start.flipH(); break; case '\\': X.flipD(); Y.flipD(); start.flipD(); break; case '/': X.flipAD(); Y.flipAD(); start.flipAD(); break; default: break; } if(s[i] == ' ') continue; //cout << s[i] << endl << X.x << ' ' << X.y << endl << Y.x << ' ' << Y.y << endl << start.x << ' ' << start.y << ' ' << endl << endl; } Vec pos; if(start.x > 0) pos.x = N-1; if(start.y > 0) pos.y = N-1; //cout << "START " << pos.x << ' ' << pos.y << endl; for(int y=0; y-| x<> -o\ voooo |ooo/ ooo/> \o/>> */