1 条题解

  • 0
    @ 2025-12-27 21:38:54
    #include<bits/stdc++.h>
    using namespace std;
    int a,t=1; 
    int main(){
        cin>>a;
        for(int i=1;i<=a;i++){
        	for(int j=1;j<=a;j++){
        		cout<<(i%2==1?t:t-(j-1)+(a-j))<<" ";
        		t++;
        	}
        	cout<<"\n";
        }
        return 0;
    }
    
    • 1

    信息

    ID
    2412
    时间
    1000ms
    内存
    128MiB
    难度
    4
    标签
    (无)
    递交数
    384
    已通过
    164
    上传者