indexOf() 方法有以下四种形式: public int indexOf(int ch): 返回指定字符在字符串中第一次出现处的索引,如果此字符串中没有这样的字符,则返回 -1。 public int indexOf(int ch, int fromIndex): 返回从 fromIndex ...
分类:
编程语言 时间:
2019-09-02 18:51:48
阅读次数:
80
描述:给定一张 n(n≤20) 个点的带权无向图,点从 0~n-1 标号,求起点 0 到终点 n-1 的最短Hamilton路径。 Hamilton路径的定义是从 0 到 n-1 不重不漏地经过每个点恰好一次。输入格式:第一行一个整数n。接下来n行每行n个整数,其中第i行第j个整数表示点i到j的距离 ...
分类:
其他好文 时间:
2019-09-02 15:40:59
阅读次数:
84
watch ch 和cpmpute的区别: 1.watch 表示监听某个模型变量的状态变化。watch监视的东西多一些,computed所依赖的东西都写在一个函数里。 2.特殊场景:如果业务出现了异步操作(回调函数)则这个时候computed是存在返回值,不能在使用,但是watch里面的没有返回值的 ...
分类:
Web程序 时间:
2019-08-29 21:36:48
阅读次数:
131
1 题目描述 在一个字符串(0<=字符串长度<=10000,全部由字母组成)中找到第一个只出现一次的字符,并返回它的位置, 如果没有则返回 -1(需要区分大小写)。 2 思路和方法 ch[str[i]]++; if(ch[str[i]]==1) return i; 3 C++核心代码 1 class ...
分类:
其他好文 时间:
2019-08-27 22:44:29
阅读次数:
70
题目大意:给出一个连通的有向图,求图中顶点1到顶点n的、经过其余顶点一次且仅一次的最短路径及其长度。 解题报告: 考虑到重边,用邻接矩阵判重,稀疏图dfs时用邻接表,省时又给力! AC代码: 1 #include<bits/stdc++.h> 2 #define numm ch-48 3 #defi ...
分类:
其他好文 时间:
2019-08-27 21:25:41
阅读次数:
90
Matlab codes for Forward Kinematics of serial robot with PoE space form and body form formula. ...
分类:
其他好文 时间:
2019-08-26 09:26:15
阅读次数:
92
#include using namespace std; int n,t,m; int main() { } int read() { int ans=0,flg=1; char ch=getchar(); while(ch'9'){if(ch=='-')flg=-1;ch=getchar();}... ...
分类:
其他好文 时间:
2019-08-24 15:09:37
阅读次数:
70
鉴于水平有限,可能会有问题。 cpp include using namespace std; typedef long long ll; define ls ch[id][0] define rs ch[id][1] const int INF = 1e9; const int MAXN = 10 ...
分类:
其他好文 时间:
2019-08-24 09:54:30
阅读次数:
66
学完字典树后 还是背不住模板…………介绍写在代码里———— struct Trie{ ll ch[N][26],sz,val[N]; //val为附加信息 //这里的ch数组,第二维的大小为26是因为字符串只由小写字母构成,第二维的大小一般是由字符串的组成决定 //sz即为节点编号 Trie(){ ... ...
分类:
其他好文 时间:
2019-08-24 09:34:59
阅读次数:
75
show显示动画 hide隐藏动画 【实例】实现点击按钮显示盒子,再点击按钮隐藏盒子 1 <!DOCTYPE html> 2 <html lang="zh-ch"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>盒子的显示与隐藏</title> 6 <scri ...
分类:
Web程序 时间:
2019-08-23 22:35:59
阅读次数:
151