#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef ATCODER #include #include #include #endif using namespace std; using ll = long long; using pall = pair; template using vec = vector; template using veve = vec>; using vell = vec; using vebo = basic_string; using vevell = veve; template using uset = unordered_set; template using mset = multiset; template using priority_queue_ascend = priority_queue, greater>; static const ll inf = numeric_limits::max(); static const string sp = string(" "); static const string lf = string("\n"); static const auto &npos = string::npos; static const vec grid_move4 = { {0, 1}, {-1, 0}, {0, -1}, {1, 0} }; static const vec grid_move8 = [] { auto ret = grid_move4; ret.insert(ret.end(), { {-1, 1}, {-1, -1}, {1, -1}, {1, 1} }); return ret; }(); static constexpr ll MOD = 998244353 /* 1000000007 */; #define cont continue #define br break static auto &ciN = cin; static auto &icn = cin; static auto &icN = cin; static constexpr bool ture = true; using itn = int; #ifdef ATCODER using namespace atcoder; using mint = static_modint; #endif #if 202000L <= __cplusplus #define times(N) static_assert(is_integral_v, "times(): N must be integral"); for([[maybe_unused]] const auto &_N = (N); [[maybe_unused]] const decltype(_N + 0) _c: views::iota(decltype(_N + 0)(0), _N)) #else #define times(N) static_assert(is_integral_v, "times(): N must be integral"); for(bool _ = true;_;) for([[maybe_unused]] const auto &_N = (N);_;_ = false) for(decltype(_N + 0) _c = 0;_c != _N;_c += 1) #endif #ifdef ATCODER template istream &operator>>(istream &in, static_modint &i) { ll tmp; in >> tmp; i = tmp; return in; } template ostream &operator<<(ostream &out, const static_modint &i) { return out << i.val(); } #endif template istream &operator>>(istream &in, pair &p) { return in >> p.first >> p.second; } template ostream &operator<<(ostream &out, const pair &p) { return out << p.first << sp << p.second; } template istream &operator>>(istream &in, vec &v) { for(auto &e:v) { in >> e; } return in; } namespace myinput { template set check_align_(const vec &v) { set s; s.insert(v.size()); return s; } template set check_align_(const vec &v, Args&... args) { set &&s = check_align_(args...); s.insert(v.size()); return s; } template bool check_align(Args&... args) { return check_align_(args...).size() == size_t(1); } template void in_(const size_t i, const bool isRoot, vec &v) noexcept { if(i >= v.size()) return; cin >> v[i]; if(isRoot && i + 1 < v.size()) { in_(i + 1, true, v); } } template void in_(const size_t i, const bool isRoot, vec &v, Args&... args) noexcept { if(i >= v.size()) return; cin >> v[i]; in_(i, false, args...); if(isRoot && i + 1 < v.size()) { in_(i + 1, true, v, args...); } } template istream &in(Args&... args) { assert(sizeof...(args) != 0); if(!check_align(args...)) throw invalid_argument("myfunc::in(): Why are the vector sizes not aligned!?!?"); in_(size_t(0), true, args...); return cin; } } using myinput::in; #if defined(__cpp_lib_ranges) && 201911L <= __cpp_lib_ranges void out(const ranges::range auto &v, const string &delim, ostream &out = cout) noexcept { for(auto &&e:v) { out << e << delim; } } #endif [[nodiscard]] constexpr const string &yesno(const bool cond, const string &yes="Yes", const string &no="No") noexcept { if(cond) return yes; return no; } /* #include random_device seed; mt19937_64 mt(seed()); // [mi, ma) [[nodiscard]] uint64_t randint(const uint64_t mi, const uint64_t ma) noexcept { if(mi > ma) return randint(ma, mi); if(mi == ma) return mi; const uint64_t w = ma - mi; uint64_t r = mt(); while(mt.max() - mt.max() % w < r) r = mt(); return r % w + mi; } */ #if defined(__cpp_concepts) && defined(__cpp_lib_concepts) template requires common_with [[nodiscard]] constexpr const common_type_t min(const T &a, const U &b) noexcept { return std::min>(a, b); } template requires common_with [[nodiscard]] constexpr const common_type_t max(const T &a, const U &b) noexcept { return std::max>(a, b); } #endif #if defined(__cpp_lib_ranges) && 201911L <= __cpp_lib_ranges template [[nodiscard]] constexpr T &min(const vec &v) { return *ranges::min_element(v); } template [[nodiscard]] constexpr T &max(const vec &v) { return *ranges::max_element(v); } #endif [[nodiscard]] constexpr ll powll(ll a, ll b, const ll m = inf) { if(b < 0) [[unlikely]] throw invalid_argument("powll(): exponent less than zero"); if(m < 2) [[unlikely]] throw invalid_argument("powll(): modulo less than two"); a %= m; ll ret = 1; while(b) { if(b % 2) ret *= a, ret %= m; a *= a, a %= m; b /= 2; } return ret; } #ifdef __cpp_concepts template requires assignable_from && totally_ordered_with constexpr bool mini(T &var, const U &val) noexcept { const bool cmp = var > val; if(cmp) var = val; return cmp; } template requires assignable_from && totally_ordered_with constexpr bool maxi(T &var, const U &val) noexcept { const bool cmp = var < val; if(cmp) var = val; return cmp; } #endif class grid { public: #ifdef __cpp_lib_constexpr_string constexpr #endif grid(const ll h, const ll w) : height(h), width(w) { visited = vebo(h * w, false); } [[nodiscard]] constexpr ll operator()(const ll i, const ll j) const noexcept { if(!isvalid(i, j)) return -1; return i * width + j; } [[nodiscard]] constexpr ll operator()(const pair &p) const noexcept { return (*this)(p.first, p.second); } [[nodiscard]] constexpr bool &seen(const ll i, const ll j) & { if(!isvalid(i, j)) throw out_of_range("grid::seen(): out of range"); return (*this).visited[i * width + j]; } [[nodiscard]] constexpr bool &seen(const pair &p) & { return this->seen(p.first, p.second); } private: constexpr bool isvalid(const ll i, const ll j) const noexcept { return 0 <= i && 0 <= j && i < height && j < width; } const ll height, width; vebo visited; }; template constexpr auto erase_single(multiset &mset, const T &v) { const auto it = mset.find(v); if(it == mset.end()) throw invalid_argument("erase_single(): why v not in mset!?!?"); return mset.erase(it); } void solve(); int main(void) { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; } void solve() { ll n, m; cin >> n >> m; ll ans = 0; times(n) { string s; ll r; cin >> s >> r; bool match = ture; match = match && r >= 1200; match = match && (s[0] == 'x' || s[1] == 'x' || s[2] == 'x' || s[3] == 'x'); ans += int(match); } cout << ans; }