substr:
a.substr(i,x);
字符串比大小:
a>b
a<b
AC代码奉上
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(NULL);
cin.tie(0);
cout.tie(0);
string s,t;
cin >> s >> t;
int n;
cin >> n;
while(n--){
int l1,r1,l2,r2;
cin >> l1 >> r1 >> l2 >> r2;
string st=s.substr(l1-1,r1-l1+1),tt=t.substr(l2-1,r2-l2+1);
if(st<tt) cout << "yifusuyi\n";
else if(st>tt) cout << "erfusuer\n";
else cout << "ovo\n";
}
return 0;
}