QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#706588#7758. PainterHuangHanShengCompile Error//C++231.2kb2024-11-03 12:27:342024-11-03 12:27:34

Details

answer.code:16:30: error: ‘int y1 [2005]’ redeclared as different kind of entity
   16 | int x1[2005],x2[2005],y1[2005],y2[2005],r[2005];
      |                              ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/c++config.h:679,
                 from /usr/include/c++/13/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:33,
                 from answer.code:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:221:1: note: previous declaration ‘double y1(double)’
  221 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
answer.code: In function ‘void solve()’:
answer.code:26:47: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   26 |                         read(x1[i]); read(y1[i]); read(r[i]);
      |                                               ^
answer.code:29:55: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   29 |                 if(S[i][3]=='c') read(x1[i]),read(y1[i]),read(x2[i]),read(y2[i]),scanf("%s",tmd[i]+1);
      |                                                       ^
answer.code:31:47: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   31 |                         read(x1[i]); read(y1[i]); read(x2[i]); read(y2[i]);
      |                                               ^
answer.code:32:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   32 |                         per(k,y2[i],y1[i]) {
      |                                         ^
answer.code:3:38: note: in definition of macro ‘per’
    3 | #define per(a,b,c) for(int a=(b);a>=(c);a--)
      |                                      ^
answer.code:3:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    3 | #define per(a,b,c) for(int a=(b);a>=(c);a--)
      |                                   ^
answer.code:32:25: note: in expansion of macro ‘per’
   32 |                         per(k,y2[i],y1[i]) {
      |                         ^~~
answer.code:38:84: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   38 |                                                         if((po(x1[lst]-j)+po(y1[lst]-k))<=po(r[lst])) ans=tmd[lst][1];
      |                                                                                    ^
answer.code:38:85: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   38 |                                                         if((po(x1[lst]-j)+po(y1[lst]-k))<=po(r[lst])) ans=tmd[lst][1];
      |                                                                              ~~~~~~~^~
answer.code:38:85: error: invalid conversion from ‘double (*)(double) noexcept’ to ‘int’ [-fpermissive]
   38 |                                                         if((po(x1[lst]-j)+po(y1[lst]-k))<=po(r[lst])) ans=tmd[lst][1];
      |                                                                              ~~~~~~~^~
      |                                                                                     |
      |                                                                                     double (*)(double) noexcept
answer.code:19:19: note:   initializing argument 1 of ‘int po(int)’
   19 | inline int po(int x) { return x*x; }
      |               ~~~~^
answer.code:41:92: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   41 |                                                         if(in(x1[lst],x2[lst],j)&&in(y1[lst],y2[lst],k)) ans=tmd[lst][1];
      |                                                                                            ^
answer.code:41:92: error: invalid conversion from ‘double (*)(double) noexcept’ to ‘int’ [-fpermissive]
   41 |                                                         if(in(x1[lst],x2[lst],j)&&in(y1[lst],y2[lst],k)) ans=tmd[lst][1];
      |                                                                                      ~~~~~~^
      |                                                                                            |
      |                                                                                            double (*)(double) noexcept
answer.code:18:19: note:   initializing argument 1 of ‘int in(int, int, int)’
   18 | inline int in(int l,int r,int x) { return (l<=x)&&(x<=r); }
      |               ~~~~^
answer.code: In instantiation of ‘void read(T&) [with T = double(double) noexcept]’:
answer.code:26:21:   required from here
answer.code:7:11: error: variable ‘f’ has function type
    7 |         T f=1; x=0; char s=getchar();
      |           ^
answer.code:7:17: error: assignment of read-only reference ‘x’
    7 |         T f=1; x=0; char s=getchar();
      |                ~^~
answer.code:7:11: error: variable ‘f’ has function type
    7 |         T f=1; x=0; char s=getchar();
      |           ^
answer...