题目连接
https://ac.nowcoder.com/acm/contest/4462/D
一开始还想的排序什么鬼,并不是,再一看数据范围,爆搜吧~但是调试了不少时间,码力码力码力!!!
如果可以的话,以后会写一下状态压缩版本,还一点不会。。
更新一下 ,这个代码虽然ac了,我感觉有错误的地方,应该是数据不太行。在这个搜索中我默认拾完最后一个纸片距离最短然后记录最后一个点,再用这个搜到的最短距离+记录的最后一个点和起始点的距离就是答案,明显有问题。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
正解
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
作者:TTP1128
牛客