7 条题解

  • 2
    @ 2025-1-24 10:43:14
    #include <bits/stdc++.h>
    using namesapce std;
    const int N = 1e3 + 10;
    const int INF = 0x3f3f3f3f;
    int a[10][10];
    int main()
    {
    	for(int i = 1; i <= 6; i++)
        {
            for(int j = 1; j <= 6; j++)
            {
                cin >> a[i][j];
                if(i == j)
                {
                    a[i][j] += 10;
                }
                if(i + j == 7)
                {
                    a[i][j] += 10;
                }
            }
        }
        for(int i = 1; i <= 6; i++)
        {
            for(int j = 1; j <= 6; j++)
            {
                cout << a[i][j] << " ";
            }
            cout << endI;
        }
    	return o;
    }
    

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

    • 2
      @ 2023-4-9 20:01: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[10][10];
      int main()
      {
      	for(int i = 1; i <= 6; i++)
          {
              for(int j = 1; j <= 6; j++)
              {
                  cin >> a[i][j];
                  if(i == j)
                  {
                      a[i][j] += 10;
                  }
                  if(i + j == 7)
                  {
                      a[i][j] += 10;
                  }
              }
          }
          for(int i = 1; i <= 6; i++)
          {
              for(int j = 1; j <= 6; j++)
              {
                  cout << a[i][j] << " ";
              }
              puts("");
          }
      	return 0;
      }
      
      
      • 1
        @ 2023-4-13 22:38:07
        using namespace std;
        #define LL long long
        const int N = 1e6 + 10;
        const int INF = 0x3f3f3f3f;
        int a[10][10];
        int main(){
        	for(int i = 1; i <= 6; i++){
                for(int j = 1; j <= 6; j++){
                    cin >> a[i][j];
                    if(i == j){
                        a[i][j] += 10;
                    }
                    if(i + j == 7){
                        a[i][j] += 10;
                    }
                }
            }
        	for(int i = 1; i <= 6; i++){
                for(int j = 1; j <= 6; j++){
                    cout << a[i][j] << " ";
                }
                puts("");
            }
        	return 0;
        }
        
        
        • 1
          @ 2022-10-21 22:05:45

          #include<stdio.h>
          #include
          using namespace std;
          #define LL long long
          const int N=1e6+10;
          const int INF=0x3f3f3f3f;
          int a[15][15];
          int main(){
          for(int i=1;i<=6;i++)
          for(int j=1;j<=6;j++)
          cin>>a[i][j];
          int sum=1,pro=1,x=6;
          for(int i=1;i<=6;i++){
          for(int j=1;j<=6;j++){
          a[sum][pro]+=10;
          a[sum][x]+=10;
          sum++;
          pro++;
          x--;
          }
          }
          for(int i=1;i<=6;i++){
          for(int j=1;j<=6;j++)
          cout<<a[i][j]<<" ";
          cout<<endl;
          }
          }

          • 0
            @ 2024-10-25 18:08:57
            #include<bits/stdc++.h>
            using namespace std;
            int a[15][15];
            int main(){
            	for(int i=1;i<=6;i++){
            		for(int j=1;j<=6;j++){
            			cin>>a[i][j];
            			if(i==j){
            				a[i][j]+=10;
            			}
            			if(i+j==7){
            				a[i][j]+=10;
            			}
            		}
            	}
            	for(int i=1;i<=6;i++){
            		for(int j=1;j<=6;j++){
            			cout<<a[i][j]<<" ";
            		}
            		cout<<endl;
            	}
            	
            	return 0;
            }
            
            • 0
              @ 2023-11-8 19:57:43
              #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[10][10];
              int main()
              {
              	for(int i = 1; i <= 6; i++)
                  {
                      for(int j = 1; j <= 6; j++)
                      {
                          cin >> a[i][j];
                          if(i == j)
                          {
                              a[i][j] += 10;
                          }
                          if(i + j == 7)
                          {
                              a[i][j] += 10;
                          }
                      }
                  }
                  for(int i = 1; i <= 6; i++)
                  {
                      for(int j = 1; j <= 6; j++)
                      {
                          cout << a[i][j] << " ";
                      }
                      puts("");
                  }
              	return 0;
              }
              
              • 0
                @ 2022-11-28 9:26:37

                水题解了

                #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[10][10];
                int main()
                {
                	for(int i = 1; i <= 6; i++)
                    {
                        for(int j = 1; j <= 6; j++)
                        {
                            cin >> a[i][j];
                            if(i == j)
                            {
                                a[i][j] += 10;
                            }
                        }
                    }//一条对角线+输入
                    for(int i = 1; i <= 6; i++)
                    {
                        for(int j = 1; j <= 6; j++)
                        {
                            if(i + j == 7)//稍微观察一下便知
                            {
                                a[i][j] += 10;
                            }
                        }
                    }//另一条对角线
                    for(int i = 1; i <= 6; i++)
                    {
                        for(int j = 1; j <= 6; j++)
                        {
                            cout << a[i][j] << " ";
                        }
                        puts("");
                    }//输出
                	return 0;
                }
                

                可以缩减成这样

                #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[10][10];
                int main()
                {
                	for(int i = 1; i <= 6; i++)
                    {
                        for(int j = 1; j <= 6; j++)
                        {
                            cin >> a[i][j];
                            if(i == j)
                            {
                                a[i][j] += 10;
                            }
                            if(i + j == 7)
                            {
                                a[i][j] += 10;
                            }
                        }
                    }
                    for(int i = 1; i <= 6; i++)
                    {
                        for(int j = 1; j <= 6; j++)
                        {
                            cout << a[i][j] << " ";
                        }
                        puts("");
                    }
                	return 0;
                }
                
                • 1

                信息

                ID
                1052
                时间
                1000ms
                内存
                128MiB
                难度
                4
                标签
                递交数
                427
                已通过
                199
                上传者