08 2019 档案

摘要:数组二分查找 #include<iostream> using namespace std; template <typename T> int binary_search_array(const T& key,const T data[],int N) { if(N<0) return -1; i 阅读全文
posted @ 2019-08-30 09:45 Wangtn 阅读(267) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<vector> #include<algorithm> #include<string> using namespace std; int main() { const int N=5; string a[N]={"www","algorith 阅读全文
posted @ 2019-08-29 17:34 Wangtn 阅读(256) 评论(0) 推荐(0) 编辑
摘要:对于一个(n,n)大小的矩阵,使得对角线上的元素全为x,其他元素都是y #include<iostream> #include<vector> using namespace std; int main() { const int n=20; int x=4; int y=2; int M[n][n 阅读全文
posted @ 2019-08-28 17:43 Wangtn 阅读(227) 评论(0) 推荐(0) 编辑
摘要:字符串操作 #include<iostream> #include<string> using namespace std; int main() { string name; cin>>name; cout<<"Hello ,"<<name<<endl; cout<<name.size()<<en 阅读全文
posted @ 2019-08-28 16:56 Wangtn 阅读(335) 评论(0) 推荐(0) 编辑
摘要:一般是Input和下面的变量重名了,导致model里面的input变成了第二次出现的Input变量,而不是最开始模型中作为输入的Input变量 改正方法:给第二个变量赋一个新名字即可 阅读全文
posted @ 2019-08-08 14:55 Wangtn 阅读(7226) 评论(4) 推荐(1) 编辑

点击右上角即可分享
微信分享提示