本文整理汇总了C++中Solution::FindNumsAppearOnce方法的典型用法代码示例。如果您正苦于以下问题:C++ Solution::FindNumsAppearOnce方法的具体用法?C++ Solution::FindNumsAppearOnce怎么用?C++ Solution::FindNumsAppearOnce使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solution
的用法示例。
在下文中一共展示了Solution::FindNumsAppearOnce方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(){
vector<int> data_set = {2,4,3,6,3,2,5,5};
Solution s;
int a,b;
s.FindNumsAppearOnce(data_set,&a,&b);
cout<<a<<endl;
cout<<b<<endl;
return 0;
}
示例2: __tmain
int __tmain( )
{
Solution solu;
int arr[] = { 2, 4, 3, 6, 3, 2, 5, 5, };
vector<int> vec(arr, arr + 8);
int num1, num2;
solu.FindNumsAppearOnce(vec, &num1, &num2);
cout <<"RESULT : " <<num1 <<", " <<num2 <<endl;
return 0;
}
示例3: main
int main() {
vector<int> nums;
nums.push_back(1);
nums.push_back(2);
nums.push_back(1);
nums.push_back(2);
nums.push_back(3);
nums.push_back(4);
nums.push_back(5);
nums.push_back(5);
nums.push_back(6);
nums.push_back(6);
int x, y;
Solution s;
s.FindNumsAppearOnce(nums, &x, &y);
cout << x << "," << y << endl;
nums.clear();
nums.push_back(2);
nums.push_back(4);
nums.push_back(3);
nums.push_back(6);
nums.push_back(3);
nums.push_back(2);
nums.push_back(5);
nums.push_back(5);
s.FindNumsAppearOnce(nums, &x, &y);
cout << x << "," << y << endl;
nums.clear();
nums.push_back(1);
s.FindNumsAppearOnce(nums, &x, &y);
cout << x << "," << y << endl;
return 0;
}