This commit is contained in:
parent
5016ebf497
commit
e1f8beba1b
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
Binary file not shown.
|
@ -0,0 +1,31 @@
|
|||
#include<iostream>
|
||||
using namespace std;
|
||||
string a[100],s;
|
||||
int ce(int now){
|
||||
for(int i=0;i<now;i++){
|
||||
//cout<<a[i]<<" "<<a[now]<<";";
|
||||
if(a[i]==a[now]){
|
||||
//cout<<endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//cout<<endl;
|
||||
return 1;
|
||||
}
|
||||
int main(){
|
||||
int n;
|
||||
cin>>n;
|
||||
cin>>s;
|
||||
for(int i=1;i<=n;i++){
|
||||
int ge=0;
|
||||
for(int j=i;j<=n;j++){
|
||||
a[j-i]+=s[j-1];
|
||||
ge+=ce(j-i);
|
||||
//cout<<j<<" "<<a[j-i]<<" "<<ge<<endl;
|
||||
}
|
||||
if(ge==n-i+1){
|
||||
cout<<i;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Hello Easy C++ project!" << std::endl;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
10
|
||||
IXMVDKIXMV
|
|
@ -0,0 +1,2 @@
|
|||
20
|
||||
RBLRRWSOFSWRRWSOFSAD
|
|
@ -0,0 +1,2 @@
|
|||
7
|
||||
ABCDABC
|
|
@ -0,0 +1,18 @@
|
|||
## z:\Chao\src\4068_loseway\test\in.txt
|
||||
2020/03/29 ÖÜÈÕ 9:05:50.92
|
||||
4
|
||||
-----------------------------------------------
|
||||
Process exited after 200 ms with return value 0
|
||||
|
||||
## z:\Chao\src\4068_loseway\test\In1 (11).txt
|
||||
2020/03/29 ÖÜÈÕ 9:05:50.92
|
||||
5
|
||||
-----------------------------------------------
|
||||
Process exited after 130 ms with return value 0
|
||||
|
||||
## z:\Chao\src\4068_loseway\test\In2 (3).txt
|
||||
2020/03/29 ÖÜÈÕ 9:05:50.92
|
||||
8
|
||||
-----------------------------------------------
|
||||
Process exited after 330 ms with return value 0
|
||||
|
Loading…
Reference in New Issue