An integer is called snakelike if its decimal representation $$a_1a_2a_3\cdots a_k$$ satisfies $$a_i< a_{i+1}$$ if $$i$$ is odd and $$a_i>a_{i+1}$$ if $$i$$ is even. How many snakelike integers between 1000 and 9999 have four distinct digits?

(第二十二届AIME1 2004 第6题)