【洛谷P5018 對稱二叉樹】

話說這圖也太大了吧 這題十分的簡單,咱們能夠用兩個指針指向左右兩個對稱的東西,而後比較就好了html 複雜度O(n*logn)c++ #include<bits/stdc++.h> using namespace std; inline int read() { int X=0,w=1; char c=getchar(); while(c<'0'||c>'9') {
相關文章
相關標籤/搜索