hiho week 84 register

Ended

Participants:186

Verdict:Accepted
Score:100 / 100
Submitted:2016-02-08 15:32: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 <iostream>
#include <fstream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <vector>
using namespace std;
int counts1[26] = {0};
int total1 = 0;
int counts2[26] = {0};
int total2 = 0;
int fibs[7] = {1, 2, 3, 5, 8, 13, 21};
vector<string> ans;
int main()
{
    int i, j, m;
    string s;
    cin >> s;
    for(j = 0; j < s.size(); ++j)
    {
        i = s[j]-'a';
        total1 += (counts1[i]==0);
        ++counts1[i];
        total2 = total1;
        memcpy(counts2, counts1, sizeof(counts1));
        for(i = 0; i <= j; ++i)
        {
            for(m = 0; m < 7; ++m)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX