当前位置:网站首页>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 :
边栏推荐
- "July 2022" Wukong editor update record
- Ian Goodfellow, the inventor of Gan, officially joined deepmind as research scientist
- How bad can a programmer be? Nima, they are all talents
- Leetcode——236. The nearest common ancestor of binary tree
- ⼀个对象从加载到JVM,再到被GC清除,都经历了什么过程?
- Substance painter notes: settings for multi display and multi-resolution displays
- AWS learning notes (III)
- Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
- 回归测试的分类
- 13 ux/ui/ue best creative inspiration websites in 2022
猜你喜欢

EfficientNet模型的完整细节

【愚公系列】2022年7月 Go教学课程 005-变量

Mmkv use and principle

MicTR01 Tester 振弦采集模塊開發套件使用說明

Multi merchant mall system function disassembly lecture 01 - Product Architecture

Internal sort - insert sort

小米的芯片自研之路

Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?

潘多拉 IOT 开发板学习(HAL 库)—— 实验12 RTC实时时钟实验(学习笔记)

Instructions for mictr01 tester vibrating string acquisition module development kit
随机推荐
Stm32cubemx, 68 sets of components, following 10 open source protocols
Oracle Linux 9.0 officially released
Shengteng experience officer Episode 5 notes I
15、文本编辑工具VIM使用
PD虚拟机教程:如何在ParallelsDesktop虚拟机中设置可使用的快捷键?
OAuth 2.0 + JWT protect API security
"July 2022" Wukong editor update record
Source code analysis of ArrayList
Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
Simple use of websocket
EfficientNet模型的完整细节
防火墙基础之服务器区的防护策略
Es log error appreciation -maximum shards open
激光雷达lidar知识点滴
2022云顾问技术系列之高可用专场分享会
PD virtual machine tutorial: how to set the available shortcut keys in the parallelsdesktop virtual machine?
ES日志报错赏析-- allow delete
Internal sort - insert sort
The world's first risc-v notebook computer is on pre-sale, which is designed for the meta universe!
激光雷達lidar知識點滴