Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int n;
- while(cin >> n){
- string s;
- int count=0;
- bool possible=false;
- for(int i=0; i<n; ++i){
- cin >> s;
- if(possible){
- if(s=="trump") ++count;
- possible=false;
- }
- if(s=="donald") possible=true;
- }
- cout << count <<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement