Language: C++

#include <bits/stdc++.h>
using namespace std;

//def
#define debug(x) cout << #x << ": " << x << '\n'
#define out(x) cout << x << '\n'
#define repeat(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define revrepeat(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define revrep(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define foreach(e, v) for (auto &e : v)
#define all(x) (x).begin(), (x).end()
#define CYES cout << "Yes" << endl
#define CNO cout << "No" << endl
#define SPC(x) cout << fixed << setprecision(x)
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef vector<ll> vl;
typedef vector<vector<ll>> vll;
typedef pair<int, int> P;
constexpr int MOD = 1e9 + 7;
constexpr int INF = __INT_MAX__;               // 2^31 - 1
constexpr long long INFLL = __LONG_LONG_MAX__; // 2^61 - 1
constexpr int MAX_N = 1e5 + 5;
constexpr double PI = acos(-1);

namespace detail {
template <typename Tp, size_t Nb>
auto make_vector(std::vector<size_t> &sizes, Tp const &x) {
    if (Nb == 1) {
        return std::vector(sizes[0], x);
    } else {
        size_t size = sizes[Nb - 1];
        sizes.pop_back();
        return std::vector(size, make_vector<Tp, Nb - 1>(sizes, x));
    }
}
} // namespace detail
template <typename Tp, size_t Nb>
auto make_vector(size_t const (&sizes)[Nb], Tp const &x = Tp()) {
    std::vector<size_t> s(Nb);
    for (size_t i = 0; i < Nb; ++i)
        s[i] = sizes[Nb - i - 1];
    return detail::make_vector<Tp, Nb>(s, x);
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n, m, c;
    cin >> n >> m >> c;
    vi b(m);
    rep(i, m) cin >> b[i];
    auto a = make_vector({n, m}, 0);
    rep(i, n) rep(j, m) cin >> a[i][j];

    int ans = 0;
    rep(i, n) {
        int theta = c;
        rep(j, m) theta += a[i][j] * b[j];
        if (theta > 0) ans++;
    }

    out(ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:27: warning: narrowing conversion of 'n' from 'int' to 'size_t' {aka 'long unsigned int'} [-Wnarrowing]
   60 |     auto a = make_vector({n, m}, 0);
      |                           ^
a.cc:60:30: warning: narrowing conversion of 'm' from 'int' to 'size_t' {aka 'long unsigned int'} [-Wnarrowing]
   60 |     auto a = make_vector({n, m}, 0);
      |                              ^
a.cc: In instantiation of 'auto detail::make_vector(std::vector<long unsigned int>&, const Tp&) [with Tp = int; long unsigned int Nb = 18446744073709550720]':
a.cc:40:57:   recursively required from 'auto detail::make_vector(std::vector<long unsigned int>&, const Tp&) [with Tp = int; long unsigned int Nb = 1]'
   40 |         return std::vector(size, make_vector<Tp, Nb - 1>(sizes, x));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
a.cc:40:57:   required from 'auto detail::make_vector(std::vector<long unsigned int>&, const Tp&) [with Tp = int; long unsigned int Nb = 2]'
a.cc:49:39:   required from 'auto make_vector(const size_t (&)[Nb], const Tp&) [with Tp = int; long unsigned int Nb = 2]'
   49 |     return detail::make_vector<Tp, Nb>(s, x);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:60:25:   required from here
   60 |     auto a = make_vector({n, m}, 0);
      |              ~~~~~~~~~~~^~~~~~~~~~~
a.cc:36:21: fatal error: template instantiation depth exceeds maximum of 900 (use '-ftemplate-depth=' to increase the maximum)
   36 |         return std::vector(sizes[0], x);
      |                     ^~~~~~~~~~~~~~~~~~~
compilation terminated.