#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define str string
#define pb push_back
#define pf push_front
#define in insert
#define all(v) v.begin(),v.end()
#define fastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
const int sz=1000000,INF=1000000000;
using namespace std;
void solve()
{
ll n,m,ans=0;
char c;
cin>>n>>m;
for(int j=0;j<m-1;j++)
{
cin>>c;
if(c!='E')
{
ans=-1;
break;
}
}
cout<<ans;
}
int main()
{
fastIO;
ll t=1;
cin>>t;
while(t--)
{
solve();
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |