首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
ZeroQi_404
2026年3月17日 21:54
查找 - 北邮 题解:
P1387
回复 0
|
赞 15
|
浏览 380
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string s; while(cin >> s){ int n; cin >> n; while(n--){ string op; cin >> op; ...
王艺道
2026年3月17日 16:47
查找 - 北邮 题解:
P1387
回复 0
|
赞 1
|
浏览 228
#include<bits/stdc++.h> using namespace std; string operate(string a, string o) { if (o[0] == '0') { int i = o[1] - '0...
撒旦
2026年3月16日 16:16
查找 - 北邮 题解:
P1387
回复 0
|
赞 1
|
浏览 210
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int main(){ string s; getline(cin,s); int n; cin>>n; getchar()...
无名吟
2026年3月14日 17:55
查找 - 北邮 C语言题解:
P1387
回复 0
|
赞 7
|
浏览 326
这题真尼玛恶心 刚开始没考虑到,被替换的数量可以比输入的cmd[2]多 #include<stdio.h> int main(){ char arr[100]; while(~scanf("%s", arr)){ int n; scanf("%d", &n); for(int i=0; i<n; i++){ char cmd[20]; scanf("%s", cmd); int c=cmd[0]-'0', k=cmd[1]-'0', len=cmd[2]-'0'; //print...
yauqq
2026年3月14日 15:59
查找 - 北邮 题解:
P1387
回复 0
|
赞 5
|
浏览 227
#include<bits/stdc++.h> using namespace std; int main(){ string str; while(cin >> str){ int n; cin >> n; while(n--){ string tag; cin >> tag; if(tag[0] == '0'){ int start = tag[1] - '0'; int len = tag[2] - '0'; reverse(str.begin()...
kkkkkkllll
2026年3月14日 15:15
查找 - 北邮 题解:
P1387
回复 0
|
赞 1
|
浏览 174
#include<iostream> #include<vector> #include<algorithm> #include<set> using namespace std; int main(){ string str1; while(cin>>str1){ int n; cin>>n; &n...
Cat111
2026年3月10日 19:44
查找 - 北邮 题解:
P1387
回复 0
|
赞 3
|
浏览 322
#include <bits/stdc++.h> using namespace std; int main(){ char s[105]; while(scanf("%s", s) != EOF){ int n; cin >> n; for(int i = 0; i < n; i++){ char c[105]; scanf("%s", c); int j = c[0...
Jinx_K
2026年3月10日 15:52
查找 - 北邮 题解:string+reverse+substr
P1387
回复 0
|
赞 3
|
浏览 259
#include <bits/stdc++.h> using namespace std; int main() { int n; string s; while (cin >> s) { cin >> n; for (int i = 0; i < n; i++) { string t; cin >> t; if (t[0] == '0') { int a1 = t[1] - '0', a2 = t[2] - '0'; reverse(...
ljh61
2026年3月6日 21:48
查找 - 北邮 题解:
P1387
回复 0
|
赞 5
|
浏览 324
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin,s)&&!s.empty()){ int n; cin >> n; &nbs...
JERRY466
2026年3月3日 19:04
查找 - 北邮 题解:
P1387
回复 0
|
赞 11
|
浏览 411
#include<bits/stdc++.h> using namespace std; int main(){ string s; int n; while(cin>>s>>n){ for(int j=0;j<n;j++){ string t;//命令字符串  ...
1
2
3
4
题目
查找 - 北邮
题解数量
33
发布题解
在线答疑
热门题解
1
字符串函数的使用:reverse() 翻转;substr()获取子串;replace()进行字符串替换
2
查找 - 北邮 题解:求大佬看看哪儿有问题,始终只有33%的通过率
3
查找 - 北邮 题解:c++
4
C++,偷懒简洁高效版,直接用reverse()、replace()函数一步搞定字符串的翻转和替换
5
比较笨
6
查找 - 北邮 题解:
7
查找 - 北邮 题解:替换部分求问
8
查找 - 北邮 题解:WA50%求解
9
查找 - 北邮 题解:
10
查找 - 北邮 题解: