| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 64289 | 邓昊源 | 拐角方阵 | C++ | Compile Error | 0 MS | 0 KB | 301 | 2024-01-21 12:56:13 |
#include<iostream> using namespace std; int main(){ int a[20][20] = {{0}{0}}; int n,b; cin>>n; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(i < j){ cout<< i+1 << " " ; }else{ cout<< j+1 << " " ; } } } return 0; }
Main.cc: In function 'int main()':
Main.cc:4:21: error: expected '}' before '{' token
int a[20][20] = {{0}{0}};
^
Main.cc:4:21: error: expected ',' or ';' before '{' token
Main.cc:4:5: warning: unused variable 'a' [-Wunused-variable]
int a[20][20] = {{0}{0}};
^
Main.cc: At global scope:
Main.cc:6:1: error: 'cin' does not name a type
cin>>n;
^
Main.cc:7:1: error: expected unqualified-id before 'for'
for(int i=0;i