题目链接:http://poj.org/problem?id=1077 Eight Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 33267 Accepted: 14404 Special Judge Description The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you'v…
HDOJ 1312 Red and Black http://acm.hdu.edu.cn/showproblem.php?pid=1312 很裸的dfs,在dfs里面写上ans++,能到几个点就调了几次dfs,最后ans就是答案 #include<cstdio> #include<iostream> using namespace std; ][]; int n,m,si,sj,ans; ][] = {{,}, {-,}, {,-}, {,}}; int dfs(int x, i…