Project Euler #117: Red, green, and blue tiles

  • + 0 comments

    Constantly get timeouts.

    Have a theoretical doubts:

    If I use a function

    int f(int x) {
        if (x <= 1) return 1;
        return f(x/2) + f(x/2 - 1);
    }
    

    what complexity there is?