L1-011 A-B (20 point(s))

  • 字符串的末尾是 string::npos 而不是类似其他容器用函数 end() 。
#include <bits/stdc++.h>
using namespace std;

int main(){
	string A, B;
	getline(cin, A);
	getline(cin, B);
	
	for(auto a: A)
		if(B.find(a) == string::npos)
			cout << a; 
} 

posted on 2021-10-04 21:34  Atl212  阅读(32)  评论(0)    收藏  举报

导航