编程介的小学生 2017-02-05 06:26 采纳率: 20.5%
浏览 866
已采纳

Offside

Offside is a very important law in a soccer game. We can find the details of the law from the official web-site of FIFA (Federation Internationale de Football Association), shown as below.

http://www.fifa.com/en/laws/Laws11_01.htm

Your task is to determine whether a player is in an offside position, given all the positions of players and the ball. To make the problem easier, we assume the game field is always in the size of 100*70 and the coordinate of the field center is (0, 0), as shown in the following picture. Furthermore, we assume the goal on the line from (-50,-35) to (-50,35) is ours and the opponent's goal line is between (50,-35) and (50,35). Note that the central line belongs to both halves.

Input

The input consists of several test cases, with each case standing in a single line. In each case, there are several coordinates in the format (x,y) where -50 <= x <= 50 and -35 <= y <= 35, seperated by a single space. The first coordinate represents the player's position and the second one indicates the ball. The following coordinates are the opponents' locations. The number of opponents in field is 2 at the least and 11 at the most.

Proceed until the end of file.

Output

Print "Offside" on a single line if the player is in the offside position or "PlayOn" if not.

Sample Input

(30,10) (20,-5) (45,0) (25,12) (-20,30)
(30,10) (20,-5) (45,0) (25,12) (30,12) (-20,30)

Sample Output

Offside
PlayOn

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-02-11 15:25
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效