九度_清华2012_玛雅人的密码

题目链接 http://ac.jobdu.com/problem.php?pid=1482 说实话,看到这个题目完全没有思路,所以去看了很多代码,都是说用

题目链接

http://ac.jobdu.com/problem.php?pid=1482

说实话,看到这个题目完全没有思路,所以去看了很多代码,都是说用广搜,但是自己还是想了很久,然后看懂了学长的代码,照着抄理解了下。

然后意识到,真的是学的东西完全不会用,所以决定要努力,从现在开始也不晚。

#include
#include
#include
#include
#include
using namespace std;
struct node{string str;int step;};int vis[1600000];
queue que; 
int n;
string s;
int judge(string s)
{if(s.find("2012")!=-1)return 1;return 0;
}
int getnum(string s)
{int x=0;for(int i=0;i>s;//cout<