AtCoder Beginner Contest 216 D - Pair of Balls 大模拟
D参考dfs那里很妙:队列i和local成对子,一起pop后要继续搜loca,因为i在退出dfs后会继续在while里判断,如果还有又进dfs;#includeusingnamespacestd;typedeflonglongll;typedefpairpii;#definepbpush_back#definefifirst#definesesecond#definemem(a,x)memset(