QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#871472#9678. 网友小 Z 的树yaohaoyouCompile Error//C++144.4kb2025-01-25 20:49:312025-01-25 20:49:36

Details

answer.code: In function ‘int ask(int, int, int)’:
answer.code:122:157: error: ‘query’ was not declared in this scope
  122 | inline int ask(int x,int y,int z){if(x>y)swap(x,y);if(y>z)swap(y,z);if(x>y)swap(x,y);assert(x<y&&y<z);piii o=piii(x,pii(y,z));if(mp.find(o)==mp.end())mp[o]=query(x,y,z);return mp[o];}
      |                                                                                                                                                             ^~~~~
answer.code: In function ‘std::pair<int, int> find_diameter(int, int)’:
answer.code:128:12: error: ‘in’ was not declared in this scope; did you mean ‘n’?
  128 |         if(in(3,1,2))   return pii(1,2);
      |            ^~
      |            n
answer.code:129:12: error: ‘in’ was not declared in this scope; did you mean ‘n’?
  129 |         if(in(2,1,3))   return pii(1,3);
      |            ^~
      |            n
answer.code:143:8: error: ‘in’ was not declared in this scope; did you mean ‘n’?
  143 |     if(in(pxy,x,z)) dis2=ask(pxy,x,z)>>1,dis3=ask(x,y,z)-dis1-dis2;
      |        ^~
      |        n