hiho week 84 register

Ended

Participants:186

Verdict:Accepted
Score:100 / 100
Submitted:2016-02-06 23:19:06

Lang:GCC

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 <stdio.h>
#include <stdlib.h>
#include <string.h>
int diff(char* substr);
int comp(const void * a, const void * b);
int main()
{
    int fibonacci[7] = {1, 2, 3, 5, 8, 13, 21};
    // loop counter
    int i, j;
    //length of main str
    int len;
    //main string
    char str[102];
    //substring
    char* substr;
    //number of different letters
    int diffNum;
    //string list
    char* list[5100];
    //index of list;
    int index;
    gets(str);
    len = strlen(str);
    index = 0;
    for (i = 0; i <= len - 1; i++)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX