摘要:
和相同的二元子数组 题目大意,就是求这个数组中和为k的子数组的个数 解题思路1:哈希map法 class Solution { public: int numSubarraysWithSum(vector<int>& nums, int goal) { int n=nums.size(); unor 阅读全文
摘要:
lc 2537. 统计好子数组的数目 code class Solution { public: long long countGood(vector<int>& nums, int k) { long long ans = 0; unordered_map<int, int> cnt; int p 阅读全文
摘要:
[原题链接(https://atcoder.jp/contests/dp/tasks/dp_j)] code #include<bits/stdc++.h> using namespace std; //"O campeão tem nome, e se chama Charles Oliveira 阅读全文
摘要:
atcoder dp 题单 中的LCS (https://atcoder.jp/contests/dp/tasks) code #include<bits/stdc++.h> using namespace std; //"O campeão tem nome, e se chama Charles 阅读全文