- 博客(3)
- 收藏
- 关注
原创 1152. 简单的马周游问题
深搜,不怎么会用,不过渐渐有点懂了,看了网上的代码才做出来 #include #include using namespace std; int q[31]; int xy[8][2] = {{-2,-1},{-1,-2},{1,-2},{2,-1},{2,1},{1,2},{-1,2},{-2,1}}; bool vis[6][7],f; void dfs(int x, int y, int
2013-09-21 10:53:40 1511
原创 1940. Ordering Tasks
貌似是拓扑排序,其实像尾随 #include #include #include using namespace std; set s; vector v[100001]; int k[100011] = {0}; int t,n,m,i,j; int main(int argc, char const *argv[]) { cin >> t; while(t--)
2013-09-15 20:50:39 627
原创 1485. Hanoi双塔问题
一个高精度问题 #include #include using namespace std; int main(int argc, char const *argv[]) { int n , ans[100], len; bool f = 0; while(cin >> n) { if(f) cout << endl; f = 1; memset(ans,0,siz
2013-09-01 00:46:35 713
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人