#include using namespace std; vector rorate(vector board) { int n = board.size(); int m = board[0].size(); vector res; for(int i=0;i S; string s; int R,K,H,W; cin >> R >> K; cin >> H >> W; for(int i=0;i> s; S.push_back(s); } R = 360 - R; R%=360; for(int r=0;r res; for(int i=0;i