QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#344712#7933. Build PermutationGuanYunchangCompile Error//C891.2kb2024-03-04 23:08:392024-03-04 23:08:39

Details

answer.code: In function ‘sort’:
answer.code:7:29: error: C++ style comments are not allowed in ISO C90
    7 |         int flag = 0;       //flag??
      |                             ^
answer.code:7:29: note: (this will be reported only once per input file)
answer.code: In function ‘main’:
answer.code:32:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   32 |     for(int i=0;i<n;i++){
      |     ^~~
answer.code:32:5: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
answer.code:40:9: error: redefinition of ‘i’
   40 |     int i=0,j=n-1;
      |         ^
answer.code:32:13: note: previous definition of ‘i’ was here
   32 |     for(int i=0;i<n;i++){
      |             ^
answer.code:54:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   54 |     for(int k=0;k<n;k++){
      |     ^~~
answer.code:55:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   55 |         for(int q=0;q<n;q++){
      |         ^~~
answer.code:29:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   29 |     scanf("%d",&n);
      |     ^~~~~~~~~~~~~~
answer.code:33:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   33 |         scanf("%d",&a[i]);
      |         ^~~~~~~~~~~~~~~~~