随笔分类 - 搜索(BFS DFS)
摘要:二分图判定给定一个图,要给图上每个顶点染色,并且要使得相邻的顶点颜色不同。问是否能最多用2种颜色进行染色?参考如下:Source Code:#include #include using namespace std;vector Edge[1010];int colorArr[1010];void ...
阅读全文
摘要:Lake CountingDescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (...
阅读全文

浙公网安备 33010602011771号