当前位置:网站首页>Yyds dry goods inventory # solve the real problem of famous enterprises: cross line
Yyds dry goods inventory # solve the real problem of famous enterprises: cross line
2022-07-07 14:50:00 【51CTO】
1. sketch :
Big M Assign to small M A topic : First of all give n A point on the abscissa , Then connect them continuously with semicircles : First connect the first point with the second point ( Take the first point and the second point as the diameter of the semicircle ). Then connect the second and third points , Until the first n A little bit . Now we need to decide whether these semicircles intersect , Intersection at the end is not a semicircle intersection . As shown in the figure below .
The first line of input contains an integer T (1 ≤ T ≤ 10) Express T Group example . The first line of each set of samples is an integer n (1≤n≤1000). The next line of input is n Different integers separated by spaces a1,a2,...,an (-1000000 ≤ ai ≤ 1000000),(ai,0) It means the first one i The position of a point on the abscissa .
For each input file , Output T That's ok . Output per row "y" Indicates that these semicircles intersect or "n".
Input :
Output :
2. Code implementation :
边栏推荐
- The method of parsing PHP to jump out of the loop and the difference between continue, break and exit
- leetcode:648. 单词替换【字典树板子 + 寻找若干前缀中的最短符合前缀】
- 激光雷達lidar知識點滴
- Several ways of JS jump link
- 回归测试的分类
- Multi merchant mall system function disassembly lecture 01 - Product Architecture
- Xiaomi's path of chip self-development
- Today's sleep quality record 78 points
- ES日志报错赏析-- allow delete
- LeetCode 648. Word replacement
猜你喜欢
Introduction and use of Kitti dataset
leetcode:648. Word replacement [dictionary tree board + find the shortest matching prefix among several prefixes]
2022pagc Golden Sail award | rongyun won the "outstanding product technology service provider of the year"
Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
Zhiting doesn't use home assistant to connect Xiaomi smart home to homekit
Today's sleep quality record 78 points
AWS learning notes (III)
JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location
Apache多个组件漏洞公开(CVE-2022-32533/CVE-2022-33980/CVE-2021-37839)
C 6.0 language specification approved
随机推荐
Es log error appreciation -- allow delete
Mmkv use and principle
2022 cloud consulting technology series high availability special sharing meeting
Base64 encoding
电脑Win7系统桌面图标太大怎么调小
Leetcode one question per day (636. exclusive time of functions)
STM32CubeMX,68套组件,遵循10条开源协议
PLC:自动纠正数据集噪声,来洗洗数据集吧 | ICLR 2021 Spotlight
Navigation — 这么好用的导航框架你确定不来看看?
属性关键字OnDelete,Private,ReadOnly,Required
Small game design framework
In the field of software engineering, we have been doing scientific research for ten years!
Source code analysis of ArrayList
LeetCode 648. Word replacement
leetcode:648. 单词替换【字典树板子 + 寻找若干前缀中的最短符合前缀】
ES日志报错赏析-trying to create too many buckets
FFmpeg----图片处理
半小时『直播连麦搭建』动手实战,大学生技术岗位简历加分项get!
一文读懂数仓中的pg_stat
Shengteng experience officer Episode 5 notes I