#include<bits/stdc++.h>
using namespace std;
const int N=100;
long long n,x,y,dp[N][N];
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
freopen(“D.in”,“r”,stdin);
freopen(“D.out”,“w”,stdout);
cin>>n;
memset(dp,0x3f,sizeof(dp));
dp[0][0]=0;
初始化
while(n–){
cin>>x>>y;
int len=0;
string xx,yy;
特判相等情况
转2进制
找最长子串
cout<<dp<<‘\n’;
}
return 0;
}
格式化,还有,如果是发题解,请完善具体信息
格式化点这里