#include #include using namespace std; using vc=vector; using vvc=vector; void rot(vvc&d, vvc&s, int r) { int sw, sh, dw, dh; sw=dw=s[0].size(); sh=dh=s.size(); if(r==90 || r==270) { dw=sh; dh=sw; } d.resize(dh); for(auto&de:d) de.resize(dw); for(int sy=0;sy