码迷,mamicode.com
首页 >  
搜索关键字:combination sum ii    ( 27716个结果
力扣刷题记录(2021.2.9) 剑指 Offer 53 - II. 0~n-1中缺失的数字
题目描述 一个长度为n-1的递增排序数组中的所有数字都是唯一的,并且每个数字都在范围0~n-1之内。在范围0~n-1内的n个数字中有且只有一个数字不在该数组中,请找出这个数字。 示例1 输入: [0,1,3] 输出: 2示例2 输入: [0,1,2,3,4,5,6,7,9] 输出: 8 思路:使用二 ...
分类:其他好文   时间:2021-02-09 12:41:19    阅读次数:0
Hills And Valleys
http://codeforces.com/contest/1467/problem/B 题意 \(一个数列里有波峰波谷\) \(波谷:a[i]<min(a[i+1],a[i-1]])\) \(波峰:a[i]>max(a[i+1],a[i-1])\) \(sum = 波峰数+波谷数\) \(若可以任 ...
分类:其他好文   时间:2021-02-09 12:30:17    阅读次数:0
剑指 Offer 32 - II. 从上到下打印二叉树 II
DFS层次遍历,设置层数n,在node中按层数创建该层的数组,dfs时每层加入该层对应数组。 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNo ...
分类:其他好文   时间:2021-02-09 12:27:15    阅读次数:0
P3973 [TJOI2015]线性代数 最小割
题意: 戳这里 分析: \[ D=\sum_{j=1}^nA_{1,j}\times (\sum_{i=1}^nA_{1,i}B_{i,j}-C_{1,j}) \] 我们观察式子可以发现 \(B_{i,j}\) 会被选当且仅当 \(A_{1,i},A_{1,j}\) 都为 1,\(-C_{1,j}\ ...
分类:其他好文   时间:2021-02-09 11:54:55    阅读次数:0
2020 BIT冬训-模拟与暴力 O - The Answer to the Ultimate Question of Life, The Universe, and Everything. 计蒜客 - 42545
Problem Description For decades, scientists have wondered whether each of the numbers from 0 to 100 could be represented as the sum of three cubes, wh ...
分类:其他好文   时间:2021-02-08 12:44:17    阅读次数:0
February Challenge 2021 Division 1
Team Name(2.5) Prime Game(2.6) XOR Sums(2.7) Another Tree with Number Theory Multiple Games Cell Shell Bash Matrix Dream and the Multiverse Cut the Ca ...
分类:其他好文   时间:2021-02-08 12:12:42    阅读次数:0
多线程详解
1.三个多线程可能引起的问题 package other; public class UnSafeTicker implements Runnable { private int ticket=10; boolean flag=true; @Override public void run() { ...
分类:编程语言   时间:2021-02-08 12:09:22    阅读次数:0
P3708 koishi的数学题
题目链接 题意分析 \(\sum_{i=1}^nx\%i=\sum_{i=1}^n(x-\lfloor\frac{x}{i}\rfloor i)=nx-\sum_{i=1}^n\lfloor\frac{x}{i}\rfloor i\) 想到了整除分块 这样的话复杂度$O(n\sqrt)$ 但是由于$ ...
分类:其他好文   时间:2021-02-05 10:33:30    阅读次数:0
leetcode643.滑动窗口例题
643 of leetcode class Solution { public: double findMaxAverage(vector<int>& nums, int k) { double len=nums.size(); double sum_now=0; double sum_max=0; ...
分类:其他好文   时间:2021-02-04 12:24:48    阅读次数:0
sql group by sum
1.表字段如下图,要求:分区计算总处数,总面积,已处理数,已处理面积,未处理数,未处理面积 2.计算结果如下: 3.sql如下:知识点:sum后的case可以根据A列状态,来计算B列的值。 sum(case when sfcl='否'then mjm else 0 end) wcltbmj 1 se ...
分类:数据库   时间:2021-02-04 11:42:00    阅读次数:0
27716条   上一页 1 ... 31 32 33 34 35 ... 2772 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!