#K47237. Longest Substring Without Repeating Characters

    ID: 28154 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string s, your task is to find the length of the longest substring of s that contains no repeating characters.

For example, when s = "abcabcbb", the answer is 3 because the longest substring with all distinct characters is "abc".

If the input string is empty, the output should be 0. The string may contain only letters or other characters as well.

The solution must read from standard input (stdin) and output the result to standard output (stdout).

inputFormat

The input is a single line containing the string s. The string may include alphanumeric characters and symbols.

outputFormat

Output a single integer which is the length of the longest substring without any repeating characters.

## sample
abcabcbb
3

</p>