???GSM Base Station Identification
来源:互联网 发布:日本动漫知子 编辑:程序博客网 时间:2024/06/02 00:15
In the Personal Communication Service systems such as GSM (Global System for Mobile Communications), there are typically a number of base stations spreading around the service area. The base stations are arranged in a cellular structure, as shown in the following figure. In each cell, the base station is located at the center of the cell.
For convenience, each cell is denoted by [i, j]. The cell covers the origin is denoted by [0, 0]. The cell in the east of [0, 0] is denoted by [1, 0]. The cell in the west of [0, 0] is denoted by [−1, 0]. The cell in the northeast of [0, 0] is denoted by [0, 1]. The cell in the southwest of [0, 0] is denoted by [0, −1]. This notation can be easily generalized, as shown in the above figure.
Now the question is as follows. We have a service area represented by a Euclidean plane (i.e., x−y plane). Each unit is 1 Km. For example, point (5, 0) in the plane means the location at a distance of 5 Km to the east of the origin. We assume that there are totally 400 cells, denoted by [i, j], i = −9 ... 10, j = −9 ... 10. The base station of cell [0, 0] is located at the origin of the Euclidean plane. Each cell has a radius of R = 5 Km, as shown in the following figure.
You are given an input (x, y), which indicates a mobile phone’s location. And you need to determine the cell [i, j] that covers this mobile phone and can serve this phone call.
For example, given a location (10, 0), your program needs to output the cell [1, 0], which can cover this location. Specifically, the input and output are:
- input = (x, y). hhis is a location on the Euclidean plane. This value will not exceed the service area covered by the 400 cells. That is, you do not need to handle the exceptional case that the input is out of the boundary of the service area.
- output = [i, j]. One of the 400 cells that covers location [i, j]
Input Format
A list of 10 locations.
Output Format
A list of 10 cells covering the above 10 locations in the correct order.
Please be reminded that there exist a space between coordinates.
样例输入
1 00 152 013 75 510 1525 15-13 -812 -7-10 0
样例输出
[0,0], [-1,2], [0,0], [1,1], [0,1], [0,2], [2,2], [-1,-1], [2,-1], [-1,0]
题目来源
2017 ACM-ICPC 亚洲区(南宁赛区)网络赛
- ???GSM Base Station Identification
- 2017 ACM-ICPC GSM Base Station Identification
- 2017南宁网络赛 I. GSM Base Station Identification 暴力
- 2017 ACM-ICPC南宁网络赛: I. GSM Base Station Identification(线性变换)
- 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛-I-GSM Base Station Identification(线性变换)
- 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 I.GSM Base Station Identification
- 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 I GSM Base Station Identification(暴力,计算几何)
- 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 GSM Base Station Identification 线性变换||计算几何
- HDU3879:Base Station
- HDU Base Station
- HDU 3879 Base Station
- ACdream 1127 Base Station
- HDU-3879-Base Station
- Base Station HDU
- AcDream OJ 1127 Base Station
- ACdream 1127 Base Station 数据结构
- 【网络流】hdu3879 Base Station
- 【树状数组】 ACdream 1127 Base Station
- leetcode#6-ZigZag Conversion-java
- 常见的VUE的UI库
- linux/unix下查看oracle字符集
- java-深入构造方法
- Python中numpy数组的合并
- ???GSM Base Station Identification
- HDOJ2009
- 第十九节http和json解析
- react-native学习之路3-使用夜神模拟器调试
- Servlet的运行步骤
- FCN模型训练中遇到的困难
- CentOS6.5解决中文乱码与设置字符集
- Person of Interest 中的机器已经成为现实吗?
- HDOJ2010