随笔分类 - B---C++容器
摘要:六大部件 容器结构分类 序列式容器 Array Vector Deque List FOrward-list 关联式容器 有序容器 Set/Multiset Map/Multimap 不定序容器 Unordered Set/MultiSet Unordered Map/Multimap
阅读全文
摘要:std::accumulate(std::begin(x), std::end(x), string(), [](string &ss, string &s){return ss.empty() ? s : ss + " " + s;}) ss是初始值 string(),相当于上一个值 s为当前遍历
阅读全文
摘要:class Solution { public: vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { // vector<int> ans; // int nlen1 = nums1.size(), nlen2 = n
阅读全文
摘要:# coding=utf-8 """PyTorch RoBERTa model. """ import math import warnings import fitlog import torch import torch.nn as nn import torch.nn.functional a
阅读全文
摘要:1. 简介 1. 序列式容器: array, vector, deque, list, forward_list 数组 或者 指针实现 2. 关联容器: set, map, multiset, multimap 二叉树 红黑树 O(logn)3. 无顺序容器: unordered_map, unor
阅读全文