一二三四五 上山打老虎

05 2021 档案

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

点击右上角即可分享
微信分享提示