#C10958. Longest Substring Without Repeating Characters

    ID: 40220 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string, determine the length of the longest substring that does not contain any repeating characters. The solution should use an efficient sliding window technique to achieve optimal performance.

Input is provided via standard input (stdin) as a single line, and the result should be printed to standard output (stdout).

inputFormat

A single line string is provided as input via stdin. The string may contain any characters and can be empty.

outputFormat

Print an integer to stdout, representing the length of the longest substring without repeating characters.## sample

a
1