惊讶的分数 | C++穷举及其优化练习题目

本文介绍了一个关于运动编程的故事,主人公Vasya关注他最喜欢的程序员在比赛中的成绩。Vasya记录了程序员在所有比赛中的得分,并希望计算出他在历史比赛中有多少次打破最佳或最差纪录的表现。题目描述了一个输入输出的问题,要求计算在一系列比赛中,程序员有多少次得分超过之前所有比赛,或者低于之前所有比赛的情况。
摘要由CSDN通过智能技术生成

Vasya adores sport programming. He can’t write programs but he loves to watch the contests’ progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya decided to collect the results of all contests where his favorite coder participated and track the progress of his coolness. For each contest where this coder participated, he wrote out a single non-negative number — the number of points his favorite coder earned in the contest. Vasya wrote out the points for the contest in the order, in which the contests run (naturally, no two contests ran simultaneously).
Vasya considers a coder’s performance in a contest amazing in two situations: he can break either his best or his worst performance record. First, it is amazing if during the contest the coder earns strictly more points that he earned on each past contest. Second, it is amazing if during the contest the coder earns strictly less points that he earned on each past contest. A coder’s

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值