原题链接
首先,由于题目中的字符串出现了空格,所以我们就不能使用scanf或是cin了,因为它们遇到空格就会自动停止,所以这里就要介绍一个函数getline。
使用方法为:
string h;
getline(cin,h);
这样我们便可
2020-03-30