题目链接:点击这里
填空题。
#include<iostream>
#include<algorithm>
#include<string>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<stack>
#include<queue>
#include<map>
#include<set>
using namespace std;
typedef long long ll;
const int MOD = 10000007;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int maxn = 200010;
int main()
{
set<string> st;
string s = "0100110001010001";
int len = s.length();
for(int i = 0; i < len; ++i)
{
for(int j = 1; j <= len; ++j)
{
st.insert(s.substr(i,j));
}
}
printf("%d\n", st.size()); //100
return 0;
}