fork download
  1. #include <iostream>
  2. #include <regex>
  3. using namespace std;
  4.  
  5. int main() {
  6. int count = 0,t;
  7. string s;
  8. getline(cin, s);
  9. t = stoi(s);
  10. bool ans;
  11. while(t--){
  12. getline(cin, s);
  13. smatch sm;
  14. regex rgx(".*hacker.*",regex_constants::icase);
  15. ans = regex_match(s,sm,rgx);
  16. if(ans){
  17. count += 1;
  18. }
  19. }
  20. cout << count << endl;
  21. return 0;
  22. }
Success #stdin #stdout 0s 3324KB
stdin
4
I love #hacker
I just scored 27 points in the Picking Cards challenge on #Hacker
I just signed up for summer cup @hacker
interesting talk by hari, co-founder of hacker
stdout
4