当前位置:网站首页>AcWing 4299. Delete point
AcWing 4299. Delete point
2022-07-06 22:56:00 【GHOSTANDBREAD】
In a two-dimensional plane there is nn A little bit , None of these points are located in yy On the shaft .
Please judge whether there is any satisfaction in these points , After deleting this point , All the remaining points are in yy Same side of shaft .
Input format
The first line contains integers nn.
Next nn That's ok , Each line contains two integers x,yx,y, Represents the abscissa and ordinate of one of the points .
The positions of the points do not coincide .
Output format
If there are points that meet the requirements , The output Yes, Otherwise output No.
Data range
The first three test points meet 2≤n≤102≤n≤10.
All test points meet 2≤n≤1002≤n≤100,|x|,|y|≤100|x|,|y|≤100,|x|≠0|x|≠0.
sample input 1:
3
1 1
-1 -1
2 -1
sample output 1:
Yes
sample input 2:
4
1 1
2 2
-1 1
-2 2
sample output 2:
No
sample input 3:
3
1 2
2 1
4 60
sample output 3:
YesThe code is as follows :
#include<iostream>
#include<cstring>
using namespace std;
int n, cnt1, cnt2;
int main() {
ios::sync_with_stdio(false);
cout.tie(NULL);
cin >> n;
for(int i = 0; i < n; i ++) {
int x, y;
cin >> x >> y;
if(x > 0) cnt1++;
else cnt2++;
}
if(cnt1 == 1 || cnt2 == 1 || cnt1 == 0 || cnt2 == 0)
cout<<"Yes";
else
cout<<"No";
return 0;
}边栏推荐
- BasicVSR_ Plusplus master test videos and pictures
- UE4 blueprint learning chapter (IV) -- process control forloop and whileloop
- Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
- MATLAB小技巧(27)灰色预测
- Extern keyword
- UDP programming
- 机试刷题1
- The problem that dockermysql cannot be accessed by the host machine is solved
- three. JS gorgeous bubble effect
- Chapter 19 using work queue manager (2)
猜你喜欢

视图(view)

Aardio - integrate variable values into a string of text through variable names

Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)

On the problems of born charge and non analytical correction in phonon and heat transport calculations

Motion capture for snake motion analysis and snake robot development

案例推荐丨安擎携手伙伴,保障“智慧法院”更加高效

Hard core observation 545 50 years ago, Apollo 15 made a feather landing experiment on the moon

Cocoscreator+typescripts write an object pool by themselves

Method of canceling automatic watermarking of uploaded pictures by CSDN

#DAYU200体验官# 首页aito视频&Canvas绘制仪表盘(ets)
随机推荐
dockermysql修改root账号密码并赋予权限
Windows Auzre 微软的云计算产品的后台操作界面
Puppeteer连接已有Chrome浏览器
Some suggestions for foreign lead2022 in the second half of the year
What are the specific steps and schedule of IELTS speaking?
Plafond du tutoriel MySQL, bien collecté, regardez lentement
Dayu200 experience officer homepage AITO video & Canvas drawing dashboard (ETS)
OpenNMS separation database
Introduction to network basics
Puppeter connects to the existing Chrome browser
(DART) usage supplement
Uniapp setting background image effect demo (sorting)
Let's see through the network i/o model from beginning to end
监控界的最强王者,没有之一!
CRMEB商城系统如何助力营销?
asp读取oracle数据库问题
存币生息理财dapp系统开发案例演示
Volatile keyword
uniapp设置背景图效果demo(整理)
TypeScript获取函数参数类型