#include <iostream> #include <string> #include <stdio.h> #include <set> #include <string.h> #include <algorithm> #include <map> #include <iterator> #include <vector> using namespace std; struct pos_t { int x, y; }; enum STATE { &n...