05 2021 档案
摘要:链接:https://www.acwing.com/problem/content/description/3420/ 思路: 1:通过分析题目,本题是一个三进制枚举后取正整数的题目,如果直接dfs进行枚举,则时间复杂度为O(3^n),n<=100,时间复杂度不满足条件,但是题目中强调N个砝码总重不
阅读全文
摘要:链接:https://www.acwing.com/problem/content/3419/ 代码: #include<bits/stdc++.h> #define intl long long using namespace std; int main (){ intl num; cin>>nu
阅读全文