摘要: int main(){ string input; vector<string> arr; while(cin >> input) { cout << "start"<<endl; arr.push_back(input); } cout << arr[arr.size()-1].length() 阅读全文
posted @ 2020-10-02 17:47 goto2091 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 直接找规律。 第一行 0 第二行 01 第三行 0110 第四行 01101001 可以发现,第n行的数量比第n-1行多了一倍,并且前半部分是和第n-1行一样的,后半部分是前半部分“按位取反”得到的。 第n行的字符数量是2^(n-1)个,因此第n-1行的数量就是2^(n-2)个。公式为: func( 阅读全文
posted @ 2020-10-02 15:40 goto2091 阅读(171) 评论(0) 推荐(0) 编辑