摘要: "题目描述" 思路 代码 c++ include include include include const int MAX = 8e4 + 5, mod = 1e6; int n, m, inf = 0x3f3f3f3f; int ans, rt, tot; bool flag; struct N 阅读全文
posted @ 2019-09-18 22:39 cabbage-leaf 阅读(194) 评论(0) 推荐(0) 编辑
摘要: "题目描述" 思路 代码 c++ include include include include define min(a, b) ((a) = 2) cnt(r) , size(r) ; else if (!lc(r) || !rc(r)) r = lc(r) + rc(r); else if ( 阅读全文
posted @ 2019-09-18 17:11 cabbage-leaf 阅读(243) 评论(0) 推荐(0) 编辑
摘要: ``` 和$(ls /etc) 是两种获取命令执行结果的方式。 for file in List 的语法里面的List 就是使用使用ls /etc 的命令执行结果作为List(https://www.shiyanlou.com/questions/59195/) shell !/bin/bash f 阅读全文
posted @ 2019-09-18 10:26 cabbage-leaf 阅读(215) 评论(0) 推荐(0) 编辑
摘要: "题目描述" 思路 尽量不要直接使用getchar得到单个字符,容易出现runtime error, 可以使用scanf("%s", str), 直接判断str[0]是否是对应字符就可以了。 代码 c++ include include define lc k '9') { if (ch == ' 阅读全文
posted @ 2019-09-18 10:07 cabbage-leaf 阅读(123) 评论(0) 推荐(0) 编辑