字符串的修改——换个思路看问题,思路瞬间明了 摘要:### 惯性思维误区 1:一般来讲,拿到题的瞬间,就会想,emmm,A->B,我要如何实现呢,首先似乎要分几种情况,len(a)>=A来比较方便的求解呢,答案是肯定的,他的核心思想是,我不注…… 题解列表 2022年07月15日 0 点赞 0 评论 596 浏览 评分:0.0
编写题解 1205: 字符串的修改 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100],b[100]; int n1,n2; int x=1…… 题解列表 2022年05月12日 0 点赞 0 评论 721 浏览 评分:0.0
字符串的修改 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#define max(x,y) x>y?x:yint fun(char s1[], char s2…… 题解列表 2022年05月05日 0 点赞 0 评论 543 浏览 评分:0.0
字符串的修改 最少操作数=长字符串长度-最大公共子串长度 摘要:#include <stdio.h> #include <string.h> int main() { char a[1000]; char b[1000]; int k=0; …… 题解列表 2022年04月06日 0 点赞 1 评论 952 浏览 评分:9.9
非乱序,标记数组法 #非乱序**实际上,通过保留相同元素达到最小修改次数,而修改只有增删**```pythonA=input()B=input()tag=[0]*max(len(B),len(A))foriinB:#筛出AB中相同的元素,在A中标记ifiinA:tag[A.index(i)]=1print(tag.cou 题解列表 2022年04月05日 0 点赞 0 评论 658 浏览 评分:0.0
题解 1205: 字符串的修改 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> void swap(char *a, char *b) //将两个字符串互换…… 题解列表 2022年03月21日 0 点赞 0 评论 597 浏览 评分:0.0
C++代码,01背包做法 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;int f[2100][2100];char a[2100],b[2100];in…… 题解列表 2022年03月21日 0 点赞 0 评论 718 浏览 评分:9.9
1205: 字符串的修改(19行c代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> int main() { int count=0,len1,len2; char …… 题解列表 2022年03月09日 0 点赞 2 评论 761 浏览 评分:8.9
1205(C语言)字符串的修改 摘要:解题思路:不够则添加,多了则删除,不同则修改,相同则排开;注意事项:注意字符之间的关系;参考代码:#include <stdio.h> #include <string.h> #include <…… 题解列表 2022年01月12日 0 点赞 0 评论 803 浏览 评分:0.0
如果认为其他的c语言答案有错误的情况,那你进来看看我的 摘要:解题思路: 贪心算法 我的方法是:用a[]的第一开始循环,找与b[]顺序相同 题解列表 2021年12月21日 0 点赞 0 评论 668 浏览 评分:6.0