avatar
Articles
24
Tags
14
Categories
0

主页
Archives
标签
分类
留言
其他
  • 友情链接
  • 关于
INWF
Search
主页
Archives
标签
分类
留言
其他
  • 友情链接
  • 关于

INWF

高精度加法
Created2023-03-23
高精度加法使用数组存储每个数字的每个位数,对于两个输入的超长整数字符串,程序能够在逐位相加时实现进位。最后将结果再次转化为字符串输出。 代码实现12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#include<iostream> #include<cstring>using namespace std;/* 将两个字符串翻转存储到数组中 */void rev(int fir[], int sec[], string a, string b) { for(int i = 0; i < a.length(); i++) { // 将第一个字符串翻转存储到 fir 数组中 fir[i] = a[a.length() - i - 1] - '0'; } ...
KMP算法
Created2023-03-17
KMP算法KMP算法是一种用于在字符串匹配过程中提高匹配效率的算法,被广泛应用于字符串匹配和文本搜索领域。通过预处理模式串的next数组,以减少匹配的次数,从而优化算法效率。 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#include<iostream>#include<cstring>using namespace std;//KMP算法主体int index(string S,string T,int next[]){ int i,j; for(i=1,j=1;i<S.length()&&j<T.length();) { if(S[i]==T[j]||j==0)//字符匹配或者T串已经退到第一个位置 { i++; ...
MyFirstBlog
Created2023-03-16
Hello World
Created2023-03-16
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment
123
avatar
INWF
任何一个伟大的目标
都有一个微不足道的开始
Articles
24
Tags
14
Categories
0
Follow Me
Announcement
This is my Blog
Recent Post
学习一下LCA算法2024-07-30
边缘人2024-04-28
零门槛打造个人图床:感谢Telegraph-Image2024-03-17
Codeforces Round 920 (Div.3)D、E题解2024-01-17
Python快速入门2023-10-18
Tags
背包 数据结构 Python KMP算法 Better Input LCA 开发 插件 算法 笔记 任何一个伟大的目标,都有一个微不足道的开始 高精度 题解 图床
Archives
  • July 20241
  • April 20241
  • March 20241
  • January 20241
  • October 20232
  • September 20235
  • August 20233
  • July 20232
Info
Article :
24
UV :
PV :
Last Push :
©2020 - 2025 By INWF
Don't let yesterday take up too much of today.
Search
Loading the Database