Language: C++


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
//*/
//using namespace std;
//static const int _ = []() {
//	ios::sync_with_stdio(false);
//	cin.sync_with_stdio(false);
//	cout.sync_with_stdio(false);
//	cin.tie(nullptr);
//	cout.tie(nullptr);
//	return 0;
//}();
// I hate typing .first or .second
template<typename T, typename U>
struct par {
	T x;
	U y;
	par() :x(-1), y(-1) {}
	par(const T& x, const U& y) :x(x), y(y) {}
	bool operator<(const par& other) const {
		if (x == other.x) return y < other.y;
		return x < other.x;
	}
	bool operator==(const par& other) const {
		return x == other.x && y == other.y;
	}
	par operator-(const par& b) const {
		return { x - b.x, y - b.y };
	}
};
#define ll long long
#define ull unsigned long long
#define rep(i,a) for(ll i=0;i<(a);i++)
#define rp1(i,a) for(ll i=1;i<=(a);i++)
#define rng(i,a,b) for(ll i=(a);i<=(b);i++)
#define rev(i,a) for(ll i=(a)-1;i>=0;i--)
#define S size()
#define all(a) (a).begin(),(a).end()
#define any(i,a) for(auto& i:a)
#define pll par<ll,ll>
#define pii par<int,int>
#define X first
#define Y second
#define V vector
#define VL V<ll>
#define VVL V<VL>
#define VS V<string>
template<class T> inline vector<T> rv(ll n) { vector<T> v(n); rep(i, n) cin >> v[i]; return v; }
template<class T> inline void pv(const vector<T>& v) { rep(i, v.size()) cout << v[i] << " "; cout << endl; }
template<class T> inline void amax(T& a, const T& b) { if (a < b) a = b; }
template<class T> inline void amin(T& a, const T& b) { if (a > b) a = b; }
const ll MOD = 1e9 + 7;
const ll MOD1 = 998244353;
struct custom_hash {
	static uint64_t splitmix64(uint64_t x) {
		// http://xorshift.di.unimi.it/splitmix64.c
		x += 0x9e3779b97f4a7c15;
		x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
		x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
		return x ^ (x >> 31);
	}
	size_t operator()(uint64_t x) const {
		static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
		return splitmix64(x + FIXED_RANDOM);
	}
};
ll GCD(ll a, ll b) {
	while (b) {
		ll r = a % b;
		a = b;
		b = r;
	}
	return a;
}



int main(int argc, char** argv) {
	ll n, m, C;
	cin >> n >> m >> C;
	vector<ll> b(m); rep(i, m) cin >> b[i];
	vector<vector<ll>> a(n, vector<ll>(m, 0));
	rep(i, n) rep(j, m) cin >> a[i][j];
	ll ans = 0;
	rep(i, n) {
		ll x = C;
		rep(j, m) {
			x += a[i][j] * b[j];
		}
		if (x > 0) ans++;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc:50:26: error: 'vector' does not name a type
   50 | template<class T> inline vector<T> rv(ll n) { vector<T> v(n); rep(i, n) cin >> v[i]; return v; }
      |                          ^~~~~~
a.cc:51:40: error: 'vector' does not name a type
   51 | template<class T> inline void pv(const vector<T>& v) { rep(i, v.size()) cout << v[i] << " "; cout << endl; }
      |                                        ^~~~~~
a.cc:51:46: error: expected ',' or '...' before '<' token
   51 | template<class T> inline void pv(const vector<T>& v) { rep(i, v.size()) cout << v[i] << " "; cout << endl; }
      |                                              ^
a.cc: In function 'void pv(int)':
a.cc:51:63: error: 'v' was not declared in this scope
   51 | template<class T> inline void pv(const vector<T>& v) { rep(i, v.size()) cout << v[i] << " "; cout << endl; }
      |                                                               ^
a.cc:35:32: note: in definition of macro 'rep'
   35 | #define rep(i,a) for(ll i=0;i<(a);i++)
      |                                ^
a.cc:51:73: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   51 | template<class T> inline void pv(const vector<T>& v) { rep(i, v.size()) cout << v[i] << " "; cout << endl; }
      |                                                                         ^~~~
      |                                                                         std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:4:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:51:94: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   51 | template<class T> inline void pv(const vector<T>& v) { rep(i, v.size()) cout << v[i] << " "; cout << endl; }
      |                                                                                              ^~~~
      |                                                                                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:51:102: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   51 | template<class T> inline void pv(const vector<T>& v) { rep(i, v.size()) cout << v[i] << " "; cout << endl; }
      |                                                                                                      ^~~~
      |                                                                                                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: In member function 'size_t custom_hash::operator()(uint64_t) const':
a.cc:65:54: error: 'chrono' has not been declared
   65 |                 static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
      |                                                      ^~~~~~
a.cc: In function 'int main(int, char**)':
a.cc:82:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   82 |         cin >> n >> m >> C;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:83:9: error: 'vector' was not declared in this scope
   83 |         vector<ll> b(m); rep(i, m) cin >> b[i];
      |         ^~~~~~
a.cc:83:9: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:33:12: error: expected primary-expression before 'long'
   33 | #define ll long long
      |            ^~~~
a.cc:83:16: note: in expansion of macro 'll'
   83 |         vector<ll> b(m); rep(i, m) cin >> b[i];
      |                ^~
a.cc:83:43: error: 'b' was not declared in this scope
   83 |         vector<ll> b(m); rep(i, m) cin >> b[i];
      |                                           ^
a.cc:33:12: error: expected primary-expression before 'long'
   33 | #define ll long long
      |            ^~~~
a.cc:84:23: note: in expansion of macro 'll'
   84 |         vector<vector<ll>> a(n, vector<ll>(m, 0));
      |                       ^~
a.cc:85:36: error: 'a' was not declared in this scope
   85 |         rep(i, n) rep(j, m) cin >> a[i][j];
      |                                    ^
a.cc:90:30: error: 'a' was not declared in this scope
   90 |                         x += a[i][j] * b[j];
      |                              ^
a.cc:90:40: error: 'b' was not declared in this scope
   90 |                         x += a[i][j] * b[j];
      |                                        ^
a.cc:94:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   94 |         cout << ans << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:94:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   94 |         cout << ans << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~