Binary Search without Sorting
Consider the following binary search code in Python :
1 2 3 4 5 6 7 8 9 10 11 12 13 

It works perfectly, unless if you forgot to sort \(L\) in the first place! Given that \(L\) is a permutation of 0 to 6 and \(x\) is an integer in \(L\), how many distinct inputs \((L,x)\) are there such that the code still works?