QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#65002#4741. PowódźMaMengQiCompile Error//C++11900b2022-11-26 10:29:092022-11-26 10:29:11

Details

answer.code: In function ‘int Find(int)’:
answer.code:16:12: error: ‘pre’ was not declared in this scope
   16 |         if(pre[x]!=x) pre[x]=Find(pre[x]);
      |            ^~~
answer.code:17:16: error: ‘pre’ was not declared in this scope
   17 |         return pre[x];
      |                ^~~
answer.code: In function ‘int main()’:
answer.code:23:67: error: expected ‘;’ before ‘t’
   23 |     for(int i=1,x;i<=n-1;i++) for(int j=1;j<=m;j++) scanf("%d",&x)t[++tot]=(zz){(i-1)*m+j,i*m+j,x};
      |                                                                   ^
      |                                                                   ;
answer.code:24:29: error: ‘pre’ was not declared in this scope
   24 |     for(int i=1;i<=n*m;i++) pre[i]=i,qwq[i]=1;
      |                             ^~~
answer.code:30:9: error: ‘pre’ was not declared in this scope
   30 |         pre[fy]=fx;
      |         ^~~
answer.code:33:27: error: ‘H’ was not declared in this scope
   33 |     cout<<(((qwq[Find(1)]+H-sum[Find(1)])%Mod)+Mod)%Mod;
      |                           ^
answer.code:22:58: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |     for(int i=1,x;i<=n;i++) for(int j=1;j<=m-1;j++) scanf("%d",&x),t[++tot]=(zz){(i-1)*m+j,(i-1)*m+j+1,x};
      |                                                     ~~~~~^~~~~~~~~
answer.code:23:58: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   23 |     for(int i=1,x;i<=n-1;i++) for(int j=1;j<=m;j++) scanf("%d",&x)t[++tot]=(zz){(i-1)*m+j,i*m+j,x};
      |                                                     ~~~~~^~~~~~~~~