点和正方形的关系
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
【题目描述】
有一个正方形,四个角的坐标(x,y)分别是(1,-1),(1,1),(-1,-1),(-1,1),x是横轴,y是纵轴。写一个程序,判断一个给定的点是否在这个正方形内(包括正方形边界)。如果点在正方形内,则输出yes,否则输出no。
【输入】
输入一行,包括两个整数x、y,以一个空格分开,表示坐标(x,y)。
【输出】
输出一行,如果点在正方形内,则输出yes,否则输出no。
【输入样例】
1 1
【输出样例】
yes
【来源】
一本通在线评测
ZBC002(Zjc Beginner Contest002)(张锦程初学者竞赛002)
- Status
- Done
- Rule
- Ledo
- Problem
- 10
- Start at
- 2024-12-14 0:00
- End at
- 2024-12-21 0:00
- Duration
- 168 hour(s)
- Host
- Partic.
- 5