UVA297 四分树 Quadtrees
题目描述输入3ppeeefpffeefepefepeefepeeefpeefepeeefpeepefefe输出There are 640 black pixels.There are 512 black pixels.There are 384 black pixels.思路:二叉树+模拟 给出了先序顺序,根据先序把二叉树用图表示出来,两个图相加,统计黑色小块的个数.参考代码#include<bits/stdc++.h>using namespace std