请求加强数据
像我这个错误代码,样例都过不去,但骗了50分。\
#include<bits/stdc++.h>
using namespace std;
int n;
string dict="01";
string to(int n){
string ans="";
while(n) {
ans+=dict[n%2];
n/=2;
}
string t="";
for(int i=ans.length()-1;i>=0;i--)t+=ans[i];
return t;
}
int main(){
cin>>n;
for(int i=0;i<pow(2,n);i++){
string x=to(i);
for(int j=0;j<n;j++){
if(x[j]=='1')cout<<"Y";
else cout<<"N";
}
cout<<endl;
}
return 0;
}