ICode9

精准搜索请尝试: 精确搜索
  • 《2022牛客寒假算法基础集训营3》2022-01-30 09:02:05

    C:首先我们可以知道重量为1的方案数就是重量为2的物品的数量,因为只有2 / 2 = 1可以影响它。 那么如果我们从小到大迭代的话,对于当前位置i,只能赋值2 * i才能影响当前位置,那么如果当前方案数的差为d,那么就还需要放d个2 * i。 这里要注意的是差值可能为负数。 #include<bits/stdc++.

  • leetcode 每日一题 851喧闹和富有2021-12-15 15:33:59

    思路,将题中给的数据转化为一棵树,越穷的在上面,一定比其富有的则是在其下方,找答案就是向下遍历一遍就是了。 class Solution { public: struct human{ int q; int mostQuiet = -1; int mostQuietIndex = -1; vector <int> richer1; };

  • 《数据结构汇总》2021-09-26 14:02:54

    闭关。   P2234 [HNOI2002]营业额统计 // Author: levil #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef pair<int,int> pii; const int N = 2e5 + 5; const int M = 2e4 + 5; const double eps = 1e-10

  • 复杂树形DP 题解2021-01-13 20:03:28

    复杂树形DP 题解 Analysis优化狂魔: d p [ x

  • spring删除父节点及其所有子节点2019-08-28 21:07:58

    service public void deleteCategoriesById(Long id,Long pid) { //获取对象 Category category1 = this.categoryMapper.selectByPrimaryKey(id); //创建子对象的id的列表 List<Long> sons = new ArrayList<>(); //创建中间列

  • Splay的初步学习2019-03-31 17:40:09

    具体是啥,qwq 有时间再补吧,贴一下代码; #include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<cstring>#define MAXN 10086666using namespace std;int f[MAXN],cnt[MAXN],value[MAXN];int sons[MAXN][2],sub_size[MAXN];int ro

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有