QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#348189 | #7933. Build Permutation | ZhaoZiLong | Compile Error | / | / | C89 | 993b | 2024-03-09 17:24:10 | 2024-03-09 17:24:12 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘sum’: answer.code:4:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 4 | for(int i=0;i<n;i++){ | ^~~ answer.code:4:2: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code answer.code: In function ‘main’: answer.code:13:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 13 | for(int i=0 ; i<n;i++){ | ^~~ answer.code:17:10: error: redefinition of ‘i’ 17 | for(int i=0;i<n;i++){ | ^ answer.code:13:10: note: previous definition of ‘i’ was here 13 | for(int i=0 ; i<n;i++){ | ^ answer.code:17:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 17 | for(int i=0;i<n;i++){ | ^~~ answer.code:19:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 19 | for(int k=0;k<n;k++){ | ^~~ answer.code:24:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 24 | for (int j = 0; j < n; j++) { | ^~~ answer.code:28:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 28 | for (int i = 1; i < n; i++) { | ^~~ answer.code:30:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 30 | for (int k = 0; k < n; k++) { | ^~~ answer.code:50:6: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 50 | for(int i=0;i<n;i++){ | ^~~ answer.code:12:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] 12 | scanf("%d", &n); | ^~~~~~~~~~~~~~~ answer.code:14:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] 14 | scanf("%d", &a[i]); | ^~~~~~~~~~~~~~~~~~