本文整理汇总了C++中Solution::addBinary方法的典型用法代码示例。如果您正苦于以下问题:C++ Solution::addBinary方法的具体用法?C++ Solution::addBinary怎么用?C++ Solution::addBinary使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solution
的用法示例。
在下文中一共展示了Solution::addBinary方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main() {
Solution s;
cout << s.addBinary("110", "11") << endl;
cout << s.addBinary("", "11") << endl;
cout << s.addBinary("110", "") << endl;
cout << s.addBinary("1", "101") << endl;
cout << s.addBinary("101", "110") << endl;
cout << s.addBinary("110", "100") << endl;
return 0;
}
示例2: main
int main() {
Solution s;
string a, b;
while (cin >> a >> b)
cout << s.addBinary(a, b) << endl;
return 0;
}
示例3: main
int main(int argc, char** argv)
{
Solution sln;
std::cout << sln.addBinary("1111", "1111") << std::endl;
return 0;
}
示例4: main
int main()
{
string a = "110010";
string b = "10111";
Solution s;
cout << s.addBinary(a, b) << endl;
}
示例5: main
int main() {
Solution newSolution;
cout << newSolution.addBinary("1","1011") << endl;
return 0;
}
示例6: main
int main()
{
string a = "00001", b = "111";
Solution slt;
string rslt = slt.addBinary(a, b);
return 0;
}
示例7: main
int main(){
string a = "1";
string b = "111";
Solution sl;
cout<<sl.addBinary(a,b)<<endl;
return 0;
}
示例8: main
int main(){
Solution *a;
a = new Solution();
string n1 = "1";
string n2 = "1001";
cout << a->addBinary(n1,n2)<<endl;
}
示例9: _tmain
int _tmain(int argc, _TCHAR* argv[])
{
string a = "11";
string b = "1";
Solution so;
string s = so.addBinary(a, b);
return 0;
}
示例10: main
int main()
{
string a("1010");
string b("1111");
Solution s;
cout<<s.addBinary(a, b)<<endl;
return 0;
}
示例11: main
int main() {
string str1, str2;
Solution s;
while (cin >> str1 >> str2) {
cout << s.addBinary(str1, str2) << endl;
}
return 0;
}
示例12: main
void main(int argc, char *argv[]){
string a = "0";
string b = "0";
Solution s;
string sum = s.addBinary(a, b);
cout << a << " + " << b << " = " << sum << endl;
system("pause");
}
示例13: main
int main()
{
Solution sln = Solution();
string a = "1111001";
string b = "101";
string c = sln.addBinary(a, b);
cout<<c<<endl;
}
示例14: main
int main(void){
Solution s;
string str1 = "11111";
string str2 = "1";
string res = s.addBinary(str1,str2);
//cout << res << endl;
getchar();
return 0;
}
示例15: main
int main()
{
string s,t;
cin>>s;cin>>t;
Solution result;
cout<<result.addBinary(s,t)<<endl;;
return 0;
}