感觉输出明明对了啊,为啥全wa

P1498 南蛮图腾

/\ /__\ /\ /\ /__\/__\ /\ /\ /__\ /__\ /\ /\ /\ /\ /__\/__\/__\/__\ /\ /\ /__\ /__\ /\ /\ /\ /\ /__\/__\ /__\/__\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\/__\/__\/__\/__\/__\/__\ /\ /\ /__\ /__\ /\ /\ /\ /\ /__\/__\ /__\/__\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\/__\/__\ /__\/__\/__\/__\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\ /\ /\ /__\ /__\ /\ /\ /\ /\ /__\/__\ /__\/__\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\/__\/__\ /__\/__\/__\/__\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\/__\/__\/__\/__\/__\/__\ /__\/__\/__\/__\/__\/__\/__\/__\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\/__\/__\ /__\/__\/__\/__\ /__\/__\/__\/__\ /__\/__\/__\/__\ /\ /\ /\ /\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /__\/__\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /__\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\/__\
by lizhuorong @ 2023-11-04 15:36:53


@[lizhuorong](/user/719843) 666666666666666666666666666666666666666666666666666(代码我拿走看看)
by hyh6666 @ 2023-11-04 15:37:57


第十三行 for(int i=c;i>0;i--){ 改成 for(int i=c-1;i>0;i--){ 你这多打了一个空格
by Huangzy2011 @ 2023-11-04 15:55:12


@[lizhuorong](/user/719843) 把它想成杨辉三角来看看: 递推式a[i][j]=a[i-1][j]^a[i-1][j-1]; ```cpp #include <bits/stdc++.h> using namespace std; int n,a[1030]={1}; int main(){ scanf("%d",&n); for(int i=0;i<1<<n;++i){ for(int j=1;j<(1<<n)-i;++j) cout<<" "; for(int j=i;j>=0;--j) a[j]^=a[j-1]; if(!(i%2))for(int j=0;j<=i;++j) cout<<(a[j]?"/\\":" "); else for(int j=0;j<=i;j+=2) cout<<(a[j]?"/__\\":" "); cout<<endl; } return 0; } ```
by ltzx2022_kanxinyi_5 @ 2023-12-07 21:43:29


|