Arif is analyzing performance logs at a bank branch and wants the longest streak of days meeting a quality threshold.
What your program reads
Line1: N K. Line2: N binary flags.
What your program prints
Length of the best streak achievable after at most K fixes.
Limits
1 ≤ N ≤ 10^5
Example input
8 2 1 0 1 1 0 0 1 1
Expected output
6
main.c
Your work is saved in this browser as you type.
Loading editor…
Input for Run
Run tries your code on the input above and shows what it prints. Submit checks your output against every test, including hidden ones.
Shortcut: Ctrl + Enter sends it to the judge.