字典序最小的模板比较
代码
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/9f58c7ee2588edf38e5ebc0460f0afb8.png)
#include <iostream>
#include <bits/stdc++.h>
#define For(i,x,y) for(int i=(x); i<=(y); i++)
#define fori(i,x,y) for(int i=(x); i<(y); i++)
#define rep(i,y,x) for(int i=(y); i>=(x); i--)
#define mst(x,a) memset(x,a,sizeof(x))
#define pb push_back
#define sz(a) (int)a.size()
#define mp make_pair
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef pair<int,int>pa;
typedef pair<ll,ll>pai;
template<class T>
bool lexicographicallySmaller(vector<T> a, vector<T> b){
int n = sz(a);
int m = sz(b);
int i;
for(int i=0; i<n && i<m; i++){
if(a[i]<b[i])return true;
else if(a[i]>b[i])return false;
}
return (i==n && i<m);
}
int main()
{
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
vector<int>a, b;
fori(i,0,10)a.pb(i);
fori(i,0,9)b.pb(i);
if(lexicographicallySmaller(a,b))cout<<"a<b"<<'\n';
else cout<<"a>=b"<<'\n';
b.clear();
fori(i,2,9)b.pb(i);
if(lexicographicallySmaller(a,b))cout<<"a<b";
else cout<<"a>=b";
return 0;
}