hiho week 84 register

Ended

Participants:186

Verdict:Accepted
Score:100 / 100
Submitted:2016-02-13 15:35:21

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 <iostream>
#include <string>
#include <map>
#include <algorithm>
#include <vector>
using namespace std;
int fibo[11] = {1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89};
bool IsTrue(string s)
{
    int map[26] = {0};
    for(int i = 0; i < s.size(); ++i)
    {
        map[s[i] - 'a']++;
    }
    int count = 0;
    for(int i = 0; i < 26; ++i)
    {
        if(map[i])count++;
    }
    bool flag = false;
    for(int i = 0; i < 11; ++i)
    {
        if(count == fibo[i])
        {
            flag = true;
            break;
        }
    }
    return flag;
}
int main()
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX