码迷,mamicode.com
首页 >  
搜索关键字:vector    ( 11651个结果
拉格朗日插值模板题 luoguP4871
"学习博客" ...
分类:其他好文   时间:2020-04-26 10:49:42    阅读次数:52
198.打家劫舍
题目描述: 你是一个专业的小偷,计划偷窃沿街的房屋。每间房内都藏有一定的现金,影响你偷窃的唯一制约因素就是相邻的房屋装有相互连通的防盗系统,如果两间相邻的房屋在同一晚上被小偷闯入,系统会自动报警。 给定一个代表每个房屋存放金额的非负整数数组,计算你在不触动警报装置的情况下,能够偷窃到的最高金额。 示 ...
分类:其他好文   时间:2020-04-26 01:49:09    阅读次数:77
CopyOnWriteArrayList应用场景
在 CopyOnWriteArrayList 出现之前,我们已经有了 ArrayList 和 LinkedList 作为 List 的数组和链表的实现,而且也有了线程安全的 Vector 和 Collections.synchronizedList() 可以使用。所以首先就让我们来看下线程安全的 V ...
分类:其他好文   时间:2020-04-25 19:30:12    阅读次数:50
hdu4841_圆桌问题
1 //#include<bits/stdc++.h> 2 #include<iostream> 3 #include<vector> 4 using namespace std; 5 int main(){ 6 vector<int>table; //模拟一个圆桌 7 int n,m; 8 whi ...
分类:其他好文   时间:2020-04-25 13:02:35    阅读次数:56
LeetCode 46. 全排列
问题描述:给定一个 没有重复 数字的序列,返回其所有可能的全排列。 class Solution { public: void PT(vector<vector<int>>& res, const vector<int>& nums, vector<bool>& num, vector<int>& ...
分类:其他好文   时间:2020-04-25 10:43:32    阅读次数:64
大数计算求(3^n+1)/2
#include <iostream> #include <vector> using namespace std; const int MAX_LEN = 10000; int main() { int n = 0; //3^n的最大位数是:10000,乘一次3就加一位 while (cin >> ...
分类:其他好文   时间:2020-04-25 01:05:33    阅读次数:69
第11章 支撑向量机SVM
Support Vector Machine , 问题:如果决策边界不唯一 , , , , , , , , s.t.(such that) ...
分类:其他好文   时间:2020-04-24 21:34:04    阅读次数:77
力扣第1248题 统计「优美子数组」
力扣第1248题 统计「优美子数组」 ...
分类:编程语言   时间:2020-04-24 01:51:07    阅读次数:72
【程序员面试金典】面试题 08.11. 硬币
题目 硬币。给定数量不限的硬币,币值为25分、10分、5分和1分,编写代码计算n分有几种表示法。(结果可能会很大,你需要将结果模上1000000007) 示例1: 示例2: 说明: 你可以假设:0 coins = {25, 10, 5, 1}; vector dp(n + 1); dp[0] = 1 ...
分类:其他好文   时间:2020-04-23 22:57:27    阅读次数:69
set相关操作总结(待续)
//一些和vector,list类似的操作就没有总结#include <set> #include <list> #include <iostream> using namespace std; void count_set(const set<int> &set1, const set<int> ...
分类:其他好文   时间:2020-04-23 13:47:44    阅读次数:66
11651条   上一页 1 ... 81 82 83 84 85 ... 1166 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!