POJ 2083
# include <cstdio> # include <iostream> # include <algorithm> # include <cmath> # include <vector> # include <set> # include <cstring> # include <sstream> # include <map> # include <stack> # include <queue> # include <ctime> # include <cstdlib> using namespace std ; char Answer [ 730 ] [ 730 ] ; char getAnswer ( int n , int ci , int cj ) ; void fill_ ( int n , int ci , int cj ) { if ( n == 1 ) { Answer [ ci ] [ cj ] = 'X' ; return ; } getAnswer ( n , ci , cj ) ; } char getAnswer ( int n , int ci , int cj ) { int len = pow ( 3 , n - 2 ) ; fill_ ( n - 1 , ci , cj ) ; //左 fill_ ( n - 1 , ci , cj