#K10681. Unique Characters Checker

    ID: 23301 Type: Default 1000ms 256MiB

Unique Characters Checker

Unique Characters Checker

Given a string s, determine if all characters in the string are unique. In other words, check whether for all indices \(i \neq j\), the condition \(s_i \neq s_j\) holds. The check is case-sensitive, meaning that characters with different cases (e.g., 'a' and 'A') are considered distinct. An empty string is considered to have all unique characters.

Example:

  • If s = "abc", then the output is True because all characters are unique.
  • If s = "leetcode", then the output is False since the letter 'e' repeats.

The problem can be formalized as: Given a string \(s\) of length \(n\), check whether \(\forall i, j \in \{0,1,\ldots,n-1\}\) with \(i \neq j\), it holds that \(s_i \neq s_j\).

inputFormat

The input consists of a single line containing the string s. The string may be empty.

outputFormat

Output True if all characters in the given string are unique; otherwise, output False. The output should be printed on a single line.

## sample
abc
True