codeforces-1037D Berland Fair

题目链接:点我点我w~

XXI Berland Annual Fair is coming really soon! Traditionally fair consists of n booths, arranged in a circle. The booths are numbered through n clockwise with n being adjacent to 1. The i-th booths sells some candies for the price of ai burles per item. Each booth has an unlimited supply of candies. 继续阅读codeforces-1037D Berland Fair