摘要:
这道题也当做二叉搜索树的建树模板。 这道题其实直接把这颗树建出来后,比较前序序列和中序序列即可,这里我用的数组实现,更好写和查错qwq。 code: #include <bits/stdc++.h> using namespace std; int n , len; string a , b , c 阅读全文
摘要:
这道题还是挺水的,广搜模板题,注意一下细节就是了。 :码代上上代码: #include <bits/stdc++.h> using namespace std; int n , m , sx , sy , ans = -1; int dx[] = {1 , 0 , -1 , 0} , dy[] = 阅读全文