摘要: 题意 给你n m的棋盘问有多少个矩形 分析 先看只有一行或一列的情况有1+2+....+n个,因为矩形的类型有1个最小单位格子n个,2个最小单位格子n 1个,n个最小单位格子有一个 code include using namespace std; int main() { int t,m,n,a, 阅读全文
posted @ 2018-10-18 23:49 ChunhaoMo 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题意 算第n项,f(1) = 1, f(2) = 1, f(n) = (A f(n 1) + B f(n 2)) mod 7. 分析 可能的情况0,1,2,3,4,5,6,f(n 1),f(n 2) 所以f(n)最多有49种方案有f(n 1),f(n 2)得来 最大循环节49,n%49即可 code 阅读全文
posted @ 2018-10-18 23:32 ChunhaoMo 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 题意 给你公式seed(x+1) = [seed(x) + STEP] % MOD ,输入step和mod, 问你是否可以从第一项0,算到mod,它们是否都不同 是 good choice 否则 bad choice 分析 枚举过去 code include include include incl 阅读全文
posted @ 2018-10-18 23:27 ChunhaoMo 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题意 给你大写字母的字符串,A=1,...Z=26,以及target 问你是否有v w^2 + x^3 y^4 + z^5 = target 有输出字典序大的那个字符串 分析 dfs code include include include include include using namespa 阅读全文
posted @ 2018-10-18 23:20 ChunhaoMo 阅读(135) 评论(0) 推荐(0) 编辑