摘要: 发现二分答案有点弱 补点二分答案的题 阅读全文
posted @ 2024-04-07 14:48 archer2333 阅读(14) 评论(0) 推荐(0)
摘要: E - Rush Hour 2 设函数f(t)=t+ci+di/(t+1); 易得当t=sqrt(di)-1时取最小 所以根据时间来做dij 当时间大于sqrt(di)-1时直接加入即可 同时用并查集来查看1和n是否联通即可 ac code: 点击查看代码 #include<bits/stdc++. 阅读全文
posted @ 2024-04-07 14:08 archer2333 阅读(33) 评论(0) 推荐(0)