#include #include #include #include #include using namespace std; int d[30][30005]; //d[i][j] i件中,j重量的物品 ,价格最高 int v[30],w[30]; int Max(int a,int b) {... ...
分类:
其他好文 时间:
2018-10-22 22:19:48
阅读次数:
175
#include #include #include #include #include using namespace std; struct HY { int u,v; }hy[10005]; bool cmp(HY a,HY b) { if(a.v == b.v) return a.u>b.u... ...
分类:
其他好文 时间:
2018-10-22 22:15:22
阅读次数:
244
正则表达式是一个查询的字符串,它包含一般的字符和一些特殊的字符,特殊字符可以扩展查找字符串的能力,正则表达式在查找和替换字符串的作用不可忽视,它 能很好提高工作效率。EditPlus的查找,替换,文件中查找支持以下的正则表达式:表达式 说明\t 制表符.\n 新行.. 匹配任意字符.| 匹配表达式左 ...
分类:
其他好文 时间:
2018-10-20 18:29:02
阅读次数:
187
一创建String类型对象的三种方式: 二:==与 .equals()的区别: ==:用于比较数据类型,如果用于比较String类型,则比较的是内存首地址; .equals():用来比较两个字符串是否相等; 三:字符串常用方法: 1.查找字符串的位置: 搜索在字符串中第一个出现的ch或字符串valu ...
分类:
其他好文 时间:
2018-10-18 19:46:01
阅读次数:
145
Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o ...
分类:
其他好文 时间:
2018-10-18 16:51:02
阅读次数:
177
isdigit()#表示字符串是不是数字 replace()#替换字符串中的字符 find()#查找字符串中的索引(就是第几个) strip()#去掉字符串中的空格和换行 center()#以字符串为中心向两边填充 split()#以什么字符为标准变成列表 join()#把列表变成字符串 ...
分类:
其他好文 时间:
2018-10-18 01:05:46
阅读次数:
142
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title></head><body><script> var str = "nininihaoa"; var o = {}; for (var ...
分类:
Web程序 时间:
2018-10-13 02:52:06
阅读次数:
144
编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 示例 2: 说明: 所有输入只包含小写字母 a-z 。 ...
分类:
编程语言 时间:
2018-10-09 13:58:25
阅读次数:
323