QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#792311#142. 平面最近点对LYH_cppCompile Error//C++231.3kb2024-11-29 08:58:172024-11-29 08:58:19

Details

answer.code: In function ‘int main()’:
answer.code:41:61: warning: narrowing conversion of ‘__builtin_ceil(((double)p[i].P::y - __builtin_sqrt((double)ans)))’ from ‘double’ to ‘int’ [-Wnarrowing]
   41 |                 for(auto it=st.lower_bound({0,__builtin_ceil(p[i].y-__builtin_sqrt(ans))});it!=st.end()&&pow2(p[i].y-it->y)<=ans;it++)ans=mi(ans,dis(*it,p[i]));
      |                                               ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code: In instantiation of ‘void w(T) [with T = double]’:
answer.code:44:3:   required from here
answer.code:27:25: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator%’
   27 |                 *++top=x%10;
      |                        ~^~~