text: /**
   *   Copyright (C) 2021 All rights reserved.
   *
   *   FileName      ：result.cpp
   *   Author        ：C.K
   *   Email         ：theck17@163.com
   *   DateTime      ：2021-11-02 21:13:44
   *   Description   ：
   */
  using namespace std;
  class Solution {
  public:
      int singleNonDuplicate(vector<int>& nums) {
          int left = 0, right = nums.size() - 1;
          while(left < right){
              int mid = (left + right)/2;
              if((mid % 2 == 0 && nums[mid] == nums[mid + 1]) || (mid % 2 == 1 && nums[mid] == nums[mid - 1]))
                  left = mid + 1;
              else
                  right = mid;
          }
          
          return nums[left];
      }
  };
  
  int main(){
      return 0;
  }
  