cswork / OA打开练习工作台

UberOA #40

First Unique Log Entry

估计简单可在线判题

考点(AI 标注)哈希计数

Return the first full log line, in input order, that appears exactly once. Spaces are part of the log content; do not split into words or trim leading or trailing spaces. If there is no such line, output an empty line.

This site has made the standard input and output explicit.

输入格式

The first line contains n, followed by exactly n log lines, which may be empty. 1≤n≤1000000. This site's input protocol is at most 1MiB per line, only printable ASCII characters and spaces, and at most 32MiB for the whole standard input; logs contain no newlines.

输出格式

Output the full answer log followed by a newline; if there is no answer, output an empty line.

样例 1

输入:

5
A
B
A
C
B

输出:

C

样例 2

输入:

4
x
y
x
y

输出:

样例 3

输入:

3
a b
a
a b

输出:

a

样例说明

Example 1: A and B appear twice each and C once, so output C. Example 2: every log is repeated, so there is no result; output an empty line. Example 3: the full log a b is repeated, while a alone appears only once, so output a.