首页
DreamJudge
院校信息
考研初试
机试真题
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
xddddddddddddd
2025年3月10日 13:07
删除字符串2 题解:考虑是否出现新组合,KMP
P1027
回复 0
|
赞 1
|
浏览 317
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; void getNext(const string& pattern, vector<int>& next) { int len = pattern.length(); int k = -1, j = 0; &...
zxjrheaven
2025年3月9日 12:16
删除字符串2 题解:暴力
P1027
回复 0
|
赞 2
|
浏览 363
#include <bits/stdc++.h> using namespace std; //字符串,读入,双数组记录,一个字符串,一个数组记录有没有 //转换大小写,转了的再转回去 int main() { string str; int num[101]; cin>>str; memset(num,0,sizeof(num)); int a=str...
wuhududu
2025年3月4日 17:47
删除字符串2 题解:
P1027
回复 0
|
赞 7
|
浏览 431
#include<bits/stdc++.h> using namespace std; int main(){ char a[200]; char b[200]; scanf("%s",&a); int len =strlen(a); int m=0; if(len>100&&len=...
海的那边
2025年2月1日 19:43
删除字符串2 题解:
P1027
回复 0
|
赞 16
|
浏览 707
#include <bits/stdc++.h> using namespace std; int main() { string str; getline(cin,str); for(int i = 0;i <= str.size();i++) { if((str[i] == 'g' || str[i] == 'G') && (str[i + 1] == ...
hellokitty1679
2024年9月8日 16:16
删除字符串2 题解:C
P1027
回复 0
|
赞 31
|
浏览 1.6k
#include<stdio.h> #include<string.h> int main(void) { char a[101]; char b[101]; int m=0; scanf("%s",a); int len=strlen(a); for (int i=0;i<len;i++) &...
ccccccyes
2024年9月6日 21:51
删除字符串2 题解:
P1027
回复 0
|
赞 14
|
浏览 1.9k
// 字符串检测 //06/09/24 21:29 //06/09/24 21:51 #include <iostream> using namespace std; int main(){ string s; cin>>s; bool ju = false; for(int i = 0; i<s.size()-2; i++){ ju = false; //防止数组越界 if(s[i] == 'G' || s[i] == 'g'){ if(s[i+1] == 'Z' |...
myming
2024年7月21日 20:32
删除字符串2 题解:
P1027
回复 0
|
赞 2
|
浏览 770
#include<bits/stdc++.h> using namespace std; int main(){ string s,t,f; // getline(cin, s); s = "gzu"; getline(cin, t); string t_low = t; ...
Candour
2024年4月20日 15:21
删除字符串2 题解:
P1027
回复 0
|
赞 8
|
浏览 1.1k
#include<bits/stdc++.h> using namespace std; int main() { string str; getline(cin, str); for(int i = 0; i < str.size(); i ++) { if((str[i] == 'g' || str[i] == 'G') && (str[i + 1] == 'z' || str[i + 1] == 'Z') && (str[i + 2] =='u' || str[i + 2]...
20082123
2024年3月29日 12:04
删除字符串2 题解:
P1027
回复 0
|
赞 0
|
浏览 1.0k
暴力 #include<string> #include<iostream> using namespace std; int main(){ string s; int k1,k2,k3,k4,k5,k6,k7,k8; cin>>s; while(1){ ...
lingdongyang
2024年3月15日 16:41
删除字符串2 题解:
P1027
回复 0
|
赞 4
|
浏览 1.4k
第一种 #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { char s[105]; char s_lower[105];//用来存放把输入的字符串全部变为小写 gets(s); int len = strlen(s);//输入字符串的长度 char d[3] = {'g','z','u'}; int f[105] = {0};//用来记录字符串,删除为1,不删除0,注意:如果不初始化则不为0 for (int i = 0;...
1
2
3
4
5
题目
删除字符串2
题解数量
49
发布题解
在线答疑
热门题解
1
删除字符串2 题解:C
2
简单易懂
3
删除字符串2 题解:
4
删除字符串2 题解:
5
删除字符串2 题解:后值覆盖gzu,判断数目再输出。
6
删除字符串2 题解:
7
删除字符串2 题解:C
8
删除字符串2 题解:C++
9
删除字符串2 题解:
10
删除字符串2 题解: