12 条题解

  • 3
    @ 2022-11-28 9:56:53
    #include <queue>
    #include <math.h>
    #include <stack>
    #include <stdio.h>
    #include <iostream>
    #include <vector>
    #include <iomanip>
    #include <string.h>
    #include <algorithm>
    using namespace std;
    #define LL long long
    const int N = 1e6 + 10;
    const int INF = 0x3f3f3f3f;
    int a[110][110], n, m;
    int main()
    {
        cin >> n >> m;
    	for(int i = 1; i <= n; i++)
        {
            for(int j = 1; j <= m; j++)
            {
                cin >> a[i][j];
            }
        }
        //其实不用真的转90°
        for(int i = 1; i <= m; i++)//仔细想想这三句
        {
            for(int j = n; j >= 1; j--)//为什么一个加一个减
            {
                cout << a[j][i] << " ";//为什么要反着输出
            }
            puts("");
        }
    	return 0;
    }
    
    • 1
      @ 2025-3-26 13:21:30
      #include <stdio.h>
      int n, m, a[1001][1001], i, j; 
      int main()
      {
      	scanf("%d %d\n", &n, &m);
      	for(i = 1; i <= n; i ++)
      		for(j = 1; j <= m; j ++)
      			scanf("%d", &a[i][j]);
      	for(j = 1; j <= m; j ++)
      	{
      		for(i = n; i; i --) 
      			printf("%d ", a[i][j]);
      		putchar('\n');
      	}
      	return 0;
      }
      

      请反思: 你打开题解时是真的不会做还是懒

      • 1
        @ 2025-1-24 13:08:34
        #include <bits/stdc++,h>
        using namespace std;
        const int N=1e3+10;
        const int INF=0x3f3f3f3f;
        int n,m,a[N][N];
        int main()
        {
        	cin >> n >> m;
        	for(int i=1;i<=n;i++)
        	{
        		for(int j=1;j<=m;j++)
        		{
        			cin >> a[i][j];
        		}
        	}
        	for(int j=1;j<=m;j++)
        	{
        		for(int i=n;i>=1;i--)
        	    {
        		    cout << a[i][j] << " ";
        		}
        		cout << endl;
        	}
               return 0;
        }
        //ts2024stu008~~~~~
        

        有标志认证,属三无产品,请大家放心食用

        • 0
          @ 2025-3-21 18:08:54
          #include<iomanip> 
          #include<cmath> 
          #include<cstring> 
          #include<cstdio> 
          #include<algorithm> 
          using namespace std;
          const int N=1e2+8;
          const int INF=0x3f3f3f3f;
          int a[N][N],b[N][N],m,n;
          int main()
          {
          	cin>>n>>m;
          	for(int i=1;i<=n;i++)
          		for(int j=1;j<=m;j++)
          			cin>>a[i][j];
          	for(int i=1;i<=n;i++)
          	{
          		for(int j=n;j>=1;j--)
          		{
          			b[i][n-j+1]=a[j][i];
          		}
          	}
          	for(int i=1;i<=m;i++)
          	{
          		for(int j=1;j<=n;j++)
          		{
          			cout<<b[i][j]<<" ";
          		}
          		cout<<endl;
          	}
          	return 0;
          }
          
          
          • -1
            @ 2024-10-25 19:51:58
            #include <iostream>
            #include <bits/stdc++.h>
            using namespace std;
            const int N=1e4+10;
            const int INF=0x3f3f3f3f;
            int n,m,a[N][N];
            int main()
            {
            	cin>>n>>m;
            	for(int i=1;i<=n;i++)
            	{
            		for(int j=1;j<=m;j++)
            		{
            			cin>>a[i][j];
            		}
            	}
            	for(int j=1;j<=m;j++)
            	{
            		for(int i=n;i>=1;i--)
            	    {
            		    cout<<a[i][j]<<" ";
            		}
            		cout<<endl;
            	}
            }
            
            • -1
              @ 2024-10-25 18:20:00

              6

              #include <bits/stdc++.h>
              using namespace std;
              int a[105][105];
              int n,m;
              int main(){
              	cin>>n>>m;
              	for(int i=1;i<=n;i++){
              		for(int j=1;j<=m;j++){
              			cin>>a[i][j];
              		}
              	}
              	for(int j=1;j<=m;j++){
              		for(int i=n;i>=1;i--){
              			cout<<a[i][j]<<" ";
              		}
              		cout<<endl;
              	}
              	return 0;
              }
              
              • -1
                @ 2023-9-17 18:52:35

                看似难实则简单

                #include <iostream>
                #include <bits/stdc++.h>
                using namespace std;
                const int N=1e4+10;
                const int INF=0x3f3f3f3f;
                int n,m,a[N][N];
                int main()
                {
                	cin>>n>>m;
                	for(int i=1;i<=n;i++)
                	{
                		for(int j=1;j<=m;j++)
                		{
                			cin>>a[i][j];
                		}
                	}
                	for(int j=1;j<=m;j++)
                	{
                		for(int i=n;i>=1;i--)
                	    {
                		    cout<<a[i][j]<<" ";
                		}
                		cout<<endl;
                	}
                }
                
                • -1
                  @ 2023-9-5 21:36:20
                  //@#@#@#@#@#@#@#
                  #include<iostream>
                  #include<cstdio>
                  #include<string>
                  #include<bits/stdc++.h>
                  #define LL long long
                  using namespace std;
                  const int INF=0x3f3f3f3f;
                  const int N=2e5+10;
                  int a[20000][20000],b,c;
                  int main(){
                  	cin>>b>>c;
                  	for(int i=1;i<=b;i++){
                  		for(int j=1;j<=c;j++){
                  			cin>>a[i][j];
                  		}
                  	}
                  	for(int i=1;i<=c;i++){
                  		for(int j=b;j>=1;j--){
                  			cout<<a[j][i]<<" ";
                  		}
                  		cout<<endl;
                  	}
                  }
                  
                  • -1
                    @ 2023-5-10 20:28:58

                    #include using namespace std; const int N=1e2+10; int a[N][N],n,m; int main() { cin >> n >> m; for(int i = 1; i <= n; i++) { for(int j = 1; j <= m; j++) { cin >> a[i][j]; } } for(int i = 1; i <= m; i++) { for(int j = n; j >= 1; j--) { cout << a[j][i] <<" "; } cout<<endl; } return 0; }

                    • -1
                      @ 2023-5-10 20:28:23

                      #include<bits/stdc++.h> using namespace std; const int N=1e2+10; const int INF=0x3f3f3f3f; int n,m,a[N][N]; int main(){ cin>>n>>m; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) cin>>a[i][j];

                      for(int i=1;i<=m;i++){
                      	for(int j=n;j>=1;j--){
                      		cout<<a[j][i]<<" ";
                      	}
                      	cout<<endl;
                      }
                      
                      return 0;
                      

                      }

                      • -2
                        @ 2023-5-13 14:43:11
                        
                        

                        #include #include <math.h> #include #include <stdio.h> #include #include #include #include <string.h> #include using namespace std; const int N = 1e6 + 10; const int INF = 0x3f3f3f3f; int a[110][110], n, m; int main() { cin >> n >> m; for(int i = 1; i <= n; i++) { for(int j = 1; j <= m; j++) { cin >> a[i][j]; } }

                        for(int i = 1; i <= m; i++)
                        {
                            for(int j = n; j >= 1; j--)
                            {
                                cout << a[j][i] << " ";
                            }
                            cout << endl;
                        }
                        return 0;
                        

                        }

                        
                        
                        • -3
                          @ 2023-4-12 18:59:26
                          #include <iostream>
                          using namespace std;
                          #define LL long long
                          const int N = 1e6 + 10;
                          const int INF = 0x3f3f3f3f;
                          int a[110][110], n, m;
                          int main()
                          {
                              cin >> n >> m;
                          	for(int i = 1; i <= n; i++)
                              {
                                  for(int j = 1; j <= m; j++)
                                  {
                                      cin >> a[i][j];
                                  }
                              }
                              //其实不用真的转90°
                              for(int i = 1; i <= m; i++)//仔细想想这三句
                              {
                                  for(int j = n; j >= 1; j--)//为什么一个加一个减
                                  {
                                      cout << a[j][i] << " ";//为什么要反着输出
                                  }
                                  puts("");
                              }
                          	return 0;
                          }
                          
                          • 1

                          信息

                          ID
                          1071
                          时间
                          1000ms
                          内存
                          128MiB
                          难度
                          6
                          标签
                          递交数
                          780
                          已通过
                          245
                          上传者