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
惊讶的分数 | C++穷举及其优化练习题目
最新推荐文章于 2024-09-27 17:57:19 发布
本文介绍了一个关于运动编程的故事,主人公Vasya关注他最喜欢的程序员在比赛中的成绩。Vasya记录了程序员在所有比赛中的得分,并希望计算出他在历史比赛中有多少次打破最佳或最差纪录的表现。题目描述了一个输入输出的问题,要求计算在一系列比赛中,程序员有多少次得分超过之前所有比赛,或者低于之前所有比赛的情况。
摘要由CSDN通过智能技术生成