www.acwing.com mr.leeleo.top poki https://goldwerewolf.com/
using namespace std;
int main()
{
return 0;
}
cout<<setiosflags(ios::fixed)<<setprecision(5);
freopen("loop.in","r",stdin);
freopen("loop.out","w",stdout);I am a joker!!!
string t_b(int t,int b)
{
string x;
if(t==0)
{
return "0";
}
if(b<=10)
{
while(t>0)
{
x+=t%b+'0';
t/=b;
}
reverse(x.begin(),x.end());
}
else if(b>10)
{
while(t>0)
{
if(t%b<10)
{
x+=t%b+'0';
t/=b;
}
else
{
x+=t%b-10+'A';
t/=b;
}
}
reverse(x.begin(),x.end());
}
return x;
}
int b_t(string x,int b)
{
int t=0;
if(x=="0")
{
return 0;
}
if(b<=10)
{
for(int i=0;i<x.size();i++)
{
t=t*b+(x[i]-'0');
}
}
else if(b>10)
{
for(int i=0;i<x.size();i++)
{
if(x[i]<'10')
{
t = t*b+(x[i]-'0');
}
else
{
t = t*b+(x[i] -'A'+10);
}
}
}
return t;
}基础枚举框架
void dfs(int r,int Now)
{
if(r>m)
{
for(int i=1;i<m;i++) cout<<a[i]<<' ';
cout<<a[m]<<endl;
return;
}
for(int i=Now+1;i<=n-(m-r+1)+1;i++)
{
a[r]=i;
dfs(r+1,i);
}
}