QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#107897#4. GapjuruocjlCompile Error//C++17358b2023-05-23 07:21:282023-05-23 07:21:31

詳細信息

answer.code: In function ‘ll findGap(int, int)’:
answer.code:11:72: error: invalid conversion from ‘ll’ {aka ‘long long int’} to ‘long long int*’ [-fpermissive]
   11 |                 for(int i=1;i<=n-i+1;i++)MinMax(a[i-1]+1,a[n-i+2]-1,a[i],a[n-i+1]);
      |                                                                     ~~~^
      |                                                                        |
      |                                                                        ll {aka long long int}
In file included from answer.code:1:
gap.h:2:35: note:   initializing argument 3 of ‘void MinMax(long long int, long long int, long long int*, long long int*)’
    2 | void MinMax(long long, long long, long long*, long long*);
      |                                   ^~~~~~~~~~
answer.code:11:81: error: invalid conversion from ‘ll’ {aka ‘long long int’} to ‘long long int*’ [-fpermissive]
   11 |                 for(int i=1;i<=n-i+1;i++)MinMax(a[i-1]+1,a[n-i+2]-1,a[i],a[n-i+1]);
      |                                                                          ~~~~~~~^
      |                                                                                 |
      |                                                                                 ll {aka long long int}
In file included from answer.code:1:
gap.h:2:47: note:   initializing argument 4 of ‘void MinMax(long long int, long long int, long long int*, long long int*)’
    2 | void MinMax(long long, long long, long long*, long long*);
      |                                               ^~~~~~~~~~
answer.code:12:38: error: ‘chkmx’ was not declared in this scope
   12 |                 for(int i=2;i<=n;i++)chkmx(ans,a[i]-a[i-1]);
      |                                      ^~~~~