MLE,疑似爆栈
查看原帖
MLE,疑似爆栈
1081418
Echoyang楼主2025/1/4 22:31

RT,救救我QAQ\Huge RT,救救我QAQ

#include<bits/stdc++.h>
using namespace std;
int n;
bool a[10];
void dfs(int now,bool x){
    if(now==n){
        for(int i;i<n;i++){
            if(a[i]==1){
                cout<<"Y";
            }else cout<<"N";
        }
        cout<<'\n';
    }
    dfs(now+1,0);
    dfs(now+1,1);
    return;
}
void start_dfs(){
    dfs(0,0);
    dfs(0,1);
}
int main(){
    cin>>n;
    start_dfs();
}
2025/1/4 22:31
加载中...