如果是用搜索,还存了连接上下表面的点。注意底面的点可能同时也连接了上表面
for(auto st:bot) { if(( !v[st]&&dfs(st) )||tp[st]) //tp[st] { cout<<"Yes"<<'\n'; flag=1; break; } }