061. Half Winds

Codeforces
IDCF10269061
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
A compass has many divisions of cardinal directions, most commonly the four cardinal directions of North, East, South, and West are used, though smaller subdivisions called half winds are available. The half winds can be seen on a 16-wind compass rose, and are north-northeast(NNE), east-northeast(ENE), east-southeast(ESE), south-southeast(SSE), south-southwest(SSW), west-southwest(WSW), west-northwest(WNW) and north-northwest(NNW). For this problem, decode the acronym into the full name of the half wind direction. A single 3 character string containing the acronym to translate. A single string that represents the full direction name. All inputs will be capitalized, and all outputs should be lower case with a hyphen included. ## Input A single 3 character string containing the acronym to translate. ## Output A single string that represents the full direction name. [samples] ## Note All inputs will be capitalized, and all outputs should be lower case with a hyphen included.
**Definitions** Let $ D = \{ \text{NNE}, \text{ENE}, \text{ESE}, \text{SSE}, \text{SSW}, \text{WSW}, \text{WNW}, \text{NNW} \} $ be the set of valid 3-character acronyms. Let $ f: D \to \{\text{north-northeast}, \text{east-northeast}, \text{east-southeast}, \text{south-southeast}, \text{south-southwest}, \text{west-southwest}, \text{west-northwest}, \text{north-northwest}\} $ be the mapping from acronym to full direction name. **Given** A string $ s \in D $ of length 3, all uppercase. **Objective** Output $ f(s) $ in lowercase with hyphens.
API Response (JSON)
{
  "problem": {
    "name": "061. Half Winds",
    "description": {
      "content": "A compass has many divisions of cardinal directions, most commonly the four cardinal directions of North, East, South, and West are used, though smaller subdivisions called half winds are available. T",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269061"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "A compass has many divisions of cardinal directions, most commonly the four cardinal directions of North, East, South, and West are used, though smaller subdivisions called half winds are available. T...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ D = \\{ \\text{NNE}, \\text{ENE}, \\text{ESE}, \\text{SSE}, \\text{SSW}, \\text{WSW}, \\text{WNW}, \\text{NNW} \\} $ be the set of valid 3-character acronyms.  \nLet $ f: D \\to \\{\\text{no...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments