hiho week 84 register

Ended

Participants:186

Verdict:Accepted
Score:100 / 100
Submitted:2016-02-08 12:34:30

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
using namespace std;
int main()
{
    //freopen("input.txt", "r", stdin);
    string str;
    cin >> str;
    set<string> ansList;
    int fibonaccid[7] = { 1, 2, 3, 5, 8, 13, 21 };
    for (int i = 0; i < str.size(); ++i)
    {
        int alphabet[26] = {false};
        int count = 0;
        for (int j = i; j < str.size(); ++j)
        {
            if (!alphabet[str[j] - 'a'])
            {
                alphabet[str[j] - 'a'] = true;
                ++count;
            }
            for (int k = 0; k < 7; ++k)
            {
                if (fibonaccid[k] == count)
                {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX