QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#350390#7933. Build PermutationGuanYunchangCompile Error//C991.1kb2024-03-10 18:06:592024-03-10 18:06:59

詳細信息

answer.code: In function ‘solve’:
answer.code:43:20: warning: returning ‘int’ from a function with return type ‘int *’ makes pointer from integer without a cast [-Wint-conversion]
   43 |             return -1;
      |                    ^
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);
      |     ^~~~~~~~~~~~~~~