ICode9

精准搜索请尝试: 精确搜索
  • [Leetcode Weekly Contest]3072022-08-24 23:33:20

    链接:LeetCode [Leetcode]2383. 赢得比赛需要的最少训练时长 你正在参加一场比赛,给你两个 正 整数 initialEnergy 和 initialExperience 分别表示你的初始精力和初始经验。 另给你两个下标从 0 开始的整数数组 energy 和 experience,长度均为 n 。 你将会 依次 对上 n 个对手。第 i

  • 307 最小生成树 Prim 算法2022-05-28 13:33:47

    视频链接: // Luogu P3366 【模板】最小生成树 #include <iostream> #include <cstring> #include <algorithm> #include <vector> #define inf 1e9 using namespace std; int n,m,a,b,c,ans,cnt; const int N=5010; struct edge{int v,w;}; vector<edge>

  • 307. 区域和检索 - 数组可修改2022-04-04 23:03:40

    https://leetcode-cn.com/problems/range-sum-query-mutable/ 给你一个数组 nums ,请你完成两类查询。 其中一类查询要求 更新 数组nums下标对应的值 另一类查询要求返回数组nums中索引left和索引right之间(包含)的nums元素的 和,其中left <= right 实现 NumArray 类: NumArray(int[] n

  • 【LC】307. Range Sum Query - Mutable 【线段树】【TB】2021-12-08 08:33:51

    Link 题意 分析 单点修改板题。 代码 package main type seg []struct { l, r int val int } func (t seg) pushUp(cur int) { t[cur].val = t[cur<<1].val + t[cur<<1|1].val } // 注意a下标从0开始, 但是l, r从1开始,且线段树下标从1开始 func (t seg) build(a

  • 11月23日总结2021-11-23 21:37:00

    今天干了啥: Python3 环境搭建 打算干啥: Python3 基础语法 代码数:307

  • 307. 区域和检索-数组不可变2021-11-10 14:33:29

    class NumArray { SegmentTree segmentTree; public NumArray(int[] nums) { segmentTree = new SegmentTree(nums); } public void update(int index, int val) { segmentTree.update(index, val); } public int sumRange(int

  • 307,汇总区间2021-06-14 23:04:54

    给定一个无重复元素的有序整数数组,返回数组区间范围的汇总。 示例 1: 输入: [0,1,2,4,5,7] 输出: ["0->2","4->5","7"]解释: 0,1,2 可组成一个连续的区间; 4,5 可组成一个连续的区间。 示例 2: 输入: [0,2,3,4,6,8,9]输出: ["0","2->4","6","8->9"]解释: 2

  • 【学习小结】 CSDN 码龄 307 天 - 40000 访问量2021-06-14 16:59:51

    总结 两个突破: 在同学帮助下成功搭建了自己的网站:https://teddy-van-jerry.org。在摸索中使用 MATLAB。 Emmmm, 太忙啦,再撑两周就活过来了。 GitHub 现状 See also Teddy van Jerry 的导航页

  • LeetCode #307. Range Sum Query - Mutable 数组 线段树2020-04-23 17:51:17

    Description Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by updating the element at index i to val. Example: Given nums = [1, 3, 5] sumRange(0, 2) -> 9

  • R 数据框的操作2019-09-13 20:50:59

    1.插入一列 根据自带数据集beaver 进行操作,比如插入一列id。 > colnames(beaver1)[1] "day" "time" "temp" "activ"> nrow(beaver1)[1] 114  方法1: new_beaver1$id = rep(1,114)  方法2 new_beaver1 = data.frame(id = rep(1,114),beaver1)  

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

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

ICode9版权所有