QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#353049#7933. Build PermutationMaMengQiCompile Error//C891.1kb2024-03-13 20:14:392024-03-13 20:14:39

详细

answer.code: In function ‘main’:
answer.code:28:19: error: C++ style comments are not allowed in ISO C90
   28 |     int arr[n+1]; // ?i??
      |                   ^
answer.code:28:19: note: (this will be reported only once per input file)
answer.code:31:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   31 |     for (int i = 0; i < n; i++)
      |     ^~~
answer.code:31:5: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
answer.code:47:14: error: redefinition of ‘i’
   47 |     for (int i=0; i<n; i++)
      |              ^
answer.code:31:14: note: previous definition of ‘i’ was here
   31 |     for (int i = 0; i < n; i++)
      |              ^
answer.code:47:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   47 |     for (int i=0; i<n; i++)
      |     ^~~
answer.code:56:14: error: redefinition of ‘i’
   56 |     for (int i=0; i<n; i++)
      |              ^
answer.code:47:14: note: previous definition of ‘i’ was here
   47 |     for (int i=0; i<n; i++)
      |              ^
answer.code:56:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   56 |     for (int i=0; i<n; i++)
      |     ^~~
answer.code:26:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   26 |     scanf("%d", &n);
      |     ^~~~~~~~~~~~~~~
answer.code:34:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   34 |         scanf("%d", &s[i].data);
      |         ^~~~~~~~~~~~~~~~~~~~~~~