码迷,mamicode.com
首页 >  
搜索关键字:r语言中的 vector    ( 11651个结果
Codeforces 1295C Obtain The String (二分)
"传送门" 题意: 给两个字符串$s,t$ $z$为一个空串 问对$s$进行多少操作能将$z$变成$t$ 每次操作为,选s的一些字串(可以不连续,但顺序不能乱),让把这个字串加到Z的后面 输出最少操作的次数,如果$z$不能变成$t$,输出 1 思路: 把字符串放入vector,或者二维数组里,因为只 ...
分类:其他好文   时间:2020-02-02 01:31:56    阅读次数:68
Connections in Galaxy War ZOJ - 3261 离线操作+逆序并查集 并查集删边
#include<iostream> #include<cstring> #include<stdio.h> #include<map> #include<vector> #define cle(a) memset(a,0,sizeof(a)) using namespace std; const ...
分类:其他好文   时间:2020-02-02 01:29:08    阅读次数:66
Codeforces 1295B Infinite Prefixes
"传送门" 题意: 给两个整数n,x; 然后一行长度为n的01字符串s t字符串为s的无限循环构成 $t=ssssss$ $cnt_0,q?cnt _1,q$等于q字符串中0的个数减去1的个数 问有多少可能的t的前缀子串的$cnt_0,q?cnt _1,q$==x 如果有无限个输出 1 思路: $1 ...
分类:其他好文   时间:2020-02-02 01:11:36    阅读次数:69
最短路 dijkstra()
1 #include<bits/stdc++.h> 2 #include<vector> 3 #include<queue> 4 using namespace std; 5 6 const int inf = 0x3f3f3f3f; 7 const int num = ???; 8 struct ...
分类:其他好文   时间:2020-02-01 20:57:40    阅读次数:50
Leetcode 312. Burst Balloons
题目链接 Code: 1 class Solution { 2 public: 3 int maxCoins(vector<int>& nums) { 4 vector<int> arr; 5 arr.push_back(1); 6 for(int i:nums){ 7 arr.push_back( ...
分类:其他好文   时间:2020-02-01 16:44:57    阅读次数:56
HDU - 2018 :递推
http://acm.hdu.edu.cn/showproblem.php?pid=2018 #include <stdio.h> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <a ...
分类:其他好文   时间:2020-02-01 16:38:13    阅读次数:83
HDU - 超级楼梯
http://acm.hdu.edu.cn/showproblem.php?pid=2041 #include <stdio.h> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <a ...
分类:其他好文   时间:2020-02-01 16:25:41    阅读次数:77
HDU - 一只小蜜蜂 :递推
http://acm.hdu.edu.cn/showproblem.php?pid=2044 #include <stdio.h> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <a ...
分类:其他好文   时间:2020-02-01 16:17:05    阅读次数:64
序列式容器
[toc] 容器结构分类 这里的衍生,并非继承关系,而是一种包含关系。 例如heap中包含一个vector。 通过萃取机traits萃取迭代器的型别 容器list list在要内存时,不光需要一个指针,还需要指向前后的两个指针。 list的定义 list的node定义 G2.9编译器的设计是如下所示 ...
分类:其他好文   时间:2020-02-01 14:51:31    阅读次数:90
数据结构c++实现——线性表
通过vector实现一个简单的线性表 #include <iostream> #include <cstring> template <typename Type> class Vector { private: int size, length; Type *data; public: Vecto ...
分类:编程语言   时间:2020-02-01 12:59:19    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!