首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
曾一东
2026年3月22日 17:25
字符移动 题解:
P1012
回复 0
|
赞 0
|
浏览 9
#include<stdio.h> #include<ctype.h> int main(){ char str[105]; scanf("%s",str); int s[105]; int s_count=0; char z[105]; int z_count=0;  ...
阿水799
2026年3月22日 15:37
字符移动 题解:
P1012
回复 0
|
赞 0
|
浏览 3
#include <stdio.h> #include <stdlib.h> #include <string.h> //输入一个字符串,将其中的数字字符移动到非数字字符之后, //并保持数字字符和非数字字符输入时的顺序。 //例如:输入字符串“ab4f35gr#a6”,输出为“abfgr#a4356”。 void fun(char* s) { int len=strlen(s); char* ans=malloc(sizeof(c...
HKX9XAS
2026年3月14日 19:48
字符移动 题解:用push_back和erase
P1012
回复 0
|
赞 6
|
浏览 144
#include<stdio.h> #include<iostream> #include<string.h> #include<string> using namespace std; int main(){ string s; while( cin>>s ){ int i=0,count=0; &...
太一
2026年3月13日 20:22
字符移动 题解:
P1012
回复 0
|
赞 8
|
浏览 131
#include<iostream> #include<cmath> #include<algorithm> using namespace std; int main() { int index = 0; string s; char arr[1000]; cin >> s; for (int i = 0;i < s.leng...
ZeroQi_404
2026年3月11日 23:45
字符移动 题解:
P1012
回复 0
|
赞 8
|
浏览 128
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; string a = ""; string b = ""; for(int i = 0; i < s.size(); i++){ if(s[i] >= '0' && s[i] <= '9') b += s[i]...
tnz
2026年3月7日 11:36
字符移动 题解:采用sort思路
P1012
回复 0
|
赞 3
|
浏览 166
#include <iostream> #include <cctype> #include <algorithm> using namespace std; bool CompareMy(char a, char b){ if(!isdigit(a)&&isdigit(b)){ return true; } return false; }; int main() { string str; getli...
uly
2026年3月4日 14:16
字符移动 题解:
P1012
回复 0
|
赞 22
|
浏览 292
#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; int n = s.length(); string a; string b; for (int i = 0; i < n; i++) { if (s[i]>=&...
xsw
2026年2月3日 10:43
字符移动 题解:
P1012
回复 0
|
赞 26
|
浏览 460
#include<iostream> using namespace std; int main() { string s; cin >> s; string str; for (int i = 0; i < s.size(); i ++ ) { if (s[i] >= '0' && s[i] <= '9') { str += s[i]; } else { cout << s[i]; } } cout << str <&l...
mlx
2026年1月28日 22:49
字符移动 题解:
P1012
回复 0
|
赞 8
|
浏览 393
#include<iostream> #include<vector> using namespace std; string str; vector<char> c; int main() { cin>>str; for(int i=0;i<str.size();i++) { if(str[i]>='0'&&str[i]<='9') c.push_back(str[i]); else cout<<str[i]; } for...
yauqq
2026年1月28日 14:58
字符移动 题解:
P1012
回复 0
|
赞 4
|
浏览 240
#include<bits/stdc++.h> using namespace std; int main(){ string str; cin >> str; string str1[100]; string str2[100]; int i=0,j=0; for(char c:str){ if(c >= '0' && c <= '9') str1[i++] = c; else str2[j++] =c; } for(int k=0;k<j;k++){ ...
1
2
3
...
7
题目
字符移动
题解数量
70
发布题解
在线答疑
热门题解
1
字符移动 题解:
2
字符移动 题解:C
3
字符移动 题解:
4
字符移动 题解:
5
字符移动 题解:
6
字符移动 题解:
7
字符移动 题解:
8
字符移动 题解:
9
字符移动 题解:简洁版
10
字符移动 题解: