Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define N 1001
- using namespace std;
- //ifstream fin("date.in");
- //ofstream fout("date.out");
- #define ce(x) cout << x << endl;
- #define cs(x) cout << x << " ";
- #define c(x) cout << x;
- #define e(x) cout << endl;
- #define fe(x) fout << x << endl;
- #define fs(x) fout << x << " ";
- #define f(x) fout << x;
- #define ef(x) fout << endl;
- char s[N], sub[N], t[][4] = {"DO", "RE", "MI", "FA", "SOL", "LA", "SI"};
- int main()
- {
- int i, ok = 0;
- bool f = true;
- cin.getline(s, N);
- char *p = strtok(s, " ");
- while(p){
- int i;
- ok = 0;
- for(i = 0; i < 8 && !ok; i++)
- if(strstr(p, t[i])) cout << p << endl, ok = 1;
- p = strtok(NULL, " ");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement