当前位置:网站首页>[CCF CSP] 201604-1 break point count
[CCF CSP] 201604-1 break point count
2022-07-22 04:01:00 【Jenny, Jenny】
Problem description
Question number : | 201604-1 |
The title of the test question : | Break point count |
The time limit : | 1.0s |
Memory limit : | 256.0MB |
Problem description : | Problem description Given n An integer represents a store in succession n Days of sales . If sales were up one day , The next day sales are down , Call this day a discount point , In turn, if the previous sales decrease and the sales increase the next day , Also called this day a discount point . Other days are not discount points . As shown in the figure below , The first 3 Day and day 6 It's a discount .
Input format The first line of input contains an integer n. Output format Output an integer , Indicates the number of fold points . The sample input 7 Sample output 2 Evaluate use case size and conventions All evaluation cases meet :1 ≤ n ≤ 1000, The sales volume is no more than 10000 Non-negative integer . |
边栏推荐
猜你喜欢
随机推荐
关于Thread.sleep()方法
Athlete and coach case code
MySQL索引原理以及查询优化「建议收藏」
Date tool class
科创人·观远数据CEO苏春园:让业务用起来,是BI行业推倒渗透率之墙的关键
解决ssh登录后闲置时间过长而断开连接
Hutool工具类和工具方法
SATA协议OOB随笔
5.2访问控制
xxl-job源码阅读笔记
严蔚敏第二章课后习题(2.29-2.38)
栈的应用
Condition judgment order of inexplicable out of bounds error causes -- Based on leetcode 99 question, restore binary search tree
压缩字符串
【CCF CSP】201903-1小中大
Abstract class name as formal parameter and return value
LTspice软件电源设置
Lorsque idea crée un dossier, le dossier vide du dossier s'agrandit et se chevauche
Web
5.2 access control