首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
山崎友希
2025年3月21日 19:32
后缀子串排序 题解:
P1294
回复 0
|
赞 0
|
浏览 59
#include<stdio.h> #include<string.h> int main(){ //char s1[1000][1000]={{"sdad"},{"dsfdsdsesg"},{"我靠!这懒觉好大!!"}}; //s1[0]='sad'; //puts(s1[1]);//验证成功! char a[10...
wwj0102
2025年3月15日 21:15
后缀子串排序 题解:
P1294
回复 0
|
赞 6
|
浏览 103
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin,s)){ int ls = s.length(); string t[ls]; string s1 = ""; for(int i = ls - 1; i >= 0; i--){ s1 = s[i] + s1; t[i] = s1; } sort(t,t + ls); for(int i = 0; i < ls; i++...
zxjrheaven
2025年3月14日 13:01
后缀子串排序 题解:暴力,利用map自己喜欢排序的特性
P1294
回复 0
|
赞 1
|
浏览 115
#include <bits/stdc++.h> using namespace std; int main() { string str; while(cin>>str) { map<string,int> mp; while(!str.empty()) ...
shiv15832
2025年3月10日 21:31
后缀子串排序 题解:
P1294
回复 0
|
赞 1
|
浏览 180
显然解题分两步:1,获取子串。2,字典排序。 字典排序很简单,sort函数自然对字符串进行字典排序。而获取子串可以用c++自带的substr函数,具体用法不清楚的可以查一下CSDN或者Deepseek都可以,那么就基本解决了题目,只需要用一个vector存储截取下来的字符串就可以了。 代码: #include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; &nb...
可可爱爱草莓派
2024年8月27日 08:51
参考大家的三种方法
P1294
回复 0
|
赞 22
|
浏览 1.6k
#include<bits/stdc++.h> using namespace std; string str[1010]; //方法一 //int main(){ // string s; // cin >> s; // int len = s.size(); // for(int i = 0;i < len;i++){ // str[i] = s.substr(i,len - i)...
Candour
2024年5月26日 11:03
后缀子串排序(C++) 题解:
P1294
回复 0
|
赞 2
|
浏览 621
#include<bits/stdc++.h> using namespace std; string str; int main() { while(cin >> str) { vector<string> a; int n = str.size(); for(int i = 0; i < n; i ++) a.push_back(str.substr(i, n - i)); so...
carrot_huan
2024年3月18日 15:27
后缀子串排序 题解:substr+sort
P1294
回复 0
|
赞 0
|
浏览 698
#include<bits/stdc++.h> using namespace std; int main() { string str; while (cin >> str) { vector<string> substr; for (int i = 0; i < s...
huanghu
2024年3月16日 16:57
后缀子串排序 题解:C++ sort
P1294
回复 0
|
赞 1
|
浏览 856
#include<stdio.h> #include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ string str; string arr[100]; while(cin>>str){ int len = str.length(); for(int i = 0; i<len; i++){ string s = ""; for(int j = i; ...
sinkorswim
2024年3月14日 20:24
后缀子串排序 C++ map
P1294
回复 0
|
赞 2
|
浏览 629
#include<bits/stdc++.h> using namespace std; int main(){ string s; int i,len; while(cin>>s){ map<string,int> m; len=s.size();...
promising
2024年3月8日 15:43
后缀子串排序 题解:
P1294
回复 0
|
赞 4
|
浏览 740
#include<stdio.h> #include<string.h> int main() { char a[100]; char b[100][100]; int i,j; char t[100]; while(scanf("%s",&a)!=EOF){ &nbs...
1
2
3
题目
后缀子串排序
题解数量
21
发布题解
在线答疑
热门题解
1
参考大家的三种方法
2
使用string类
3
后缀子串排序 题解:
4
后缀子串排序 题解: c
5
后缀子串排序 题解:
6
string类在后缀字符串的应用
7
后缀子串排序 C++ map
8
后缀子串排序(C++) 题解:
9
后缀子串排序 题解:C题解
10
后缀子串排序 题解: