摘要: hljs perl">#include#includeusing namespace std;int flag,t,n,a[20],use[20],ans[20];bool cmp(int x,int y){ return x>y;}void dfs(int sum,int ... 阅读全文
posted @ 2015-05-02 16:48 xryz 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;int mp[25][25],vis[25],ans[25],sum;void dfs(int now,int cnt){ //printf(" %d\n",ans[0]); int ... 阅读全文
posted @ 2015-05-02 15:56 xryz 阅读(108) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#includeusing namespace std;double y;double fcn(double x){ double t=8*x*x*x*x+7*x*x*x+2*x*x+3*x+6-y; ret... 阅读全文
posted @ 2015-05-02 08:15 xryz 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 刚开始按一般搜索写一直错,没有想明白怎么回事。搜了一下其他人的思路才明白,本题有杀死守卫的时间,所以bfs搜索出来路径最短的不一定是时间最短的,所以使用了优先队列让他自己在队列里面排序解决。还有自己刚开始还将路变成了墙,现在想来也是错的,主要都是要杀人。 或者考虑一直搜索,每次将结果... 阅读全文
posted @ 2015-05-02 01:16 xryz 阅读(105) 评论(0) 推荐(0) 编辑