一、使用详解:
这里是跳转链接o(▽)q
二、习题&题解(共八题):
格式:题号——题名——[AC/Submit]
先来几道水题找找感觉o( ̄▽ ̄)o
A 字符串合并-string [59/61]
#include <bits/stdc++.h>
using namespace std;
string str1, str2;
int main()
{
ios::sync_with_stdio(false);
while (cin >> str1 >> str2)
{
str1 += str2;
cout << str1 << endl;
}
//system("pause");
return 0;
}
B 回文字符串-string [58/70]
#include <bits/stdc++.h>
using namespace std;
string str1, str2;
string::iterator it1, it2;
int main()
{
ios::sync_with_stdio(false);
int n;
cin >> n;
while (n--)
{
cin >> str1;
str2 = str1;
it1 = str1.begin();
it2 = str1.end();
reverse(it1, it2);
if (str1 == str2)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
//system("pause");
return 0;
}
C 气球-string-map [59/82]
直接暴力
#include <bits/stdc++.h>
using namespace std;
int n, t2;
string str[200], ansstr;
int main()
{
ios::sync_with_stdio(false);
while (cin