#K2281. Longest Substring Without Repeating Characters

    ID: 24702 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string s consisting only of lowercase alphabets, your task is to determine the length of the longest substring that does not contain any repeating characters. In other words, you have to find the maximum length of a contiguous segment of s in which each character appears only once.

Example:
For s = "abcabcbb", the longest substring without repeating characters is "abc" which has a length of 3.

Note: The input will be read from standard input and the result must be printed to standard output.

inputFormat

The input is provided as a single line containing a string s composed of lowercase alphabetical characters. It can be an empty string as well.

outputFormat

Output a single integer representing the length of the longest substring without repeating characters.

## sample
abcabcbb
3