=== 프로그램 소스 === {{{~cpp #include #include using namespace std; #define MAX_JOURNEY 1024 // 최대 여정 수 int walk(int m, int n, int starti, int startj, char journey[MAX_JOURNEY], int **board); // 메인 함수 void main() { // 입력 데이터 int m, n; int starti, startj; char journey[MAX_JOURNEY]; // 입력 cout << "Input :\n"; cin >> m >> n; cin >> starti >> startj; // 여정 입력 char buffer[MAX_JOURNEY]; int offset=0; for(;;) { cin.getline(buffer,MAX_JOURNEY); if(strcmp(buffer,"999")==0) break; strcpy(&journey[offset],buffer); offset+=strlen(buffer); } // 출력 데이터 int count; int **board=new int*[m]; for(int i=0;i