QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#77647#5511. Minor EvilflywatreCompile Error//C++142.1kb2023-02-15 11:21:482023-02-15 11:21:50

Details

answer.code:12:11: error: ‘int kill [1000010]’ redeclared as different kind of entity
   12 | int kill[N],own[N],had[N],dead[N];
      |           ^
In file included from /usr/include/c++/11/csignal:42,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:43,
                 from answer.code:1:
/usr/include/signal.h:112:12: note: previous declaration ‘int kill(__pid_t, int)’
  112 | extern int kill (__pid_t __pid, int __sig) __THROW;
      |            ^~~~
answer.code: In function ‘void work()’:
answer.code:21:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   21 |         for(int i=1;i<=n;i++)dead[i]=kill[i]=own[i]=had[i]=used[i]=0;
      |                                            ^
answer.code:21:45: error: assignment of read-only location ‘*(kill + ((sizetype)i))’
   21 |         for(int i=1;i<=n;i++)dead[i]=kill[i]=own[i]=had[i]=used[i]=0;
      |                                      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
answer.code:24:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   24 |         for(int i=1;i<=s;i++)kill[rd()]=true;
      |                                       ^
answer.code:24:40: error: assignment of read-only location ‘*(kill + ((sizetype)rd()))’
   24 |         for(int i=1;i<=s;i++)kill[rd()]=true;
      |                              ~~~~~~~~~~^~~~~
answer.code:26:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   26 |                 if(kill[y[i]])adlin(x[i],y[i],i),adlin(y[i],x[i],-i),had[y[i]]++;
      |                             ^
answer.code:29:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   29 |                 if(!kill[u])continue;
      |                           ^
answer.code:40:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   40 |                         if(kill[y[i]])had[y[i]]--;
      |                                     ^
answer.code:52:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   52 |                         if(kill[y[i]])s--,own[x[i]]-=(had[y[i]]==1);
      |                                     ^
answer.code:56:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   56 |                                 if(kill[v]&&!dead[v]){
      |                                          ^