QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#348168 | #7933. Build Permutation | HuangHanSheng | Compile Error | / | / | C89 | 986b | 2024-03-09 17:18:57 | 2024-03-09 17:18:57 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
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:11:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] 11 | scanf("%d\n", &n); | ^~~~~~~~~~~~~~~~~ answer.code:14:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] 14 | scanf("%d", &a[i]); | ^~~~~~~~~~~~~~~~~~