摘要:
0-1背包 题目链接:https://www.acwing.com/problem/content/2/ 思路 实现 #include <iostream> using namespace std; const int N = 1010; int dp[N][N]; int V[N]; int W[ 阅读全文
posted @ 2020-08-20 11:36
NaughtyCoder
阅读(86)
评论(0)
推荐(0)
摘要:
题目链接:https://leetcode-cn.com/problems/subarray-sum-equals-k/ 前缀和 + 枚举 class Solution { public: int subarraySum(vector<int>& nums, int k) { int n = num 阅读全文
posted @ 2020-08-20 10:41
NaughtyCoder
阅读(84)
评论(0)
推荐(0)

浙公网安备 33010602011771号