摘要:
如题,统计PAT出现的个数,注意PAT不一定要相邻,看题目给的例子就知道了。 num1代表目前为止P出现的个数,num12代表目前为止PA出现的个数,num123代表目前为止PAT出现的个数。 遇到P,num1++。 遇到A,那么PA的个数为:前面统计的PA的个数(num12)+前面的P与当前A组成 阅读全文
posted @ 2017-02-10 11:10
辰曦~文若
阅读(277)
评论(0)
推荐(0)
摘要:
题目很简单,就是统计一下每层的节点数,输出节点数最多的个数和对应的层数即可。 #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> using namespace std; const int m 阅读全文
posted @ 2017-02-10 10:52
辰曦~文若
阅读(279)
评论(0)
推荐(0)

浙公网安备 33010602011771号