题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0118 题意:给定一个矩阵,同类字符相连的为一个块,问总共有几个块. 输入:h,w(行和列)0 <= h <= 100,0 <= w <= 100 矩阵 输入包含多组用例,以0,0结束. 输出:块数. 代码: #include <iostream> using namespace std; typedef long long ll; #defin…
题目描述: Limak is a little polar bear. He has recently learnt about the binary system. He noticed that the passing year has exactly one zero in its representation in the binary system — 201510 = 111110111112. Note that he doesn't care about the number o…