摘要: 数位DP(上) 357. 统计各位数字都不同的数字个数 using namespace std; class Solution { public: int countNumbersWithUniqueDigits(int n) { if (n == 0) return 1; int res = 10 阅读全文
posted @ 2025-05-12 23:45 n1ce2cv 阅读(4) 评论(0) 推荐(1)
摘要: 状压DP(下) 1434. 每个人戴不同帽子的方案数 #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int MOD = 1e9 + 7; 阅读全文
posted @ 2025-05-12 15:47 n1ce2cv 阅读(5) 评论(0) 推荐(0)
摘要: 状压DP(上) 464. 我能赢吗 #include <iostream> #include <vector> using namespace std; class Solution { public: bool canIWin(int n, int m) { if (m == 0) return 阅读全文
posted @ 2025-05-12 01:15 n1ce2cv 阅读(5) 评论(0) 推荐(1)