[백준] 알고리즘 1063번 - 킹
#include using namespace std; string s[8] = { "R","L","B","T","RT","LT","RB","LB" }; int dy[8] = {0,0,-1,1,1,1,-1,-1}; int dx[8] = {1,-1,0,0,1,-1,1,-1}; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string k, dol,str; int kx,ky,dolx,doly; int n; cin >> k >> dol>>n; kx = k[0] - 'A'+1; ky = k[1] - '0'; dolx = dol[0] - 'A' + 1; doly = dol[1] - '0'; while (n--) { cin ..