QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#345479#7933. Build PermutationZhaoZiLongCompile Error//C891.0kb2024-03-07 00:07:262024-03-07 00:07:26

Details

answer.code: In function ‘main’:
answer.code:19:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   19 |  for (int t = 0; t < n; t++) {
      |  ^~~
answer.code:19:2: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
answer.code:62:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   62 |  for (int p = 0; p < n; p++) {
      |  ^~~
answer.code:8:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    8 |  scanf("%d",&n);
      |  ^~~~~~~~~~~~~~
answer.code:20:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   20 |   scanf("%d",&r);
      |   ^~~~~~~~~~~~~~