#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x)+modulo)%modulo) #define Inf 100000000 int main() { int N,M; cin>>N>>M; deque a(N); for(int i=0;i>a[i]; string S; cin>>S; int L = 1,R = N; for(int i=0;i ans(N,0); for(int i=0;i