5 条题解

  • 1
    @ 2024-2-18 21:04:35
    #include <queue>
    #include <math.h>
    #include <stack>
    #include <vector>
    #include <stdio.h>
    #include <iostream>
    #include <vector>
    #include <iomanip>
    #include <string.h>
    #include<cstring>
    #include <algorithm>
    #define LL long long
    const int N=1e2+10;
    const int INF = 0x3f3f3f3f;
    using namespace std;
    int n,i,j,a[N][N];
    int main(int argc,char const*argv[]) {
    	cin>>n;
    	int s=1;
    	int k=n;
    	i=n-1;
    	j=0;
    	int s1=0,s2;
    	while(k){ 
    		k--; 
    		while(i<=n-1){
    			a[i][j]=s;
    			s1=i;
    			i++,j++;
    			s++; 
    		}	
    		i=k; 
    		i--;
    		j=0;
    	} 
    	for(i=0;i<n;i++){ 
    		for(j=0;j<n;j++){
    			if(a[i][j]!=0){
    				printf("%4d",a[i][j]); 
    			}
    		} 
    		printf("\n"); 
    	}
    	return 0;
    }
    

    其他题解好像都在Ctrl大佬的呀(除某V10dalao)bushi我

    信息

    ID
    1075
    时间
    1000ms
    内存
    128MiB
    难度
    6
    标签
    递交数
    317
    已通过
    96
    上传者