QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#352661#7933. Build PermutationHuangHanShengCompile Error//C891.5kb2024-03-13 14:55:472024-03-13 14:55:47

Details

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