Towards Global Optimal Visual In-Context Learning Prompt Selection 2