Compile Error
foo.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
Code
#include<bits/stdc++.h>
#define nl '\n'
using namespace std;
void solve(){
int n;cin>>n;
string a,b,s;cin>>a>>b;
char c='a';
for(int i=0;i<a.size();i++){
if(c<=min(a[i],b[i])){
c=min(a[i],b[i]);
}
else if(c<=max(a[i],b[i])){
c=max(a[i],b[i]);
}
else {
cout<<"No\n";
return;
}
// cout<<c<<nl;
}
cout<<"Yes\n";
}
int main(){
int T;cin>>T;
for(int tc = 1; tc <= T; tc++){
solve();
}
}
Information
- Submit By
- Type
- Pretest
- Problem
- P1117 String Sorted
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-12-07 10:34:43
- Judged At
- 2024-12-07 10:34:43
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes