1. 时间日期(光阴似箭 Time flies!)

原文链接:http://talk.oralpractice.com/article_13695.html

-Time flies!

- You're telling me.

光阴似箭!

那还用你说。

 

- When's your birthday?

- It's just around the corner.

你的生日是什么时候?

就快到了。

 

-What's today's date?

- It's March first today.(It's the first of March today.)

今天几号?

今天是3月1日。

 

 

展开阅读全文

As the Crow Flies

09-23

Descriptionnn![](http://poj.org/images/2026_1.jpg)nnAs president of a startup airline company, you have started a frequent flier program that rewards customers for every mile they travel. As a for-profit company, you have a vested interest in minimizing the number of frequent flier miles that a person can earn on any one trip. To get an idea of how many miles a customer could earn flying the existing network, you've decided to write a program. nnAssumptions: nA passenger's itinerary is one-way (no return flight). nEvery itinerary takes the shortest route from the departing city to the destination city. nFrequent flier miles are counted "as the crow flies" (i.e., the shortest route across the earth's surface that connects the cities along the route). nThe earth's surface is a perfect sphere with radius 4000 miles.nInputnnThe first line contains a single integer n indicating the number of data sets. Each data set will be formatted according to the following description: nnA single data set has 3 components: nHeader Line - A single line, "X Y", where X is the number of cities and Y is the number of flight legs in the airline's network. Both will be positive integers less than 100. nCity List - A list of cities and their locations, one city per line. The line will be of the format n"C LA NS LO EW" where: nC is the name of the city (no spaces, alphabetical, first letter only upper case) nLA is the degrees of latitude where the city is located (from 0 to 90) nNS is the direction of latitude ('N'orth or 'S'outh of the equator) nLO is the degrees of longitude where the city is located (from 0 to 180) nEW is the direction of longitude ('E'ast or 'W'est of the prime meridian)nnFlight List - A list of city pairs of the format "B C" representing different cities that are directly connected by flight legs, one pair per line. Note that "B C" is equivalent to "C B".nnNote: nSome longitude measurements can be represented in multiple ways (i.e., 180E = 180W) nAll degrees of latitude and longitude given in the input will be integers. nThe airline's network is connected (i.e., there is at least one route between any two cities).nnOutputnnFor each data set, output the two cities that are farthest from each other (farthest in the sense that the shortest route between them is the longest of any city pair). You are guaranteed that there will be no ties. Display the city names on the same line, separated by a single space, sorted in dictionary order.nSample Inputnn2n6 5nNorthpole 90 N 87 EnSouthpole 90 S 180 WnEquatorone 0 N 45 WnEquatortwo 0 S 90 EnEquatorthree 0 S 180 EnEquatorfour 0 N 46 WnEquatorone EquatortwonEquatortwo EquatorthreenEquatorthree EquatorfournNorthpole EquatortwonSouthpole Equatorthreen2 1nNorthpole 90 N 0 EnSouthpole 90 S 0 WnSouthpole NorthpolenSample OutputnnEquatorfour EquatoronenNorthpole Southpole 问答

没有更多推荐了,返回首页