← Back to topics
Topic

molekuli

MilosRadic
can someone help with the task molekuli from serbian national contest?thanks in advance
demjan0001
check all possibilities ...
MilosRadic
wont it take too long?
demjan0001
well, it's not ...
i can't calculate exactly complexity in worst case, but it's something like 24*16^6/8 (in worst case) but I am not sure, but i have
1 for loop that goes to 24, and inside it 6 for loops and one is in other that goes to n ...
but it doesn't go every time to n, so complexity is not 24*n^6 in worst case ...