摘要: 矩阵链乘 #include <iostream> #include<bits/stdc++.h> #include <algorithm> #include <chrono> using namespace std; ofstream file_out, time_out; const int ma 阅读全文
posted @ 2021-12-06 21:49 ayanyuki 阅读(46) 评论(0) 推荐(0)
摘要: 文件输入输出 #include "iostream" #include "vector" #include "string" #include "algorithm" #include "fstream" using namespace std; int main() { vector<std::s 阅读全文
posted @ 2021-12-06 21:45 ayanyuki 阅读(31) 评论(0) 推荐(0)
摘要: Markdown to HTML /* File: Markdown to HTML Author: PB19030888-张舒恒 Time:2021/6/9 Function: 标题,分割线,列表,修饰,图片,链接,锚点,引用,代码,表格,目录,流程图 Compiler: gcc 4.9.2 Co 阅读全文
posted @ 2021-12-06 21:36 ayanyuki 阅读(87) 评论(0) 推荐(0)
摘要: vector容器 #include "iostream" #include "vector" #include "algorithm" using namespace std; void print(vector<int> vec){ vector<int>::iterator iter = vec 阅读全文
posted @ 2021-12-06 21:31 ayanyuki 阅读(75) 评论(0) 推荐(0)
摘要: stack容器 #include<iostream> #include<stack> using namespace std; int main(){ //初始化 stack <int> stk; //入栈 for(int i=0; i<5; i++){ stk.push(i); } cout << 阅读全文
posted @ 2021-12-06 21:12 ayanyuki 阅读(32) 评论(0) 推荐(0)
摘要: queue容器 #include <iostream> #include <queue> using namespace std; int main(){ //初始化 int e,n,m; queue<int> q1; //入队 for(int i=0; i<10; i++) q1.push(i); 阅读全文
posted @ 2021-12-06 21:08 ayanyuki 阅读(39) 评论(0) 推荐(0)
摘要: pair容器 #include "iostream" #include "string" #include <tuple> //std::tie using namespace std; pair<string, int> getPreson() { return make_pair("Sven", 阅读全文
posted @ 2021-12-06 21:02 ayanyuki 阅读(47) 评论(0) 推荐(0)
摘要: map容器 #include <map> #include <string> #include <iostream> using namespace std; int main(){ //初始化map map<int, string> mapStudent; mapStudent.insert(pa 阅读全文
posted @ 2021-12-06 20:52 ayanyuki 阅读(37) 评论(0) 推荐(0)
摘要: 变量最大值及字节数 #include "iostream" #include "climits" int main(){ using namespace std; int n_int = INT_MAX; long long n_llong = LLONG_MAX; cout << "int is 阅读全文
posted @ 2021-12-06 20:43 ayanyuki 阅读(43) 评论(0) 推荐(0)
摘要: 一个简单的例子 #include "iostream" int main(){ using namespace std; int carrots; carrots = 25; cout << "I have "; cout << carrots; cout << " carrots."; cout 阅读全文
posted @ 2021-12-06 20:38 ayanyuki 阅读(28) 评论(0) 推荐(0)