기출 문제 / 삼성 2023 Second Half Afternoon Problem 1

Rudolph's Rebellion

While preparing for Christmas Eve, Rudolph, the main transportation means for Santa, has rebelled against the P Santas numbered from 1 to P. Rudolph is attempting to disrupt Santa's gift delivery by headbutting the Santas. The Santas must capture Rudolph to save Christmas!