编程介的小学生 2017-04-05 08:28 采纳率: 20.5%
浏览 889
已采纳

Google Map

GoogleMap is a useful tool and most of you should be familiar with it. As the best hacker in the world, Jack is planning to retrieve all the data on the GoogleMap server. But he soon gives up because the total amount of data exceeds 1000T bytes! But he has learnt the way in which Google stores their data on the server, and he turns to download only the parts that he's interested in. Here is the representation of the data that Jack has found:

First of all, you should know the basic background knowledge of GIS (Geography Information System). In GoogleMap, the whole world is represented in a whole flat image transformed from the surface of the earth by Mercator projection. The Mercator projection is a map projection which is widely used for navigation. The following equations place the x-axis of the projection on the equator (from West to East) and the y-axis at longitude 0 (from South to North)

x = longitude * pi / 180;
y = ln(tan(pi / 4 + (latitude * pi / 180) / 2))
Here, the latitude is between -85, 85 and the longitude is between -180, 180 The left of the map image is W180 and the right is E180. The top of the map image is N85 and the bottom is S85. The maps have different levels. In the first level, the whole image consists of only one tile with tag name "t". For each tile in one level, it will be clipped into 4 equally sized parts and magnified by 2 in the next level.

And the new tag name for the tiles in the next level will be the tag of their parent tile followed by the identifier of the clip area in the parent tile. (that is, q for left-top, r for right-top, t for left-bottom, s for right-bottom) For example:

So there will be 4L tiles in level L (Assume the first level is labeled as level 0). More interestingly, the filename of the tile on the server is just the tag name. Although Jack is very genius, he doesn't know any programming language, so he turns to you for writing a tool to generate the tags for him.

Input

The input contains multiple test cases!

In each case, there will be three numbers. The first two are the coordinates that indicate the longitude and latitude of the interested location, and the third is the level number required by Jack.

The longitude is between -180, 180 and the latitude is between -85, 85

Output

Output the tag for the tile in the specified level that contains the location in a single line.

You can assume that the location will not be at the boundary of any tiles.

Sample Input

80 33 2
-80 -33 4
72.12 46.68 10
Sample Output

trt
ttrqt
trtrstqsrqs

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-04-05 15:39
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分