-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1033.cpp
More file actions
44 lines (42 loc) · 764 Bytes
/
Copy path1033.cpp
File metadata and controls
44 lines (42 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
#include <ctype.h>
using namespace std;
bool isWoring( char rs, char wkey) {
int flag = 1;
if( isalpha( rs)) {
if( isupper( rs) ){
if( wkey == '+' || rs == wkey) flag = 0;
}
else {
if( (char)( rs-32) == wkey ) flag = 0;
}
}
else if( rs == wkey) flag = 0;
if( flag) return false;
else return true;
}
int main() {
string wkey = "", rs;char a[100000];
wkey = cin.get();
if( wkey[0] != '\n') {
string temp;
cin >> temp;
wkey += temp;
cin >> rs;
int flag1=0;
for( int i=0; i<rs.length(); ++i) {
int flag = 1;
for( int j=0; j<wkey.length(); ++j)
if( isWoring( rs[i], wkey[j]) ) {
flag = 0;
break;
}
if( flag ) cout << rs[i];
}
}
else {
cin >> rs;
cout << rs;
}
return 0;
}