{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"hlce","formal_name":"Humanity's Last Code Exam","introduction":"Humanity's Last Code Exam evaluates problem solving and code generation using ICPC World Finals and IOI problems. The project describes 235 problems; this import selects its public ICPC dataset of 146 problems.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://humanity-s-last-code-exam.github.io/website/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"831f4cf9-9959-59ab-a175-12b925cb8947","task_key":"ICPC~2dWorld~2dFinals--examples--2011~5fC","task_revision_id":"2","upstream_id":"2011_C","short_description":"Ancient Messages","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Statement\\n\\nIn order to understand early civilizations, archaeologists often study texts written in ancient languages. One such language, used in Egypt more than 3000 years ago, is based on characters called hieroglyphs. You will write a program to recognize these six characters.\\n\\n### Input\\n\\nThe input consists of several test cases, each of which describes an image containing one or more hieroglyphs chosen from among those shown in Figure C.1. The image is given in the form of a series of horizontal scan lines consisting of black pixels (represented by 1) and white pixels (represented by 0). In the input data, each scan line is encoded in hexadecimal notation. For example, the sequence of eight pixels `10011100` (one black pixel, followed by two white pixels, and so on) would be represented in hexadecimal notation as `9c`. Only digits and lowercase letters `a` through `f` are used in the hexadecimal encoding. \\n\\nThe first line of each test case contains two integers, \\\\( H \\\\) and \\\\( W \\\\). \\\\( H \\\\) (\\\\( 0 < H \\\\leq 200 \\\\)) is the number of scan lines in the image. \\\\( W \\\\) (\\\\( 0 < W \\\\leq 50 \\\\)) is the number of hexadecimal characters in each line. The next \\\\( H \\\\) lines contain the hexadecimal characters of the image, working from top to bottom. Input images conform to the following rules:\\n\\n- The image contains only hieroglyphs shown in Figure C.1.\\n- Each image contains at least one valid hieroglyph.\\n- Each black pixel in the image is part of a valid hieroglyph.\\n- Each hieroglyph consists of a connected set of black pixels and each black pixel has at least one other black pixel on its top, bottom, left, or right side.\\n- The hieroglyphs do not touch and no hieroglyph is inside another hieroglyph.\\n- Two black pixels that touch diagonally will always have a common touching black pixel.\\n- The hieroglyphs may be distorted but each has a shape that is topologically equivalent to one of the symbols in Figure C.1.\\n\\nThe last test case is followed by a line containing two zeros.\\n\\n### Output\\n\\nFor each test case, display its case number followed by a string containing one character for each hieroglyph recognized in the image, using the following code:\\n\\n- **Ankh**: A\\n- **Wedjat**: J\\n- **Djed**: D\\n- **Scarab**: S\\n- **Was**: W\\n- **Akhet**: K\\n\\nIn each output string, print the codes in alphabetic order. Follow the format of the sample output.\\n\\n### Sample Input\\n\\n```\\n100 25\\n0000000000000000000000000\\n0000000000000000000000000\\n...(50 lines omitted)...\\n00001fe0000000000007c0000\\n00003fe0000000000007c0000\\n...(44 lines omitted)...\\n0000000000000000000000000\\n0000000000000000000000000\\n150 38\\n00000000000000000000000000000000000000\\n00000000000000000000000000000000000000\\n...(75 lines omitted)...\\n0000000003fffffffffffffffff00000000000\\n0000000003fffffffffffffffff00000000000\\n...(69 lines omitted)...\\n00000000000000000000000000000000000000\\n00000000000000000000000000000000000000\\n0 0\\n```\\n\\n### Sample Output\\n\\n```\\nCase 1: AKW\\nCase 2: AAAAA\\n```\\n\",\"question_title\":\"Ancient Messages\"}","display_format":"text","language":"","answer_status":"published","assets":[],"source_url":"https://humanity-s-last-code-exam.github.io/website/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}