为何提交全WA
查看原帖
为何提交全WA
1091848
封禁用户楼主2024/7/10 18:10

大佬救救劳资

#include<bits/stdc++.h>
using namespace std;
int r,a[100],n,i;
void work(int k){
    if(k>r){
        for(i=1;i<=r;i++)
            cout<<setw(3)<<a[i];
        cout<<endl;
        return ;
    }
    for(i=a[k-1]+1;i<=n;i++){
        a[k]=i;
        work(k+1);
    }
}
int main()
{
    cin>>n>>r;
    return 0;
}

壶关吗

2024/7/10 18:10
加载中...