P2214 [USACO14MAR] Mooo Moo S
题目描述
Farmer John has completely forgotten how many cows he owns! He is too embarrassed to go to his fields to count the cows, since he doesn't want the cows to realize his mental lapse. Instead, he decides to count his cows secretly by planting microphones in the fields in which his cows tend to gather, figuring that he can determine the number of cows from the total volume of all the mooing he hears.
FJ's N fields (1
输入格式
无
输出格式
无
说明/提示
INPUT DETAILS:
FJ owns 5 fields, with mooing volumes 0,17,16,20,19. There are two breeds
of cows; the first moos at a volume of 5, and the other at a volume of 7.
OUTPUT DETAILS:
There are 2 cows of breed #1 and 1 cow of breed #2 in field 2, and there is
another cow of breed #1 in field 4.
Source: USACO 2014 March Contest, Silver