#K63497. Longest Substring Without Repeating Characters

    ID: 31766 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string s consisting of lowercase English letters, your task is to determine the length of the longest substring in which all characters are distinct.

For example, in the string abcabcbb, the longest substring without repeating characters is abc with a length of 3.

If the input string is empty, output should be 0. Note that a substring is a contiguous sequence of characters within the string.

inputFormat

The input consists of a single line containing a string s made up of lowercase English letters. The string may be empty.

outputFormat

Output a single integer which is the length of the longest substring of s that contains no repeated characters.

## sample
abcabcbb
3