首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
kkkkkkllll
2026年3月12日 18:07
后缀子串排序 题解:
P1294
回复 0
|
赞 0
|
浏览 0
#include <iostream> #include <string> #include <algorithm> #include<ctype.h> #include<map> #include<vector> #include<sstream> using namespace std; bool cmp(string a,string b){ return a.size()<b.size(); } int main() { &n...
Cat111
2026年3月9日 15:57
后缀子串排序 题解:
P1294
回复 0
|
赞 1
|
浏览 68
#include <bits/stdc++.h> using namespace std; bool compareword(char *a,char *b){ return strcmp(a,b)<0; } int main(){ char s[100]; while(scanf("%s",s)!=EOF){ int len=strlen(s); char* suffice[100]; for(int i=0;i<len;i++){ ...
uly
2026年3月4日 17:17
后缀子串排序 题解:
P1294
回复 0
|
赞 3
|
浏览 50
#include <bits/stdc++.h> using namespace std; int main() { string s; while (cin>>s) { vector<string> v; for (int i=0; i<s.size(); i++) { string t; t = s.substr(i); v.push_back(t); } sort(v.begin(), v.end(...
dxuxu
2026年2月20日 19:03
后缀子串排序 题解:
P1294
回复 0
|
赞 6
|
浏览 102
利用set能自动按升序排序的特性快速求解: #include<bits/stdc++.h> using namespace std; string line; int main(){ while(getline(cin,line)){ set<string> s; for(int i=line.size()-1;i>=0;i--){ s.insert(line.substr(i,line.size())); } for(auto t:s){ cout<<t<<en...
litery
2026年2月12日 15:58
后缀子串排序 题解:
P1294
回复 0
|
赞 1
|
浏览 115
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>s){ int n=s.size(); string strs[n]; for(int i=0;i<n;i++){ strs[i]=s.substr(i); } sort(strs,strs+n); for(int i=0;i<n;i++...
bro
2026年2月10日 14:55
后缀子串排序 题解: c++
P1294
回复 0
|
赞 1
|
浏览 119
#include <bits/stdc++.h> using namespace std; bool cmp(string a,string b){ return a < b; } int main(){ string s; while(cin >> s){ vector<string> str; str.push_back...
mlx
2026年1月27日 20:37
后缀子串排序 题解:
P1294
回复 0
|
赞 0
|
浏览 194
#include<iostream> #include<algorithm> #include<vector> using namespace std; const int N=1e5+10; string str; int main() { while(cin>>str) { vector<string> s; for(int i=0;i<str.size();i++) s.push_back(str.substr(i)); sort(s.begin(),...
曾不会
2026年1月26日 17:26
后缀子串排序 题解:Python
P1294
回复 0
|
赞 0
|
浏览 148
while(1): try: n=input() l=len(n) t=[] for i in range(l): s=n[i:l] t.append(s) k=sorted(t) for i in k: print(i) except: break
leo110
2025年5月30日 14:21
后缀子串排序 题解:字符串切片+vector
P1294
回复 0
|
赞 2
|
浏览 849
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; void StrSort(const string &s,vector<string> &vec){ for(int i=0;i<s.length();i++){ vec.push_back(...
山崎友希
2025年3月21日 19:32
后缀子串排序 题解:
P1294
回复 0
|
赞 1
|
浏览 993
#include<stdio.h> #include<string.h> int main(){ //char s1[1000][1000]={{"sdad"},{"dsfdsdsesg"},{"我靠!这懒觉好大!!"}}; //s1[0]='sad'; //puts(s1[1]);//验证成功! char a[10...
1
2
3
题目
后缀子串排序
题解数量
30
发布题解
在线答疑
热门题解
1
参考大家的三种方法
2
后缀子串排序 题解:
3
后缀子串排序 题解: c
4
使用string类
5
后缀子串排序 题解:
6
后缀子串排序 题解:
7
后缀子串排序 题解:
8
后缀子串排序 题解:C++ sort
9
后缀子串排序 题解:
10
string类在后缀字符串的应用