Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:这题的话,二分答案应该是错的(内含二分问什么错误的分析)In Reply To:这题的话,二分答案应该是错的(内含二分问什么错误的分析) Posted by:Heart_Blue at 2018-05-19 00:32:36 但是实际上在check(mid)里对于i能否打败j可以这样判断: 要么最开始出发,要么最后出发,这样的写法通过了hack数据,应该没有问题。 ```cpp for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) if(mid>=dis[i][j]&&(hx[i]>=ax[j]+ay[j]*dis[i][j]||hx[i]+hy[i]*(mid-dis[i][j])>=ax[j]+ay[j]*mid)) v[i].push_back(j); ``` Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator