社区讨论

一个以前没见过的CE

P5461赦免战俘参与者 3已保存回复 3

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
3 条
当前快照
1 份
快照标识符
@lo9n5g48
此快照首次捕获于
2023/10/28 14:08
2 年前
此快照最后确认于
2023/10/28 14:08
2 年前
查看原帖
CPP
#include<bits/stdc++.h>
using namespace std;
const int mn = 10;
int a[1<<mn+10][1<<mn+10];
int n,j,i,p,q;
void sm(int x,int y,int m){
    if(m>=1){
    for(p = x;p<=x+1<<(m-1)-1;p++)
        for(q = y;q<=x+1<<(m-1)-1;q++)
            a[p][q] = 0;
    sm(x+1<<(m-1),y,m-1);
    sm(x,y+1<<(m-1),m-1);
    sm(x+1<<(m-1),y+1<<(m-1),m-1);
    }
    return;
}
int main(){
    cin>>n;
    for(i  = 1;i<=1<<n;i++)
        for(j = 1;j<=1<<n;j++)
            a[i][j] = 1;
    sm(1,1,n);
    for(i  = 1;i<=1<<n;i++){
        for(j = 1;j<=1<<n;j++)
            cout<<a[i][j]<<' ';
        cout<<endl;
    }
    return 0;
}
错误提示是这样的 ./ccWuUK6e.o: in function __static_initialization_and_destruction_0(int, int)': src:(.text+0x351): relocation truncated to fit: R_X86_64_PC32 against .bss' src:(.text+0x36a): relocation truncated to fit: R_X86_64_PC32 against `.bss' collect2: 错误:ld 返回 1
本人小蒟蒻 求助各位大佬

回复

3 条回复,欢迎继续交流。

正在加载回复...