4 1 4 2 10 2 8 3 6
16 Consider eating the second and fourth cups. * The second cup has a flavor of $2$ and deliciousness of $10$. * The fourth cup has a flavor of $3$ and deliciousness of $6$. * Since they have different flavors, your satisfaction is $10+6=16$. Thus, you can achieve the satisfaction of $16$. You cannot achieve a satisfaction greater than $16$.
4 4 10 3 2 2 4 4 12
17
Consider eating the first and fourth cups.
* The first cup has a flavor of $4$ and deliciousness of $10$.
* The fourth cup has a flavor of $4$ and deliciousness of $12$.
* Since they have the same flavor, your satisfaction is $12+\frac{10}{2}=17$.
Thus, you can achieve the satisfaction of $17$.
You cannot achieve a satisfaction greater than $17$.{
"problem": {
"name": "Flavors",
"description": {
"content": "We have $N$ cups of ice cream. The flavor and deliciousness of the $i$\\-th cup are $F_i$ and $S_i$, respectively ($S_i$ is an even number). You will choose and eat two of the $N$ cups. Your satisf",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc315_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have $N$ cups of ice cream. \nThe flavor and deliciousness of the $i$\\-th cup are $F_i$ and $S_i$, respectively ($S_i$ is an even number).\nYou will choose and eat two of the $N$ cups. \nYour satisf...",
"is_translate": false,
"language": "English"
}
]
}