当前位置:网站首页>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 :
边栏推荐
- ⼀个对象从加载到JVM,再到被GC清除,都经历了什么过程?
- 内部排序——插入排序
- Introduction and use of Kitti dataset
- Equipment failure prediction machine failure early warning mechanical equipment vibration monitoring machine failure early warning CNC vibration wireless monitoring equipment abnormal early warning
- 华为云数据库DDS产品深度赋能
- 关于后台动态模板添加内容的总结 Builder使用
- Substance painter notes: settings for multi display and multi-resolution displays
- PLC: automatically correct the data set noise, wash the data set | ICLR 2021 spotlight
- CVPR2022 | 医学图像分析中基于频率注入的后门攻击
- Instructions d'utilisation de la trousse de développement du module d'acquisition d'accord du testeur mictr01
猜你喜欢

Cvpr2022 | backdoor attack based on frequency injection in medical image analysis

leetcode:648. 单词替换【字典树板子 + 寻找若干前缀中的最短符合前缀】

MicTR01 Tester 振弦采集模块开发套件使用说明

Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an

Because the employee set the password to "123456", amd stolen 450gb data?

Infinite innovation in cloud "vision" | the 2022 Alibaba cloud live summit was officially launched

Introduction and use of Kitti dataset

The world's first risc-v notebook computer is on pre-sale, which is designed for the meta universe!

2022pagc Golden Sail award | rongyun won the "outstanding product technology service provider of the year"

LeetCode每日一题(636. Exclusive Time of Functions)
随机推荐
Demis Hassabis谈AlphaFold未来目标
Cvpr2022 | backdoor attack based on frequency injection in medical image analysis
word中删除一整页
PyTorch模型训练实战技巧,突破速度瓶颈
在软件工程领域,搞科研的这十年!
Leetcode one question per day (636. exclusive time of functions)
[today in history] July 7: release of C; Chrome OS came out; "Legend of swordsman" issued
electron remote 报错
今日睡眠质量记录78分
A laravel background management expansion package you can't miss - Voyager
Leetcode——236. The nearest common ancestor of binary tree
Differences between cookies and sessions
一个程序员的水平能差到什么程度?尼玛,都是人才呀...
ES日志报错赏析-trying to create too many buckets
小程序目录结构
Pytorch model trains practical skills and breaks through the bottleneck of speed
What is cloud primordial? This time, I can finally understand!
Data connection mode in low code platform (Part 2)
Xiaomi's path of chip self-development
OAuth 2.0 + JWT protect API security