当前位置:网站首页>#yyds干货盘点# 解决名企真题:交叉线
#yyds干货盘点# 解决名企真题:交叉线
2022-07-07 12:42:00 【51CTO】
1.简述:
大M布置给小M一个题目:首先给出n个在横坐标上的点,然后连续的用半圆连接他们:首先连接第一个点与第二点(以第一个点和第二点作为半圆的直径)。然后连接第二个第三个点,直到第n个点。现在需要判定这些半圆是否相交了,在端点处相交不算半圆相交。如下图所示。

输入的第一行包含一个整数T (1 ≤ T ≤ 10)表示有T组样例。每组样例的第一行是一个整数n (1≤n≤1000)。接下来的一行输入有n个用空格隔开的不同的整数a1,a2,...,an (-1000000 ≤ ai ≤ 1000000),(ai,0)表示第i个点在横坐标的位置。
对于每个输入文件,输出T行。每行输出"y"表示这些半圆有相交或者"n"。
输入:
输出:
2.代码实现:
边栏推荐
- Mrs offline data analysis: process OBS data through Flink job
- Substance Painter笔记:多显示器且多分辨率显示器时的设置
- Vscode configuration uses pylint syntax checker
- The world's first risc-v notebook computer is on pre-sale, which is designed for the meta universe!
- NDK beginner's study (1)
- Leetcode——236. 二叉树的最近公共祖先
- "July 2022" Wukong editor update record
- Csma/cd carrier monitoring multipoint access / collision detection protocol
- 数据湖(九):Iceberg特点详述和数据类型
- CVPR2022 | 医学图像分析中基于频率注入的后门攻击
猜你喜欢

LeetCode 648. Word replacement

多商戶商城系統功能拆解01講-產品架構

Navigation — 这么好用的导航框架你确定不来看看?

Data connection mode in low code platform (Part 2)

LeetCode 648. 单词替换

Démontage de la fonction du système multi - Merchant Mall 01 - architecture du produit

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

比尔·盖茨晒48年前简历:“没你们的好看”

KITTI数据集简介与使用

AWS学习笔记(三)
随机推荐
Mlgo: Google AI releases industrial compiler optimized machine learning framework
Mmkv use and principle
Differences between cookies and sessions
Arm cortex-a9, mcimx6u7cvm08ad processor application
《微信小程序-进阶篇》组件封装-Icon组件的实现(一)
一文读懂数仓中的pg_stat
昇腾体验官第五期随手记I
多商戶商城系統功能拆解01講-產品架構
LeetCode每日一题(636. Exclusive Time of Functions)
Ascend 910实现Tensorflow1.15实现LeNet网络的minist手写数字识别
回归测试的分类
The longest ascending subsequence model acwing 1014 Mountaineering
Es log error appreciation -- allow delete
半小时『直播连麦搭建』动手实战,大学生技术岗位简历加分项get!
Cvpr2022 | backdoor attack based on frequency injection in medical image analysis
Decrypt the three dimensional design of the game
Navigation — 这么好用的导航框架你确定不来看看?
「2022年7月」WuKong编辑器更版记录
Hangdian oj2092 integer solution
GVIM [III] [u vimrc configuration]