摘要:
include<bits/stdc++.h> define endl '\n' using namespace std; typedef long long ll; typedef pair<ll,ll> pll; vector v; vector tree; unordered_map<ll,pl 阅读全文
posted @ 2026-05-26 19:33
snyxz
阅读(4)
评论(0)
推荐(0)
摘要:
//本题可以辅助理解前中后序遍历,前后遍历强调了根的位置,中序遍历强调了子树位置 //仅有前后遍历,无法构造确定的树,比如前序AB,后序BA,根都是A但B无法确定在哪个树上 //故如果要找树可能的形态就要找形如以上形式的个数,这是造成差异的原因 include <bits/stdc++.h> def 阅读全文
posted @ 2026-05-26 19:33
snyxz
阅读(3)
评论(0)
推荐(0)
摘要:
include <bits/stdc++.h> define endl '\n' using namespace std; typedef long long ll; typedef pair<char,char> pll; unordered_map<char,pll> mp; void fid( 阅读全文
posted @ 2026-05-26 19:33
snyxz
阅读(3)
评论(0)
推荐(0)
摘要:
include <bits/stdc++.h> define endl '\n' using namespace std; typedef long long ll; void fid(string fr,string be){ if(fr.size()>0){ char root=be.back( 阅读全文
posted @ 2026-05-26 19:33
snyxz
阅读(4)
评论(0)
推荐(0)
摘要:
include <bits/stdc++.h> define endl '\n' using namespace std; typedef long long ll; ll len; string ans; vector num; ll kuai(ll a,ll b){ ll ans=1; whil 阅读全文
posted @ 2026-05-26 10:08
snyxz
阅读(4)
评论(0)
推荐(0)
摘要:
include <bits/stdc++.h> define endl '\n' using namespace std; typedef long long ll; bool solve(){ ll n; cin>>n; string str; cin>>str; sort(str.begin() 阅读全文
posted @ 2026-05-26 10:07
snyxz
阅读(4)
评论(0)
推荐(0)
摘要:
//能按照树构建的顺序计算出ans的确没想到 //string类不存在访问到边界以外的位置导致内存错误 include <bits/stdc++.h> define endl '\n' using namespace std; typedef long long ll; int main(){ st 阅读全文
posted @ 2026-05-26 10:07
snyxz
阅读(3)
评论(0)
推荐(0)

浙公网安备 33010602011771号