随笔分类 - 深度优先遍历
摘要:分析:搜索,每个数字分选与不选两种情况。 #include <iostream> using namespace std; int k; int a[22]; int n; bool is_ok(int x,int sum) { if(x==n) return sum==k; return is_o
阅读全文
摘要:1042 数字0-9的数量 基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 收藏 关注 取消关注 1042 数字0-9的数量 基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 1042 数字0-9的数量 基准时间限制:1 秒 空间
阅读全文
摘要:Sum It Up Problem Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t.
阅读全文
摘要:Additive equations Problem Description We all understand that an integer set is a collection of distinct integers. Now the question is: given an integ
阅读全文
浙公网安备 33010602011771号