码迷,mamicode.com
首页 >  
搜索关键字:spiral matrix ii    ( 10674个结果
矩形脉冲性质
矩形脉冲在实际应用中十分常见,数字信号可以看做是上下跳变沿构成的很多矩形脉冲串,脉冲雷达也以周期矩形脉冲作为发射信号。 假设周期矩形脉冲信号为$f(t)$,如下图所示 $f(t)$的数学表达式可以写成 \[ f(t) = \{ \begin{matrix} E& nT-\frac{\tau}{2}< ...
分类:其他好文   时间:2020-06-03 00:51:05    阅读次数:264
Codeforces Round #646 (Div. 2) E. Tree Shuffling(贪心/树形DP)
Ashish has a tree consisting of nn nodes numbered 11 to nn rooted at node 11 . The ii -th node in the tree has a cost aiai , and binary digit bibi is ...
分类:其他好文   时间:2020-06-01 23:55:59    阅读次数:100
LeetCode--买卖股票的最佳时机 II
题目 给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。设计一个算法来计算你所能获取的最大利润。你可以尽可能地完成更多的交易(多次买卖一支股票)。 注意:你不能同时参与多笔交易(你必须在再次购买前出售掉之前的股票)。 示例 1:输入: [7,1,5,3,6,4]输出: 7 解释: 在第 ...
分类:其他好文   时间:2020-06-01 21:08:41    阅读次数:110
freetype2 abg
/* example1.c */ /* */ /* This small program shows how to print a rotated string with the */ /* FreeType 2 library. */ #include <stdio.h> #include <st ...
分类:其他好文   时间:2020-06-01 20:50:42    阅读次数:54
01背包问题总结
背包问题 Title 组合问题 True、False问题 最大最小问题 题目 377. 组合总和 Ⅳ 494. 目标和 518. 零钱兑换 II 139.单词拆分416. 分割等和子集 474. 一和零322.零钱兑换 公式 dp[i] += dp[i-num] dp[i] = dp[i] or d ...
分类:其他好文   时间:2020-06-01 13:53:17    阅读次数:53
LeetCode——零钱兑换 II
Q:给定不同面额的硬币和一个总金额。写出函数来计算可以凑成总金额的硬币组合数。假设每一种面额的硬币有无限个。 示例 1: 输入: amount = 5, coins = [1, 2, 5] 输出: 4 解释: 有四种方式可以凑成总金额: 5=5 5=2+2+1 5=2+1+1+1 5=1+1+1+1 ...
分类:其他好文   时间:2020-06-01 13:36:37    阅读次数:67
CF1278F Cards
题目传送门 分析: 太!棒!了!学!到!虚!脱! 这里给出$O(K^2),O(KlogK),O(K)$三种解法 $O(K2)$解法 考虑$K$的意义 相当于有一个长度为K的序列,每一个位置是一个独立的游戏,我们假设有$c$次游戏抽出了Joker 抽出Joker的轮次序列为${C_1,C_2...C_ ...
分类:其他好文   时间:2020-05-31 15:51:05    阅读次数:48
[LeetCode] 40. Combination Sum II
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb ...
分类:其他好文   时间:2020-05-31 12:43:12    阅读次数:52
leetcode 每日一题 48. 旋转图像
转置加翻转 思路: 先把矩阵转置,然后把每一行元素翻转。即遍历元素,交换matrix[i][j]和matrix[j][i],然后翻转每一个子数组。 代码: class Solution: def rotate(self, matrix: List[List[int]]) -> None: """ D ...
分类:其他好文   时间:2020-05-30 12:57:18    阅读次数:57
LeetCode 350. 两个数组的交集 II Intersection of Two Arrays II
进阶解法1:排序双指针 class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { sort(nums1.begin(), nums1.end()); sort(nums2.begi ...
分类:编程语言   时间:2020-05-30 01:20:17    阅读次数:70
10674条   上一页 1 ... 41 42 43 44 45 ... 1068 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!