problemscpp
A collection of my answers to algorithm problems in c++.
pat
b
b1093
函数
pat::b::b1093 命名空间参考
1093 字符串A+B
更多...
函数
int
main
(istream &cin, ostream &cout)
详细描述
1093 字符串A+B
函数说明
◆
main()
int pat::b::b1093::main
(
istream &
cin
,
ostream &
cout
)
在文件
pat.cpp
第
3261
行定义.
3261
{
3262
char
a[1000010];
3263
char
b[1000010];
3264
cin.getline(a, 1000010);
3265
cin.getline(b, 1000010);
3266
bool
has[127];
3267
unordered_set<char> us;
3268
for
(
int
i = 0; i < strlen(a); i++) {
3269
const
char
ch = a[i];
3270
if
(!has[ch]) {
3271
cout << ch;
3272
has[ch] =
true
;
3273
}
3274
}
3275
for
(
int
i = 0; i < strlen(b); i++) {
3276
const
char
ch = b[i];
3277
if
(!has[ch]) {
3278
cout << ch;
3279
has[ch] =
true
;
3280
}
3281
}
3282
return
0;
3283
}
制作者
1.9.2