![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hdu AC code
daixie544048040
这个作者很懒,什么都没留下…
展开
-
hdu 1016
#include <iostream>using namespace std;int prime[41] = { 0,1,1,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0 };//mark the primeint vis[21];//int founded[21];in...原创 2018-05-26 01:36:58 · 167 阅读 · 0 评论 -
Eight 八数码题解
思路是bfs+hash#include <iostream>#include <queue>#include <cstring>#include <string>using namespace std;struct Step{ char dir;//the direction of pre-this int parent;//pre-...原创 2018-09-25 17:12:38 · 271 阅读 · 0 评论 -
HDU 3567 - Eight II 这该死的题
关于这道题 我真的想骂娘(好吧是自己太菜了) 我很早其实自己推出来了,就是还是bfs+康托但是列举九种不同的X位置,同时利用映射,注意要映射第一个输入的模板,然后倒序输出路径!!很重要 我一开始天真的想用路径urld然后顺序输出 然后- - 也就几个小时没了吧小问题但是我卡在了两个莫名其妙的问题上 ** 康拓展开后面return忘记+1**,导致字典序在实例5742631X81568...原创 2018-10-01 22:49:25 · 299 阅读 · 2 评论 -
HDU 2844题解
这道题是用多重背包解的 由于我实在是看了好多天 到现在都不怎么懂 所以想写个题解帮自己捋一捋先上AC代码#include <iostream> #include <algorithm> #include <queue> #include <math.h> #include <stdio.h> #include &...原创 2018-09-20 23:23:42 · 257 阅读 · 0 评论