Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140114 刘益梵 矩阵转置 C++ Compile Error 0 MS 0 KB 348 2025-12-13 15:37:47

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int a[1000][1000]; int main(){ int n,m; scanf("%d%d",&n,&m); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ scanf("%d",&a[j][i]); } } for(int i=0;i<m;i++){ for(int j=0;j<n;j++){ printf("%d ",a[i][j]) }printf("\n"); } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:15:9: error: expected ';' before '}' token
         }printf("\n"); 
         ^
Main.cc:6:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&n,&m);
                     ^
Main.cc:9:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
          scanf("%d",&a[j][i]);
                              ^