QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#351946#7933. Build PermutationZhaoZiLongCompile Error//C891.2kb2024-03-12 17:24:062024-03-12 17:24:07

Details

answer.code: In function ‘pailie’:
answer.code:6:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
    6 |     for(int i=0;i<n;i++)
      |     ^~~
answer.code:6:5: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
answer.code:12:13: error: redefinition of ‘i’
   12 |     for(int i=0;i<n;i++)
      |             ^
answer.code:6:13: note: previous definition of ‘i’ was here
    6 |     for(int i=0;i<n;i++)
      |             ^
answer.code:12:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   12 |     for(int i=0;i<n;i++)
      |     ^~~
answer.code:17:13: error: redefinition of ‘i’
   17 |     for(int i=0;i<n;i++)
      |             ^
answer.code:12:13: note: previous definition of ‘i’ was here
   12 |     for(int i=0;i<n;i++)
      |             ^
answer.code:17:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   17 |     for(int i=0;i<n;i++)
      |     ^~~
answer.code:21:14: error: redefinition of ‘i’
   21 |     for (int i = 0; i < n; i++)
      |              ^
answer.code:17:13: note: previous definition of ‘i’ was here
   17 |     for(int i=0;i<n;i++)
      |             ^
answer.code:21:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   21 |     for (int i = 0; i < n; i++)
      |     ^~~
answer.code:24:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   24 |         for(int j=i;j<n;j++)
      |         ^~~
answer.code: In function ‘main’:
answer.code:43:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   43 |     for (int i = 0; i < n; i++)
      |     ^~~
answer.code:52:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   52 |         for (int i = 0; i < n; i++)
      |         ^~~
answer.code:41:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   41 |     scanf("%d",&n);
      |     ^~~~~~~~~~~~~~
answer.code:45:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   45 |         scanf("%d",&a[i]);
      |         ^~~~~~~~~~~~~~~~~