#C12741. Longest Substring Without Repeating Characters

    ID: 42202 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string \(s\), find the length of the longest substring without repeating characters.

A substring is a contiguous sequence of characters within the string. For example, in the string "abrkaabcdefghijjxxx", the longest substring without repeating characters is "abcdefghij", which has a length of \(10\).

You are required to read the input from stdin and output the result to stdout.

inputFormat

The input consists of a single line containing the string (s). The string may be empty and may contain any printable characters.

outputFormat

Output a single integer representing the length of the longest substring of (s) that does not contain any repeating characters.## sample

abrkaabcdefghijjxxx
10