Runtime Error.
Received signal 6: Aborted / IOT trap.
代码:
#include <bits/stdc++.h>
using namespace std;
string mod;
int n;
int main(){
cin>>n>>mod;
int star=mod.find("*");
string front=mod.substr(0, star);
string back=mod.substr(star+1);
for (string s; n; n--){
cin>>s;
string f1=s.substr(0, star);
string b1=s.substr(s.size()-back.size());
if (front==f1 && back==b1 && f1.size()+b1.size()<=s.size()) cout<<"DA"<<endl;
else cout<<"NE"<<endl;
}
return 0;
}
我做属于我的题目都做不对,我太蔡了