当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3425:Customer support

题目描述

Customer support department in an "Incomprehension Amateurs, Ltd" software company has call center for answering users' questions. Support prices are as follows:

1.Answer to a question10 USD
2.Correct answer to a question20 USD
3.Correct answer to a question with explanation40 USD
4.Correct answer to a question which was already correctly answered before+10 USD for each previous correct answerD

So, for example, if user asks the same question three times, first receives incorrect answer, then correct one, and the third time correct answer with explanation, it will cost him 10 + 20 + (40 + 1 * 10) = 80 USD.

Customers are billed monthly according to call log. Company engineers review the log and for each question determine:

1. unique number, so the equivalent questions have same numbers,
2. whether the answer was correct,
3. whether the answer was short or included detailed enough explanation.

Given that data, your program must calculate the payment amount.

输入解释

Input file contains number of calls N followed by N triples qi ai xi, where qi is integer question number, ai = 1 if the answer was correct, 0 otherwise, xi = 1 if explanation was given, 0 otherwise.

Constraints

1 ≤ N ≤ 10000, 1 ≤ qi ≤ 106.

输出解释

Output file must contain a single number — payment amount.

输入样例
Sample Input 1
1
9834 0 1
Sample Input 2
3
33 1 0
33 0 0
33 1 1
输出样例
Sample Output 1
10
Sample Output 2
80
提示
Bold texts appearing in the sample sections are informative and do not form part of the actual data.

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3425

最后修改于 2020-10-29T07:01:19+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000 65536