4013
static list table[5]; static int visit[5]; static int score[] = { 0, 1, 2, 4, 8 }; static int K, N, R; //K, 톱날위치, 회전방향 static void rotation(int n, int r) { list &cur = table[n]; if (r > 0) //시계 방향으로 회전 { cur.push_front(cur.back()); cur.pop_back(); } else //반시계 방향으로 회전 { cur.push_back(cur.front()); cur.pop_front(); } } static void __solution(int n, int r) { if (n 5) return; list::iterator ml, mr;..