/* -*- coding: utf-8 -*- * * 3010.cc: No.3010 豌エ濶イ繧ウ繝シ繝€繝シ縺輔s - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 200000; const int MAX_M = 10; const int K = 4; const int R = 1200; /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int n, m; scanf("%d%d", &n, &m); int cnt = 0; for (int i = 0; i < n; i++) { char s[MAX_M + 4]; int ri; scanf("%s%d", s, &ri); int xc = 0; for (int j = 0; j < K; j++) if (s[j] == 'x') xc++; if (ri >= R && xc > 0) cnt++; } printf("%d\n", cnt); return 0; }