Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#2 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#3 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#4 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#5 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#6 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#7 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#8 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#9 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#10 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#11 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#12 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#13 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#14 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#15 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#16 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#17 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#18 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#19 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#20 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#21 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#22 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#23 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#24 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#25 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#26 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#27 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#28 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#29 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#30 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#31 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
||
#32 |
Error de compilación
main.c:1:1: error: unknown type name 'import' import math ^ main.c:1:12: error: expected ';' after top level declarator import math ^ ; 2 errors generated. |
import math def find_min_substring(arr, k): if k == 1: return 1 i, j = 0, 0 chars = {} answer = math.inf length = len(arr) while i < length: while len(chars) < k and j < length: chars[arr[j]] = chars.get(arr[j], 0) + 1 j += 1 if len(chars) >= k: answer = min(answer, j - i) chars[arr[i]] -= 1 if chars[arr[i]] == 0: del chars[arr[i]] i += 1 return answer s = input() k = int(input()) min_substring = find_min_substring(s, k) print(-1 if min_substring == math.inf else min_substring)