字符串
wwt9b15bs
这个作者很懒,什么都没留下…
展开
-
【题解】洛谷P1498南蛮图腾 分治+字符串
题目链接 大佬博客的字符串操作非常简洁,学习了。 另一个大佬博客 又一个大佬博客非常详细的讲解了字符串操作 #include<iostream> using namespace std; #define _for(i,a,b) for(int i=(a);i<(b);i++) string str[2010]; inline void work(int x) { ...原创 2018-09-02 06:53:55 · 414 阅读 · 0 评论 -
【题解】洛谷P1603斯诺登的密码 字符串+map+打表
题目链接 直接打表吧…… #include<cstdio> #include<iostream> #include<map> #include<algorithm> using namespace std; typedef long long ll; #define _rep(i,a,b) for(int i=(a);i&am原创 2018-09-03 06:15:20 · 365 阅读 · 0 评论 -
【题解】洛谷P1071潜伏者[NOIP2009T1] 字符串+模拟
题目链接 #include<cstdio> #include<cstring> #define _rep(i,a,b) for(int i=(a);i<=(b);i++) char a[110],b[110],c[110]; int from[510],to[510]; int main() { //freopen("in.txt",&quo原创 2018-09-02 06:55:07 · 271 阅读 · 0 评论 -
【题解】洛谷P1012拼数[NOIP1998] 字符串+排序
题目链接 乍一看还有点唬人……结果简单的一批 #include<cstdio> #include<iostream> #include<algorithm> using namespace std; #define _rep(i,a,b) for(int i=(a);i<=(b);i++) string str[25]; bool cmp(stri原创 2018-09-03 06:15:26 · 262 阅读 · 0 评论 -
【题解】洛谷P1781宇宙总统 字符串+排序
题目链接 用stl进行字符串排序,注意比较函数先比长度再比大小 #include<cstdio> #include<iostream> #include<string> #include<algorithm> using namespace std; #define _rep(i,a,b) for(int i=(a);i&am原创 2018-08-31 07:47:07 · 429 阅读 · 0 评论 -
【题解】洛谷P1538迎春舞会之数字舞蹈 字符串+打表
题目链接 好毒瘤的题……学习了大佬题解 这种毒瘤题老是做不来 #include<cstdio> #include<iostream> using namespace std; string str[10]={"-|| ||-"," | | ","- |转载 2018-09-03 06:15:34 · 240 阅读 · 0 评论 -
【题解】洛谷P1026[NOIP2001]统计单词个数 区间DP+字符串
题目链接 参考了大佬题解中string的基操 #include<cstdio> #include<iostream> using namespace std; string str,ch,word[10]; int p,k,s,sum[510][510],dp[510][50]; bool Find(int l,int r) { string aim=str.sub...转载 2018-10-15 09:21:32 · 213 阅读 · 0 评论 -
【题解】洛谷P1032[NOIP2002]字串变换 字符串+bfs
题目链接 参考了大佬题解。 安利大佬博客,好感动惹qwq #include<cstdio> #include<iostream> #include<queue> #include<map> using namespace std; string a,b,st[10],ed[10]; int cnt; map<string,int>m...原创 2018-10-21 21:14:19 · 289 阅读 · 0 评论