中序遍歷序列 北郵機試

本題無需建樹,因爲二叉排序樹的中序遍歷恰好是一個非遞減數列。 #include<bits/stdc++.h> using namespace std; int main() { int t,n; cin>>t; while(t--) { bool b=true; int a[405]; cin>>n; if(n==1){ cin>>n; cout<<"Yes"<
相關文章
相關標籤/搜索