本题求大佬帮我看看,我这是哪里错了,明明样例全对,可是就是全WA,也不知道哪里错了,求求了帮我看看,下面是我的代码:
#include<bits/stdc++.h>
using namespace std;
const int N = 2e2 + 10;
const int mod = 998244353;
const int inf = 1e9 + 10;
string coutcol,coltcou;
bool ok = true;
void Convert_to_uppercase(){
string cou = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(char &coutcol : cou){
coutcol = tolower(coutcol); //转换为小写
}
cout << coutcol << endl;
}
void Convert_to_lowercase(){
string col = "abcdefghijklmnopqrstuvwxyz";
for(char &coltcou : col){
coltcou = toupper(coltcou); //转换为大写
}
cout << coltcou << endl;
}
void customize_swap(int &swap_variable1,int &swap_variable2){
int tp = swap_variable1;
swap_variable1 = swap_variable2;
swap_variable2 = tp;
}
void solve(){
string s[1000];
int n; cin >> n;
for(int i = 0;i < n;i++) cin >> s[i];
string t;
for(int i = 0;i < n;i++) t += s[i];
int cnt = t.size() - 1;
for(int i = 0;i < cnt;i++){
if(t[i] < t[i - 1]){
ok = false;
break;
}
}
if(ok) cout << "1" << endl;
else cout << "0" << endl;
ok = true;
}
signed main(){
int t = 1; cin >> t;
while(t--) solve();
return 0;
}