#include using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; #define rep(i,n) for(ll i=0;i T div_floor(T a, T b) { return a / b - ((a ^ b) < 0 && a % b); } template T div_ceil(T a, T b) { return a / b + ((a ^ b) > 0 && a % b); } template inline bool chmin(T &x, U y) { return (y < x) ? (x = y, true) : false; } template inline bool chmax(T &x, U y) { return (x < y) ? (x = y, true) : false; } void solve() { ll N,A; cin>>N>>A; string S; cin>>S; ll rank=0; ll event=0; ll ac=0; rep(_,N){ if (S[event%N]=='0'){ rank++; } else{ if (rank!=0){ rank--; ac++; if (ac==A){ cout<cnt1){ rank=1e9; } rep(_,N){ if (S[event%N]=='0'){ rank++; } else{ if (rank!=0){ rank--; ac++; if (ac==A){ cout<