For each line of input there will be one line of output indicating what color bottles go in what bin to minimize the number of bottle movements. You should also print the minimum number of bottle movements.
The output should consist of a string of the three upper case characters 'G', 'B', 'C' (representing the colors green, brown, and clear) representing the color associated with each bin.
The first character of the string represents the color associated with the first bin, the second character of the string represents the color associated with the second bin, and the third character represents the color associated with the third bin.
The integer indicating the minimum number of bottle movements should follow the string.
If more than one order of brown, green, and clear bins yields the minimum number of movements then the alphabetically first string representing a minimal configuration should be printed.
For each line of input there will be one line of output indicating what color bottles go in what bin to minimize the number of bottle movements. You should also print the minimum number of bottle movements.The output should consist of a string of the three upper case characters 'G', 'B', 'C' (representing the colors green, brown, and clear) representing the color associated with each bin.The first character of the string represents the color associated with the first bin, the second character of the string represents the color associated with the second bin, and the third character represents the color associated with the third bin.The integer indicating the minimum number of bottle movements should follow the string.If more than one order of brown, green, and clear bins yields the minimum number of movements then the alphabetically first string representing a minimal configuration should be printed.
การแปล กรุณารอสักครู่..

สำหรับแต่ละบรรทัดของท่านจะมีเส้นหนึ่งของการส่งออกที่ระบุสิ่งที่สีขวดไปในสิ่งที่ถังขยะเพื่อลดจำนวนของการเคลื่อนไหวของขวด นอกจากนี้คุณควรพิมพ์จำนวนขั้นต่ำของการเคลื่อนไหวขวด. เอาท์พุทควรประกอบด้วยสตริงของทั้งสามกรณีอักขระตัวพิมพ์ใหญ่ 'G', 'B', 'C' (แทนสีเขียว, สีน้ำตาล, และชัดเจน) เป็นตัวแทนของสีที่เกี่ยวข้อง กับแต่ละถัง. ตัวอักษรตัวแรกของสตริงหมายถึงสีที่เกี่ยวข้องกับถังแรกตัวละครที่สองของสตริงหมายถึงสีที่เกี่ยวข้องกับถังที่สองและตัวละครที่สามหมายถึงสีที่เกี่ยวข้องกับถังที่สาม. จำนวนเต็มแสดงให้เห็น จำนวนขั้นต่ำของการเคลื่อนไหวขวดควรปฏิบัติตามสตริง. หากมีมากกว่าหนึ่งคำสั่งของสีน้ำตาล, สีเขียว, และชัดเจนถังขยะอัตราผลตอบแทนจำนวนขั้นต่ำของการเคลื่อนไหวแล้วสตริงแรกตามลำดับตัวอักษรที่เป็นตัวแทนของการกำหนดค่าน้อยที่สุดควรจะพิมพ์
การแปล กรุณารอสักครู่..
