fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. int n, res=0;
  8. string str;
  9.  
  10. cin>>n;
  11.  
  12. for(int i=0;i<n;i++){
  13. cin>>str;
  14. if(str.find("01")!=string::npos || str.find("OI")!=string::npos)
  15. res++;
  16. }
  17.  
  18. cout<<res;
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 5312KB
stdin
4
SPOILER
HARD
OI01OI
OioioI
stdout
2