当前位置:网站首页>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 :
边栏推荐
- Substance painter notes: settings for multi display and multi-resolution displays
- JS image to Base64
- In the field of software engineering, we have been doing scientific research for ten years!
- 2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」
- MicTR01 Tester 振弦采集模塊開發套件使用說明
- Mmkv use and principle
- 寺岗电子称修改IP简易步骤
- Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
- 防火墙基础之服务器区的防护策略
- Attribute keywords ondelete, private, readonly, required
猜你喜欢

Cocoscreator operates spine for animation fusion

What is cloud primordial? This time, I can finally understand!

JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location

LeetCode每日一题(636. Exclusive Time of Functions)

Data connection mode in low code platform (Part 2)

JSON解析实例(Qt含源码)

数据湖(九):Iceberg特点详述和数据类型

Apache多个组件漏洞公开(CVE-2022-32533/CVE-2022-33980/CVE-2021-37839)

#yyds干货盘点# 解决名企真题:交叉线

leetcode:648. 单词替换【字典树板子 + 寻找若干前缀中的最短符合前缀】
随机推荐
Simple steps for modifying IP of sigang electronic scale
Huawei cloud database DDS products are deeply enabled
In the field of software engineering, we have been doing scientific research for ten years!
OAuth 2.0 + JWT protect API security
Pytorch model trains practical skills and breaks through the bottleneck of speed
「2022年7月」WuKong编辑器更版记录
Notes de l'imprimante substance: paramètres pour les affichages Multi - écrans et multi - Résolutions
MicTR01 Tester 振弦采集模塊開發套件使用說明
The method of parsing PHP to jump out of the loop and the difference between continue, break and exit
Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
How bad can a programmer be? Nima, they are all talents
潘多拉 IOT 开发板学习(HAL 库)—— 实验12 RTC实时时钟实验(学习笔记)
Cocoscreator operates spine for animation fusion
2022 cloud consulting technology series high availability special sharing meeting
Read PG in data warehouse in one article_ stat
华为云数据库DDS产品深度赋能
JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location
#yyds干货盘点# 解决名企真题:交叉线
Data Lake (IX): Iceberg features and data types
Es log error appreciation -maximum shards open