# Humanity's Last Code Exam / 2016_D

task_id: b3d04442-cb2e-5ea0-89ed-0baaaaa3bddb
task_key: ICPC~2dWorld~2dFinals--examples--2016~5fD
task_revision_id: 3

{"platform":"atcoder","question_content":"# Problem Statement\n\nAfter numerous unfortunate freak fatalities and the lawsuits, settlements, protests, and boycotts that naturally followed, the beleaguered executives at ACME Clock Manufacturers have decided they need to finally fix their disastrous quality control issues. It has been known for years that the digital clocks they manufacture have an unacceptably high ratio of faulty liquid-crystal display (LCD) screens, and yet these heartless souls have repeatedly failed to address the issue, or even warn their hapless consumers!\n\nYou have been called in as a quality consultant to finally put a stop to the madness. Your job is to write an automated program that can test a clock and find faults in its display.\n\nThese clocks use a standard 7-segment LCD display for all digits (shown on the left in Figure D.1), plus two small segments for the ‘:’, and show all times in a 24-hour format. The minute before midnight is 23:59, and midnight is 0:00. The ‘:’ segments of a working clock are on at all times. The representation of each digit using the seven segments is shown on the right in Figure D.1.\n\nYour program will be given the display of a clock at several consecutive minutes, although you do not know exactly what time these displays start. Some of the LCD segments are burnt out (permanently off) and some are burnt in (permanently on). Your program must determine, where possible, which segments are definitely malfunctioning and which are definitely in working order.\n\n## Input\n\nThe first input line contains a single integer \\( n \\) (\\(1 \\leq n \\leq 100\\)), which is the number of consecutive minutes of a clock’s display. The next \\(8n - 1\\) lines contain \\( n \\) ASCII images of these clock displays of size 7 × 21, with a single blank line separating the representations.\n\nAll digit segments are represented by two characters, and each colon segment is represented by one character. The character ‘X’ indicates a segment that is on. The character ‘.’ indicates anything else (segments that are off or non-segment portions of the display). See the sample input/output for details; the first output shows every possible LCD segment along with the smaller segments used to represent the ‘:’. No clock representation has an ‘X’ in a non-segment position or only half of a segment showing.\n\n## Output\n\nDisplay a 7 × 21 ASCII image with a ‘0’ for every segment that is burnt out, a ‘1’ for every segment that is burnt in, a ‘W’ for every segment that is definitely working, and a ‘?’ for every segment for which the status cannot be determined. Use ‘.’ for non-segments. If the given displays cannot come from consecutive minutes, display `impossible`.\n\n## Sample Input 1\n\n```\n3\n......XX.....XX...XX.\n.....X..X...X..X....X\n.....X..X.X.X..X....X\n.............XX...XX.\n.....X..X......X.X..X\n.....X..X......X.X..X\n......XX.....XX...XX.\n\n......XX.....XX...XX.\n.....X..X...X..X....X\n.....X..X.X.X..X....X\n.............XX...XX.\n.....X..X......X.X..X\n.....X..X......X.X..X\n......XX.....XX...XX.\n\n.............XX...XX.\n........X...X..X....X\n........X.X.X..X....X\n.............XX......\n........X...X..X.X..X\n........X...X..X.X..X\n......XX.....XX...XX.\n```\n\n## Sample Output 1\n\n```\n.??...WW.....??...??.\n?..?.W..?...?..1.0..?\n?..?.W..?.?.?..1.0..?\n.??...??.....11...WW.\n?..?.W..?.0.W..?.1..?\n?..?.W..?...W..?.1..?\n.??...11.....??...??.\n```\n\n## Sample Input 2\n\n```\n2\n......XX.....XX...XX.\n...X....X...X..X.X..X\n...X....X.X.X..X.X..X\n......XX..........XX.\n...X.X....X.X..X.X..X\n...X.X......X..X.X..X\n......XX.....XX...XX.\n\n......XX.....XX......\n...X....X...X..X.....\n...X....X.X.X..X.....\n......XX.............\n...X.X....X.X..X.....\n...X.X......X..X.....\n......XX.....XX......\n```\n\n## Sample Output 2\n\n```\nimpossible\n```","question_title":"Clock Breaking"}

Source: https://humanity-s-last-code-exam.github.io/website/

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=b3d04442-cb2e-5ea0-89ed-0baaaaa3bddb&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
