11 2022 档案

摘要:#include<iostream> #include<vector> #include<string> using namespace std; // 处理模式串,每一个位置都赋值为已匹配的位数 vector<int> next_pos(string pattern){ //初始化next vec 阅读全文
posted @ 2022-11-27 01:04 danieldai 阅读(110) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; // 辗转相除法求最大公约数, 用大的模小的,然后用除数模余数,该接口在新版的C++17的numeric 包中也有 int gcd1(int a ,int b ){ if(a>b){ while(a%b != 0 ){ 阅读全文
posted @ 2022-11-12 03:20 danieldai 阅读(60) 评论(0) 推荐(0) 编辑