编程介的小学生 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
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探