#C2273. Longest Substring Without Repeating Characters

    ID: 45571 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given an input string, your task is to find the length of the longest substring that contains no repeated characters. For instance, if the input string is abcabcbb, the longest substring without repeating characters is abc with a length of 3.

You are required to implement an efficient solution with a target time complexity of O(n), where n is the length of the input string. If the string is empty, the answer is 0.

inputFormat

The input consists of a single line containing a string. Read the input from standard input (stdin).

outputFormat

Output the integer representing the length of the longest substring without repeating characters to standard output (stdout).

## sample
abcabcbb
3