当前位置:网站首页>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 :
边栏推荐
- Es log error appreciation -trying to create too many buckets
- FFmpeg----图片处理
- Electronic remote error
- 昇腾体验官第五期随手记I
- 小程序目录结构
- 15、文本编辑工具VIM使用
- How bad can a programmer be? Nima, they are all talents
- 今日睡眠质量记录78分
- Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
- Shengteng experience officer Episode 5 notes I
猜你喜欢
2022年13个UX/UI/UE最佳创意灵感网站
Navigation — 这么好用的导航框架你确定不来看看?
Démontage de la fonction du système multi - Merchant Mall 01 - architecture du produit
LeetCode每日一题(636. Exclusive Time of Functions)
Five pain points for big companies to open source
Data Lake (IX): Iceberg features and data types
Zhiting doesn't use home assistant to connect Xiaomi smart home to homekit
Substance Painter笔记:多显示器且多分辨率显示器时的设置
防火墙基础之服务器区的防护策略
asp.netNBA信息管理系统VS开发sqlserver数据库web结构c#编程计算机网页源码项目详细设计
随机推荐
[Yugong series] go teaching course 005 variables in July 2022
Five pain points for big companies to open source
Oracle Linux 9.0 officially released
云上“视界” 创新无限 | 2022阿里云直播峰会正式上线
一个程序员的水平能差到什么程度?尼玛,都是人才呀...
Today's sleep quality record 78 points
Simple use of websocket
word中删除一整页
Beginner JSP
Es log error appreciation -- allow delete
激光雷达lidar知识点滴
【历史上的今天】7 月 7 日:C# 发布;Chrome OS 问世;《仙剑奇侠传》发行
Navigation — 这么好用的导航框架你确定不来看看?
#yyds干货盘点# 解决名企真题:交叉线
寺岗电子称修改IP简易步骤
Mlgo: Google AI releases industrial compiler optimized machine learning framework
JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location
Attribute keywords serveronly, sqlcolumnnumber, sqlcomputecode, sqlcomputed
Cocoscreator resource encryption and decryption
Attribute keywords ondelete, private, readonly, required