QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#344072#7933. Build PermutationZhaoZiLongCompile Error//C891.0kb2024-03-03 15:09:342024-03-03 15:09:34

Details

answer.code: In function ‘main’:
answer.code:10:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   10 |     for(int i=0;i<n;i++)
      |     ^~~
answer.code:10:5: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
answer.code:17:13: error: redefinition of ‘i’
   17 |     for(int i=0;i<n;i++)
      |             ^
answer.code:10:13: note: previous definition of ‘i’ was here
   10 |     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:30:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   30 |         for(int i=0;i<n;i++)
      |         ^~~
answer.code:32:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   32 |             for(int j=0;j<n;j++)
      |             ^~~
answer.code:49:13: error: redefinition of ‘i’
   49 |     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:49:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   49 |     for(int i=0;i<n;i++)
      |     ^~~
answer.code:7:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    7 |     scanf("%u",&n);
      |     ^~~~~~~~~~~~~~
answer.code:12:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   12 |         scanf("%u",&array[i]);
      |         ^~~~~~~~~~~~~~~~~~~~~