QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#350395#7933. Build PermutationMaMengQiCompile Error//C991.1kb2024-03-10 18:09:252024-03-10 18:09:26

Details

answer.code: In function ‘main’:
answer.code:54:9: error: ‘i’ undeclared (first use in this function)
   54 |     for(i=0; i<n; i++){
      |         ^
answer.code:54:9: note: each undeclared identifier is reported only once for each function it appears in
answer.code:56:5: error: variable-sized object may not be initialized
   56 |     int b[n] = solve(n,a)
      |     ^~~
answer.code:57:5: error: expected ‘,’ or ‘;’ before ‘for’
   57 |     for(i=0; i<n; i++){
      |     ^~~
answer.code:57:22: error: expected ‘;’ before ‘)’ token
   57 |     for(i=0; i<n; i++){
      |                      ^
      |                      ;
answer.code:57:22: error: expected statement before ‘)’ token
answer.code:59:1: error: expected declaration or statement at end of input
   59 | }
      | ^
answer.code:59:1: error: expected declaration or statement at end of input
answer.code:52:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   52 |     scanf("%d", &n);
      |     ^~~~~~~~~~~~~~~