#C13290. Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
Given a string s, determine the length of the longest substring that contains no repeated characters. In other words, find the maximum value of L such that there exists a substring of s with L characters, all of which are unique. Formally, if we denote the length of a substring from index i to j (inclusive) as j - i + 1, then we seek
[ \max_{0 \leq i \leq j < n} { j - i + 1 \mid \text{substring } s[i\ldots j] \text{ has all unique characters} } ]
The input is a single line string, and the output is an integer representing the maximum length of such a substring.
inputFormat
The input consists of a single line that contains the string s. The string may include letters (both uppercase and lowercase), digits, spaces, and special characters. The input is provided via standard input (stdin).
outputFormat
Output a single integer: the length of the longest substring of s that does not contain any duplicate characters. The output should be written to standard output (stdout).
## sampleabcabcbb
3