problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k ⌀ | fixed_code stringlengths 12 526k ⌀ | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M ⌀ | fixed_submission_id int64 2 1.54M ⌀ | user_id stringlengths 10 10 ⌀ | language stringclasses 9
values |
|---|---|---|---|---|---|---|---|
p03101 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, w, h;
cin >> W, H;
cin >> w, h;
cout << (W - w) * (H - h);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, w, h;
cin >> W >> H;
cin >> w >> h;
cout << (W - w) * (H - h);
return 0;
}
| [] | 908,466 | 908,467 | u700307250 | cpp |
p03101 | #include <iostream>
using namespace std;
int main() {
int H, W, h, w;
int S;
cin >> H >> W >> h >> w;
S = H * W - (H * w + W * h) - h * w;
cout << S << endl;
}
| #include <iostream>
using namespace std;
int main() {
int H, W, h, w;
int S;
cin >> H >> W >> h >> w;
S = H * W - (H * w + W * h) + h * w;
cout << S << endl;
}
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 908,481 | 908,482 | u223504018 | cpp |
p03101 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, w, h, r, c;
cin >> r >> c;
cin >> h >> w;
int ans = (r * c) - ((h * r) + (w * c) - (h * w));
if (r == h || c == w)
ans = 0;
cout << ans << '\n';
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, w, h, r, c;
cin >> r >> c;
cin >> h >> w;
int ans = (r * c) - ((h * c) + (w * r) - (h * w));
if (r == h || c == w)
ans = 0;
cout << ans << '\n';
return 0;
} | [
"identifier.change",
"expression.operation.binary.change"
] | 908,483 | 908,484 | u343045496 | cpp |
p03101 | #include <iostream>
using namespace std;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << (h * W + w * H - h * w);
return 0;
} | #include <iostream>
using namespace std;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << (H * W - (h * W + w * H - h * w));
return 0;
} | [] | 908,494 | 908,495 | u018687385 | cpp |
p03101 | #include <iostream>
using namespace std;
int h, w;
int main() {
cin >> h >> w;
int a, b;
cin >> a >> b;
cout << h * w - h * a - w * b + a * b << "\n";
} | #include <iostream>
using namespace std;
int h, w;
int main() {
cin >> h >> w;
int a, b;
cin >> a >> b;
cout << h * w - w * a - h * b + a * b << "\n";
} | [
"identifier.change",
"io.output.change"
] | 908,501 | 908,502 | u572456887 | cpp |
p03101 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, s, n) for (int i = (s); i < (n); ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define REPR(i, s, n) for (int i = (s); i >= (n); --(i))
#define all(a) (a).begin(), (a).end()
#define reall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define pf push_front
#define MIN(a, b) a = min((a), (b))
#define MAX(a, b) a = max((a), (b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<bool> vb;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
const ll mod = 1e9 + 7;
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};
void printvll(vll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) cout << v[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvvll(vvll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) {
rep(j, v[i].size()) { cout << v[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void prints(string s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) cout << s[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvs(vs s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) {
rep(j, s[i].size()) { cout << s[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void Yes(bool x) {
if (x)
cout << "Yes\n";
else
cout << "No\n";
}
void YES(bool x) {
if (x)
cout << "YES\n";
else
cout << "NO\n";
}
void yes(bool x) {
if (x)
cout << "yes\n";
else
cout << "no\n";
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll d, n, m, k, ans = 0, ret = M;
bool flag = false, flag2 = false;
string s, t;
cin >> n >> m >> d >> k;
cout << (n - m) * (d - k) << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
//#include<bits/stdc++.h>
using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, s, n) for (int i = (s); i < (n); ++i)
#define repr(i, n) for (int i = n - 1; i >= 0; --i)
#define REPR(i, s, n) for (int i = (s); i >= (n); --(i))
#define all(a) (a).begin(), (a).end()
#define reall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define pf push_front
#define MIN(a, b) a = min((a), (b))
#define MAX(a, b) a = max((a), (b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<bool> vb;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
const ll mod = 1e9 + 7;
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};
void printvll(vll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) cout << v[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvvll(vvll v) {
cout << "------------------------------------------------\n";
rep(i, v.size()) {
rep(j, v[i].size()) { cout << v[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void prints(string s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) cout << s[i] << " ";
cout << endl;
cout << "------------------------------------------------\n";
}
void printvs(vs s) {
cout << "------------------------------------------------\n";
rep(i, s.size()) {
rep(j, s[i].size()) { cout << s[i][j] << " "; }
cout << endl;
}
cout << "------------------------------------------------\n";
}
void Yes(bool x) {
if (x)
cout << "Yes\n";
else
cout << "No\n";
}
void YES(bool x) {
if (x)
cout << "YES\n";
else
cout << "NO\n";
}
void yes(bool x) {
if (x)
cout << "yes\n";
else
cout << "no\n";
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll d, n, m, k, ans = 0, ret = M;
bool flag = false, flag2 = false;
string s, t;
cin >> n >> m >> d >> k;
cout << (n - d) * (m - k) << endl;
return 0;
}
| [
"identifier.change",
"io.output.change"
] | 908,512 | 908,513 | u373958718 | cpp |
p03101 | #include <iostream>
int main() {
int H, W, h, w;
std::cin >> H >> W;
std::cin >> h >> w;
std::cout << H * W - (h * W + H * w);
} | #include <iostream>
int main() {
int H, W, h, w;
std::cin >> H >> W;
std::cin >> h >> w;
std::cout << H * W + h * w - (h * W + H * w);
} | [
"expression.operation.binary.add"
] | 908,519 | 908,520 | u604262137 | cpp |
p03101 | #include "bits/stdc++.h"
using namespace std;
int main() {
int H, W, A, B;
cin >> H >> W >> A >> B;
cout << H * W - A * H - B * W + A + B << endl;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int H, W, A, B;
cin >> H >> W >> A >> B;
cout << H * W - A * W - B * H + A * B << endl;
} | [
"identifier.change",
"io.output.change",
"expression.operator.arithmetic.change"
] | 908,521 | 908,522 | u365956698 | cpp |
p03101 | #include "bits/stdc++.h"
using namespace std;
int main() {
int H, W, A, B;
cin >> H >> W >> A >> B;
cout << H * W - A * H - B * W + A * B << endl;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int H, W, A, B;
cin >> H >> W >> A >> B;
cout << H * W - A * W - B * H + A * B << endl;
} | [
"identifier.change",
"io.output.change"
] | 908,523 | 908,522 | u365956698 | cpp |
p03101 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << (H - h) * (W - W) << "\n";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << (H - h) * (W - w) << "\n";
}
| [
"identifier.change",
"io.output.change"
] | 908,528 | 908,529 | u839511400 | cpp |
p03101 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define FOR(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR1(i, n) for (int(i) = 1; (i) < (n); (i)++)
#define eFOR(i, n) for (int(i) = 0; (i) <= (n); (i)++)
#define eFOR1(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define SORT(i) sort((i).begin(), (i).end())
#define INF 1000000000
int main() {
int a, b, c, d;
cin >> a >> b;
cin >> c >> d;
cout << (a - c) * b - d << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define FOR(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR1(i, n) for (int(i) = 1; (i) < (n); (i)++)
#define eFOR(i, n) for (int(i) = 0; (i) <= (n); (i)++)
#define eFOR1(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define SORT(i) sort((i).begin(), (i).end())
#define INF 1000000000
int main() {
int a, b, c, d;
cin >> a >> b;
cin >> c >> d;
cout << (a - c) * (b - d) << endl;
return 0;
}
| [] | 908,530 | 908,531 | u863044225 | cpp |
p03101 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
ld err = 0.000000001;
#define N 2000005
#define ESP 1e-9
#define pii pair<int, int>
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define pp pop_back
int ar[1000];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int W, H, w, h;
cin >> W >> H >> w >> h;
ll ans = W * H;
ans = ans - ((H * w) + ((W - 2) * h));
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
ld err = 0.000000001;
#define N 2000005
#define ESP 1e-9
#define pii pair<int, int>
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define pp pop_back
int ar[1000];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int W, H, w, h;
cin >> W >> H >> w >> h;
ll ans = W * H;
ans = ans - ((H * w) + ((W - w) * h));
cout << ans << endl;
return 0;
}
| [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 908,532 | 908,533 | u111496108 | cpp |
p03101 | #include <iostream>
using namespace std;
main() {
int H;
int W;
int h;
int w;
cin >> H;
cin >> W;
cin >> h;
cin >> w;
cout << H * W - h * H - w * W + h * w;
return 0;
}
| #include <iostream>
using namespace std;
main() {
int H;
int W;
int h;
int w;
cin >> H;
cin >> W;
cin >> h;
cin >> w;
cout << H * W - h * W - w * H + h * w;
return 0;
}
| [
"identifier.change",
"io.output.change"
] | 908,550 | 908,551 | u550043044 | cpp |
p03101 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int H, W;
int h, w;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> H >> W >> h >> w;
cout << H * W - (H * h + W * w - h * w) << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int H, W;
int h, w;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> H >> W >> h >> w;
cout << H * W - (H * w + W * h - h * w) << endl;
} | [
"identifier.change",
"io.output.change"
] | 908,556 | 908,557 | u325820449 | cpp |
p03101 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << (a - b) * (c - d) << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << (a - c) * (b - d) << endl;
return 0;
}
| [
"identifier.change",
"io.output.change"
] | 908,569 | 908,570 | u340127670 | cpp |
p03101 | /*
Converted from Scratch by scratch2cpp
(https://github.com/yos1up/scratch2cpp).
*/
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define debug \
cerr << "--" << __LINE__ << "--" \
<< "\n"
using namespace std;
const double EPS = 1e-8;
static int roundToInt(double x) {
return (x < 0) ? -(int)(-x + 0.5) : (int)(x + 0.5);
}
class Var { // NOTE: immutable
public:
string sval;
double dval;
enum VarType { STRING = 0, NUMBER = 1 };
VarType type;
enum NumericState { UNKNOWN = -1, STRINGY = 0, NUMERIC = 1 };
mutable NumericState numericState;
Var() {
sval = "";
type = STRING;
numericState = STRINGY;
} // represent null?
Var(string s) {
sval = s;
type = STRING;
numericState = UNKNOWN;
}
Var(double d) {
dval = d;
type = NUMBER;
numericState = NUMERIC;
}
Var(const Var &v) {
sval = string(v.sval);
dval = v.dval;
type = v.type;
numericState = v.numericState;
}
static bool isNumericString(const string &s) {
char *ep;
// cause side-effect: errno can be ERANGE after calling strtod
strtod(s.c_str(), &ep);
// Scratch 3.0 recognize the string cause underflows or overflows as Numeric
return NULL != ep && '\0' == ep[0] && s[0] != '\0';
// TODO: In Scratch '000' is regarded as non-numeric (but here regarded as
// numeric)
}
bool isNumeric() const {
if (type == NUMBER)
return true;
if (numericState != UNKNOWN)
return numericState == NUMERIC;
bool numeric = isNumericString(sval);
numericState = (numeric) ? NUMERIC : STRINGY;
return numeric;
}
double asNumber() const {
if (type == NUMBER)
return dval;
return (isNumeric()) ? atof(sval.c_str()) : 0.0;
}
static bool isNearInteger(const double &x) {
return fabs(round(x) - x) < EPS;
// TODO: allow integer type in Var class
}
static bool isNearNumber(const double &x, const double &y) {
return fabs(x - y) < EPS;
}
string asString() const {
if (type == STRING)
return sval;
if (isNearInteger(dval))
return to_string(roundToInt(dval));
return to_string(dval);
}
Var operator+(const Var &y) const {
return Var(this->asNumber() + y.asNumber());
}
Var operator+=(const Var &y) {
*this = *this + y;
return *this;
}
Var operator-(const Var &y) const {
return Var(this->asNumber() - y.asNumber());
}
Var operator*(const Var &y) const {
return Var(this->asNumber() * y.asNumber());
}
Var operator/(const Var &y) const {
return Var(this->asNumber() / y.asNumber());
}
Var operator%(const Var &y) const {
return Var(fmod(this->asNumber(), y.asNumber()));
}
bool operator<(const Var &y) const {
if (this->isNumeric() && y.isNumeric()) {
return this->asNumber() < y.asNumber();
} // compare as number if both can be interpreted as numeric
return this->asString() < y.asString();
}
bool operator>(const Var &y) const { return y < *this; }
bool operator==(const Var &y) const {
if (this->isNumeric() && y.isNumeric()) {
return this->asNumber() == y.asNumber();
} // compare as numeric if both are numeric
return this->asString() == y.asString();
}
friend ostream &operator<<(ostream &os, const Var &p);
friend istream &operator>>(istream &is, const Var &p);
};
ostream &operator<<(ostream &os, const Var &p) {
os << p.asString();
return os;
}
istream &operator>>(istream &is, Var &p) {
string s;
is >> s;
p = Var(s);
return is;
}
Var letterOf(Var index, Var sourceString) {
/* index: 1-origined */
string str = sourceString.asString();
int idx = (int)(index.asNumber() - 1);
// seem to be dirty but Scratch seems to do like this.
// ex. letterOf(0.01, "world") == "w", letterOf(1.99, "world") == "w",
// letterOf(5.99, "world") == "d"
if (0 <= idx && idx < str.size())
return Var(str.substr(idx, 1));
return Var();
}
class VarList {
public:
vector<Var> data;
VarList(const vector<Var> &x) { data = x; }
void push_back(const Var &x) { data.push_back(x); }
void pop_back() { data.pop_back(); }
void clear() { data.clear(); }
int size() { return (int)data.size(); }
Var getLineOfList(const Var &index) const {
/* index: 1-origined */
int idx = (int)index.asNumber() - 1;
// (unlike 'letterOf', index==0.9 does not work.)
if (0 <= idx && idx < data.size())
return data[idx];
return Var();
}
void setLineOfListTo(const Var &index, const Var &v) {
/* index: 1-origined */
int idx = (int)index.asNumber() - 1;
if (0 <= idx && idx < data.size())
data[idx] = v;
}
void deleteLineOfList(const Var &index) {
/* index: 1-origined */
string kwd = index.asString();
if (kwd == "all") {
data.clear();
} else if (kwd == "last") {
data.pop_back();
} else {
int idx = (int)index.asNumber() - 1;
if (0 <= idx && idx < data.size())
data.erase(data.begin() + idx);
}
}
void insertAtIndexOfList(const Var &item, const Var &index) {
/* index: 1-origined */
int idx = (int)index.asNumber() - 1;
if (0 <= idx && idx <= data.size())
data.insert(data.begin() + idx, item);
}
void insertAtRandomOfList(const Var &item) {
int idx = rand() % (data.size() + 1);
data.insert(data.begin() + idx, item);
}
string asString() const {
/* concatenate elements of list with space */
// TODO: concatenated without spaces only if all elements are single
// characters. (Is it an official bug? (or feature?))
string ret;
for (int i = 0; i < data.size(); i++) {
if (i > 0)
ret += ' ';
ret += data[i].asString();
}
return ret;
}
int itemNumOfList(const Var &item) const {
auto itr = find(data.begin(), data.end(), item);
if (itr == data.end())
return 0;
return 1 + (int)(itr - data.begin());
/* index: 1-origined */
}
friend ostream &operator<<(ostream &os, const VarList &p);
};
ostream &operator<<(ostream &os, const VarList &p) {
os << p.asString();
return os;
}
double randUniform(double x, double y) {
if (x > y)
return randUniform(y, x);
if (Var::isNearInteger(x) && Var::isNearInteger(y)) {
int xi = roundToInt(x), yi = roundToInt(y);
return xi + rand() % (yi - xi + 1);
} else {
return x + (y - x) * (0.0 + rand()) / RAND_MAX;
}
}
Var buf_answer; // for "answer"
// ============================= Scripts =============================
// variable declaration
Var var_H(2);
Var var_W(5);
Var var_h(0);
Var var_w(1);
// list declaration
// prototype declaration of functions
int main();
// contents of functions
int main() {
cin >> buf_answer;
var_H = buf_answer;
cin >> buf_answer;
var_W = buf_answer;
cin >> buf_answer;
var_H = buf_answer;
cin >> buf_answer;
var_w = buf_answer;
cout << ((var_H * var_W) -
(((var_W * var_h) + (var_H * var_w)) - (var_h * var_w)))
<< endl;
return 0;
}
| /*
Converted from Scratch by scratch2cpp
(https://github.com/yos1up/scratch2cpp).
*/
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define debug \
cerr << "--" << __LINE__ << "--" \
<< "\n"
using namespace std;
const double EPS = 1e-8;
static int roundToInt(double x) {
return (x < 0) ? -(int)(-x + 0.5) : (int)(x + 0.5);
}
class Var { // NOTE: immutable
public:
string sval;
double dval;
enum VarType { STRING = 0, NUMBER = 1 };
VarType type;
enum NumericState { UNKNOWN = -1, STRINGY = 0, NUMERIC = 1 };
mutable NumericState numericState;
Var() {
sval = "";
type = STRING;
numericState = STRINGY;
} // represent null?
Var(string s) {
sval = s;
type = STRING;
numericState = UNKNOWN;
}
Var(double d) {
dval = d;
type = NUMBER;
numericState = NUMERIC;
}
Var(const Var &v) {
sval = string(v.sval);
dval = v.dval;
type = v.type;
numericState = v.numericState;
}
static bool isNumericString(const string &s) {
char *ep;
// cause side-effect: errno can be ERANGE after calling strtod
strtod(s.c_str(), &ep);
// Scratch 3.0 recognize the string cause underflows or overflows as Numeric
return NULL != ep && '\0' == ep[0] && s[0] != '\0';
// TODO: In Scratch '000' is regarded as non-numeric (but here regarded as
// numeric)
}
bool isNumeric() const {
if (type == NUMBER)
return true;
if (numericState != UNKNOWN)
return numericState == NUMERIC;
bool numeric = isNumericString(sval);
numericState = (numeric) ? NUMERIC : STRINGY;
return numeric;
}
double asNumber() const {
if (type == NUMBER)
return dval;
return (isNumeric()) ? atof(sval.c_str()) : 0.0;
}
static bool isNearInteger(const double &x) {
return fabs(round(x) - x) < EPS;
// TODO: allow integer type in Var class
}
static bool isNearNumber(const double &x, const double &y) {
return fabs(x - y) < EPS;
}
string asString() const {
if (type == STRING)
return sval;
if (isNearInteger(dval))
return to_string(roundToInt(dval));
return to_string(dval);
}
Var operator+(const Var &y) const {
return Var(this->asNumber() + y.asNumber());
}
Var operator+=(const Var &y) {
*this = *this + y;
return *this;
}
Var operator-(const Var &y) const {
return Var(this->asNumber() - y.asNumber());
}
Var operator*(const Var &y) const {
return Var(this->asNumber() * y.asNumber());
}
Var operator/(const Var &y) const {
return Var(this->asNumber() / y.asNumber());
}
Var operator%(const Var &y) const {
return Var(fmod(this->asNumber(), y.asNumber()));
}
bool operator<(const Var &y) const {
if (this->isNumeric() && y.isNumeric()) {
return this->asNumber() < y.asNumber();
} // compare as number if both can be interpreted as numeric
return this->asString() < y.asString();
}
bool operator>(const Var &y) const { return y < *this; }
bool operator==(const Var &y) const {
if (this->isNumeric() && y.isNumeric()) {
return this->asNumber() == y.asNumber();
} // compare as numeric if both are numeric
return this->asString() == y.asString();
}
friend ostream &operator<<(ostream &os, const Var &p);
friend istream &operator>>(istream &is, const Var &p);
};
ostream &operator<<(ostream &os, const Var &p) {
os << p.asString();
return os;
}
istream &operator>>(istream &is, Var &p) {
string s;
is >> s;
p = Var(s);
return is;
}
Var letterOf(Var index, Var sourceString) {
/* index: 1-origined */
string str = sourceString.asString();
int idx = (int)(index.asNumber() - 1);
// seem to be dirty but Scratch seems to do like this.
// ex. letterOf(0.01, "world") == "w", letterOf(1.99, "world") == "w",
// letterOf(5.99, "world") == "d"
if (0 <= idx && idx < str.size())
return Var(str.substr(idx, 1));
return Var();
}
class VarList {
public:
vector<Var> data;
VarList(const vector<Var> &x) { data = x; }
void push_back(const Var &x) { data.push_back(x); }
void pop_back() { data.pop_back(); }
void clear() { data.clear(); }
int size() { return (int)data.size(); }
Var getLineOfList(const Var &index) const {
/* index: 1-origined */
int idx = (int)index.asNumber() - 1;
// (unlike 'letterOf', index==0.9 does not work.)
if (0 <= idx && idx < data.size())
return data[idx];
return Var();
}
void setLineOfListTo(const Var &index, const Var &v) {
/* index: 1-origined */
int idx = (int)index.asNumber() - 1;
if (0 <= idx && idx < data.size())
data[idx] = v;
}
void deleteLineOfList(const Var &index) {
/* index: 1-origined */
string kwd = index.asString();
if (kwd == "all") {
data.clear();
} else if (kwd == "last") {
data.pop_back();
} else {
int idx = (int)index.asNumber() - 1;
if (0 <= idx && idx < data.size())
data.erase(data.begin() + idx);
}
}
void insertAtIndexOfList(const Var &item, const Var &index) {
/* index: 1-origined */
int idx = (int)index.asNumber() - 1;
if (0 <= idx && idx <= data.size())
data.insert(data.begin() + idx, item);
}
void insertAtRandomOfList(const Var &item) {
int idx = rand() % (data.size() + 1);
data.insert(data.begin() + idx, item);
}
string asString() const {
/* concatenate elements of list with space */
// TODO: concatenated without spaces only if all elements are single
// characters. (Is it an official bug? (or feature?))
string ret;
for (int i = 0; i < data.size(); i++) {
if (i > 0)
ret += ' ';
ret += data[i].asString();
}
return ret;
}
int itemNumOfList(const Var &item) const {
auto itr = find(data.begin(), data.end(), item);
if (itr == data.end())
return 0;
return 1 + (int)(itr - data.begin());
/* index: 1-origined */
}
friend ostream &operator<<(ostream &os, const VarList &p);
};
ostream &operator<<(ostream &os, const VarList &p) {
os << p.asString();
return os;
}
double randUniform(double x, double y) {
if (x > y)
return randUniform(y, x);
if (Var::isNearInteger(x) && Var::isNearInteger(y)) {
int xi = roundToInt(x), yi = roundToInt(y);
return xi + rand() % (yi - xi + 1);
} else {
return x + (y - x) * (0.0 + rand()) / RAND_MAX;
}
}
Var buf_answer; // for "answer"
// ============================= Scripts =============================
// variable declaration
Var var_H(2);
Var var_W(5);
Var var_h(0);
Var var_w(1);
// list declaration
// prototype declaration of functions
int main();
// contents of functions
int main() {
cin >> buf_answer;
var_H = buf_answer;
cin >> buf_answer;
var_W = buf_answer;
cin >> buf_answer;
var_h = buf_answer;
cin >> buf_answer;
var_w = buf_answer;
cout << ((var_H * var_W) -
(((var_W * var_h) + (var_H * var_w)) - (var_h * var_w)))
<< endl;
return 0;
}
| [
"assignment.variable.change",
"identifier.change"
] | 908,571 | 908,572 | u840958781 | cpp |
p03101 | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W, h, w, space;
cin >> H >> W;
cin >> h >> W;
space = H * W - (h * W + w * H) + h * w;
cout << space << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W, h, w, space;
cin >> H >> W;
cin >> h >> w;
space = H * W - (h * W + w * H) + h * w;
cout << space << endl;
} | [
"identifier.change",
"expression.operation.binary.change"
] | 908,575 | 908,576 | u120826790 | cpp |
p03101 | #include <algorithm>
#include <array>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef long long LL;
typedef vector<LL> VEC;
typedef vector<VEC> VVEC;
const LL INF = 1 << 30;
const LL MOD = 1000000007;
int main() {
int h, w, a, b;
cin >> h >> w >> a >> b;
cout << h * w - a * w - b * h + 1 << endl;
}
| #include <algorithm>
#include <array>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef long long LL;
typedef vector<LL> VEC;
typedef vector<VEC> VVEC;
const LL INF = 1 << 30;
const LL MOD = 1000000007;
int main() {
int h, w, a, b;
cin >> h >> w >> a >> b;
cout << h * w - a * w - b * h + a * b << endl;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 908,581 | 908,582 | u999803454 | cpp |
p03101 | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9
constexpr int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
constexpr int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b - (c * b + a * d - c + d) << endl;
} | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9
constexpr int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
constexpr int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b - (c * b + a * d - c * d) << endl;
} | [
"expression.operator.arithmetic.change",
"io.output.change"
] | 908,583 | 908,584 | u918357423 | cpp |
p03101 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
int h, w;
cin >> h >> w;
int a, b;
cin >> a >> b;
cout << a * w + b * h - a * b << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
int h, w;
cin >> h >> w;
int a, b;
cin >> a >> b;
cout << h * w - (a * w + b * h - a * b) << endl;
} | [
"expression.operation.binary.add"
] | 908,585 | 908,586 | u402472923 | cpp |
p03101 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < n; i++)
int a, b, c, d;
signed main() {
cin >> a >> b >> c >> d;
int x = a - b;
int y = c - d;
cout << x * y << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < n; i++)
int a, b, c, d;
signed main() {
cin >> a >> b >> c >> d;
int x = a - c;
int y = b - d;
cout << x * y << endl;
return 0;
} | [
"identifier.change",
"expression.operation.binary.change"
] | 908,587 | 908,588 | u988961969 | cpp |
p03101 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << (a - b) * (c - d);
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << (a - c) * (b - d);
return 0;
} | [
"identifier.change",
"io.output.change"
] | 908,592 | 908,593 | u035574325 | cpp |
p03101 | // bismillahir rahmanir rahim //Author:Fayed Anik
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define lf double
#define pb(x) push_back(x)
#define ull unsigned long long
#define sfl(a) scanf("%lld", &a)
#define sf(a) scanf("%d", &a)
#define pf(a) printf("%d\n", a)
#define pfl(a) printf("%lld\n", a)
#define pdl(a) printf("%llf\n", a)
#define FOR(x, n) for (ll x = 1; x <= n; ++x)
#define vii vector<ll> v
#define pi 3.14159265359
#define mex 10000000
#define pii pair<ll, ll>
#define mem(m, a) memset(m, a, sizeof m)
#define mp(a, b) make_pair(a, b)
#define maxn 100000
#define mod 1000000007
#define INF 1e17
#define f1 first
#define f2 second
#define all(v) v.begin(), v.end()
#define PI acos(-1)
#define printminusone printf("-1\n")
#define bug printf("bug")
int main() {
ll H, W, h, w;
cin >> H >> W >> h >> w;
ll ans = H * W;
ans -= h * W;
ans -= (H - h) * w;
pfl(min(ans, 0ll));
}
| // bismillahir rahmanir rahim //Author:Fayed Anik
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define lf double
#define pb(x) push_back(x)
#define ull unsigned long long
#define sfl(a) scanf("%lld", &a)
#define sf(a) scanf("%d", &a)
#define pf(a) printf("%d\n", a)
#define pfl(a) printf("%lld\n", a)
#define pdl(a) printf("%llf\n", a)
#define FOR(x, n) for (ll x = 1; x <= n; ++x)
#define vii vector<ll> v
#define pi 3.14159265359
#define mex 10000000
#define pii pair<ll, ll>
#define mem(m, a) memset(m, a, sizeof m)
#define mp(a, b) make_pair(a, b)
#define maxn 100000
#define mod 1000000007
#define INF 1e17
#define f1 first
#define f2 second
#define all(v) v.begin(), v.end()
#define PI acos(-1)
#define printminusone printf("-1\n")
#define bug printf("bug")
int main() {
ll H, W, h, w;
cin >> H >> W >> h >> w;
ll ans = H * W;
ans -= h * W;
ans -= (H - h) * w;
pfl(ans);
}
| [
"call.remove",
"call.arguments.change"
] | 908,594 | 908,595 | u769965655 | cpp |
p03101 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b - c - d + c * d << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b - c * b - d * a + c * d << endl;
return 0;
}
| [
"expression.operation.binary.add"
] | 908,596 | 908,597 | u863104798 | cpp |
p03101 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b - c - d - c * d << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b - c * b - d * a + c * d << endl;
return 0;
}
| [
"expression.operator.arithmetic.change",
"io.output.change"
] | 908,598 | 908,597 | u863104798 | cpp |
p03101 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
int ans;
cin >> a >> b >> c >> d;
ans = (a * b) - (c + d - (c * d));
cout << ans << endl;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
int ans;
cin >> a >> b >> c >> d;
ans = (a * b) - (c * b + d * a - (c * d));
cout << ans << endl;
} | [
"assignment.change"
] | 908,604 | 908,605 | u332510214 | cpp |
p03101 | #include <iostream>
using namespace std;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << H * W - (h * w + (w * (H - h))) << endl;
} | #include <iostream>
using namespace std;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << H * W - (h * W + w * (H - h)) << endl;
} | [
"identifier.change",
"io.output.change"
] | 908,612 | 908,613 | u170650966 | cpp |
p03101 | #include <bits/stdc++.h>
#define inf 1000000000
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
using namespace std;
typedef long long int ll;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << H * W - (W * h) - (w * w) << endl;
}
| #include <bits/stdc++.h>
#define inf 1000000000
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
using namespace std;
typedef long long int ll;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << H * W - (W * h) - (w * (H - h)) << endl;
}
| [
"io.output.change"
] | 908,614 | 908,615 | u654998183 | cpp |
p03101 | #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
int h, w;
cin >> h >> w;
int ans = H * W - (h * H) - (W - h) * w;
cout << ans << endl;
} | #include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
int h, w;
cin >> w >> h;
int ans = H * W - (h * H) - (W - h) * w;
cout << ans << endl;
} | [
"expression.operation.binary.remove"
] | 908,622 | 908,623 | u845620905 | cpp |
p03102 | #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int N, M, C;
scanf("%d %d %d", &N, &M, &C);
int B[20];
int A[20];
for (int i = 0; i < M; i++) {
scanf("%d", &B[i]);
}
int ans = 0;
for (int i = 0; i < N; i++) {
int val = 0;
for (int j = 0; j < M; j++) {
scanf("%d", &A[j]);
val += A[j] * B[i];
}
val += C;
if (val > 0)
ans++;
}
printf("%d\n", ans);
return 0;
}
| #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int N, M, C;
scanf("%d %d %d", &N, &M, &C);
int B[20];
int A[20];
for (int i = 0; i < M; i++) {
scanf("%d", &B[i]);
}
int ans = 0;
for (int i = 0; i < N; i++) {
int val = 0;
for (int j = 0; j < M; j++) {
scanf("%d", &A[j]);
val += A[j] * B[j];
}
val += C;
if (val > 0)
ans++;
}
printf("%d\n", ans);
return 0;
}
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,666 | 908,667 | u684448032 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
int main() {
int n, m, c;
cin >> n >> m >> c;
int b[m], a[m];
int ans = 0;
rep(i, m) cin >> b[i];
rep(i, n) {
int tmp = c;
rep(j, m) {
cin >> a[i];
tmp += a[i] * b[i];
}
if (tmp > 0)
++ans;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
int main() {
int n, m, c;
cin >> n >> m >> c;
int b[m], a[m];
int ans = 0;
rep(i, m) cin >> b[i];
rep(i, n) {
int tmp = c;
rep(j, m) {
cin >> a[j];
tmp += a[j] * b[j];
}
if (tmp > 0)
++ans;
}
cout << ans << endl;
return 0;
} | [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"assignment.value.change"
] | 908,668 | 908,669 | u933962236 | cpp |
p03102 | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse4")
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define int ll
#define sz(x) (int)(x).size();
#define all(x) x.begin(), x.end()
#define trav(i, a) for (auto &i : a)
inline int in() {
int x;
scanf("%lld", &x);
return x;
}
int32_t main() {
int n = in();
int m = in();
int c = in();
vector<int> b(m);
trav(i, b) { i = in(); }
vector<int> a(m);
int ans = 0;
for (int i = 0; i < n; i++) {
trav(i, a) { i = in(); }
int tmp = c;
for (int j = 0; j < m; j++) {
tmp += a[i] * b[i];
}
if (tmp > 0)
ans++;
}
cout << ans << "\n";
} | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse4")
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define int ll
#define sz(x) (int)(x).size();
#define all(x) x.begin(), x.end()
#define trav(i, a) for (auto &i : a)
inline int in() {
int x;
scanf("%lld", &x);
return x;
}
int32_t main() {
int n = in();
int m = in();
int c = in();
vector<int> b(m);
trav(i, b) { i = in(); }
vector<int> a(m);
int ans = 0;
for (int i = 0; i < n; i++) {
trav(i, a) { i = in(); }
int tmp = c;
for (int j = 0; j < m; j++) {
tmp += a[j] * b[j];
}
if (tmp > 0)
ans++;
}
cout << ans << "\n";
} | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,674 | 908,675 | u875407613 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++)
cin >> b[i];
int ans = 0;
for (int i = 0; i < n; i++) {
int t = c;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
t += a * b[i];
}
if (t > 0)
ans++;
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++)
cin >> b[i];
int ans = 0;
for (int i = 0; i < n; i++) {
int t = c;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
t += a * b[j];
}
if (t > 0)
ans++;
}
cout << ans << endl;
return 0;
}
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,681 | 908,682 | u369633456 | cpp |
p03102 | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c, ans = 0;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
vector<vector<int>> a(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < n; i++) {
int T = c;
for (int j = 0; j < m; i++) {
T += a[i][j] * b[j];
}
if (T > 0) {
ans++;
}
}
cout << ans << endl;
return 0;
}
| #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c, ans = 0;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
vector<vector<int>> a(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < n; i++) {
int T = c;
for (int j = 0; j < m; j++) {
T += a[i][j] * b[j];
}
if (T > 0) {
ans++;
}
}
cout << ans << endl;
return 0;
}
| [
"identifier.change"
] | 908,683 | 908,684 | u260502755 | cpp |
p03102 | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < N; i++) {
cin >> B[i];
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
vector<int> sum(N);
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
sum[i] += A[i][j] * B[j];
}
if (sum[i] + C > 0) {
ans++;
} else {
ans += 0;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> B[i];
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
vector<int> sum(N);
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
sum[i] += A[i][j] * B[j];
}
if (sum[i] + C > 0) {
ans++;
} else {
ans = ans;
}
}
cout << ans << endl;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"assignment.change"
] | 908,691 | 908,692 | u838276016 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++)
cin >> B[i];
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
cin >> A[i][j];
}
}
int count = 0;
for (int i = 0; i < N; i++) {
int ans = 0;
for (int j = 0; j < M; j++) {
ans += A[i][j] * B[j];
}
if (ans + C > 0)
count++;
}
cout << count << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++)
cin >> B[i];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int count = 0;
for (int i = 0; i < N; i++) {
int ans = 0;
for (int j = 0; j < M; j++) {
ans += A[i][j] * B[j];
}
if (ans + C > 0)
count++;
}
cout << count << endl;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,693 | 908,694 | u624830211 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++)
cin >> B[i];
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
cin >> A[i][j];
}
}
int count = 0;
for (int i = 0; i < M; i++) {
int ans = 0;
for (int j = 0; j < N; j++) {
ans += A[i][j] * B[j];
}
if (ans + C > 0)
count++;
}
cout << count << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++)
cin >> B[i];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int count = 0;
for (int i = 0; i < N; i++) {
int ans = 0;
for (int j = 0; j < M; j++) {
ans += A[i][j] * B[j];
}
if (ans + C > 0)
count++;
}
cout << count << endl;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,695 | 908,694 | u624830211 | cpp |
p03102 | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << endl
#define COUTF(x) cout << setprecision(15) << (x) << endl
#define ENDL cout << endl
#define DF(x) x.erase(x.begin()) // 先頭文字削除
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define REVERSE(x) reverse(ALL(x))
#ifdef _DEBUG
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
#else
#define debug(x)
#endif
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using P = pair<ll, ll>;
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr double PI = 3.141592653589793238462643383279;
ll getDigit(ll x) { return x == 0 ? 1 : log10(x) + 1; }
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
vector<P> factorize(ll n) {
vector<P> result;
for (ll i = 2; i * i <= n; ++i) {
if (n % i == 0) {
result.pb({i, 0});
while (n % i == 0) {
n /= i;
result.back().second++;
}
}
}
if (n != 1) {
result.pb({n, 1});
}
return result;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> void debugV(const vector<T> v) {
#ifdef _DEBUG
rep(i, v.size()) { cout << i << ":" << v[i] << " "; }
cout << endl;
#else
(void)v;
#endif
}
signed main() {
ll N, M, C;
cin >> N >> M >> C;
vll B(N);
rep(i, M) { cin >> B[i]; }
ll ans = 0;
rep(i, N) {
ll sum = C;
rep(j, M) {
ll a;
cin >> a;
sum += a * B[j];
}
if (sum > 0) {
ans++;
}
}
COUT(ans);
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << endl
#define COUTF(x) cout << setprecision(15) << (x) << endl
#define ENDL cout << endl
#define DF(x) x.erase(x.begin()) // 先頭文字削除
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define REVERSE(x) reverse(ALL(x))
#ifdef _DEBUG
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
#else
#define debug(x)
#endif
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using P = pair<ll, ll>;
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr double PI = 3.141592653589793238462643383279;
ll getDigit(ll x) { return x == 0 ? 1 : log10(x) + 1; }
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
vector<P> factorize(ll n) {
vector<P> result;
for (ll i = 2; i * i <= n; ++i) {
if (n % i == 0) {
result.pb({i, 0});
while (n % i == 0) {
n /= i;
result.back().second++;
}
}
}
if (n != 1) {
result.pb({n, 1});
}
return result;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> void debugV(const vector<T> v) {
#ifdef _DEBUG
rep(i, v.size()) { cout << i << ":" << v[i] << " "; }
cout << endl;
#else
(void)v;
#endif
}
signed main() {
ll N, M, C;
cin >> N >> M >> C;
vll B(M);
rep(i, M) { cin >> B[i]; }
ll ans = 0;
rep(i, N) {
ll sum = C;
rep(j, M) {
ll a;
cin >> a;
sum += a * B[j];
}
if (sum > 0) {
ans++;
}
}
COUT(ans);
return 0;
} | [] | 908,635 | 908,636 | u297738015 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, s, n) for (int i = s; i < n; i++)
#define per(i, s, n) for (int i = n - 1; i >= s; i--)
#define fi first
#define se second
#define all(c) c.begin(), c.end()
typedef long long int ll;
typedef pair<int, int> P;
typedef long double ld;
void Ans(bool x) {
if (x)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
const ll INF = 1001001001;
const ll mod = 1000000007;
int main() {
int n, m, c;
cin >> n >> m >> c;
int a[m];
int b[m];
rep(i, m) cin >> b[i];
int ans = 0;
rep(i, n) {
int d = 0;
rep(j, m) {
cin >> a[j];
d += a[j] * b[j];
}
d += c;
if (c > 0)
ans++;
}
cout << c << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, s, n) for (int i = s; i < n; i++)
#define per(i, s, n) for (int i = n - 1; i >= s; i--)
#define fi first
#define se second
#define all(c) c.begin(), c.end()
typedef long long int ll;
typedef pair<int, int> P;
typedef long double ld;
void Ans(bool x) {
if (x)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
const ll INF = 1001001001;
const ll mod = 1000000007;
int main() {
int n, m, c;
cin >> n >> m >> c;
int a[m];
int b[m];
rep(i, m) cin >> b[i];
int ans = 0;
rep(i, n) {
int d = 0;
rep(j, m) {
cin >> a[j];
d += a[j] * b[j];
}
d += c;
if (d > 0)
ans++;
}
cout << ans << endl;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"io.output.change"
] | 908,637 | 908,638 | u564204618 | cpp |
p03102 | #include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> //入出力
#include <iterator> //集合演算(積集合,和集合,差集合など)
#include <map> //map(辞書)
#include <numeric> //iota(整数列の生成),gcdとlcm(c++17)
#include <queue> //キュー
#include <set> //集合
#include <stack> //スタック
#include <string> //文字列
#include <unordered_map> //イテレータあるけど順序保持しないmap
#include <unordered_set> //イテレータあるけど順序保持しないset
#include <utility> //pair
#include <vector> //可変長配列
// vectorの重複削除
// std::sort(test.begin(), test.end());
// test.erase(std::unique(test.begin(), test.end()), test.end());
using namespace std;
using ll = long long;
using P = pair<int, int>; // vector<P> ba(n); みたいな感じですぐ使える ba[i] =
// P(a, b); make_pairをしなくてもいい
// typedef vector<int> v;
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i = 0; i < (int)v.size(); i++)
o << (i > 0 ? ", " : "") << v[i];
o << "}";
return o;
}
#define debug(v) \
{ cerr << "\033[1;36m[debug]\033[m " << #v << " : " << v << endl; }
#define rep(i, c) for (int i = 0; i < int(c); i++)
#define ALL(x) (x).begin(), (x).end() // sort(ALL(obj))みたいな
#define SIZE(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値
#define pb push_back //
// const int MOD = 1000000007;
// string alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// printf("%.20f\n", ans); あれ
// const double PI = 3.141592653589793238462643383;
int main() {
// std::vector<int> v(5);
int n, m, c;
cin >> n >> m >> c;
std::vector<int> b(m);
// std::vector<int> a(m);
int cnt = 0;
rep(i, m) cin >> b[i];
rep(i, n) {
int ans = 0;
rep(j, m) {
int num;
cin >> num;
ans += (b[i] * num);
}
if (ans + c > 0)
cnt++;
}
cout << cnt << endl;
}
| #include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> //入出力
#include <iterator> //集合演算(積集合,和集合,差集合など)
#include <map> //map(辞書)
#include <numeric> //iota(整数列の生成),gcdとlcm(c++17)
#include <queue> //キュー
#include <set> //集合
#include <stack> //スタック
#include <string> //文字列
#include <unordered_map> //イテレータあるけど順序保持しないmap
#include <unordered_set> //イテレータあるけど順序保持しないset
#include <utility> //pair
#include <vector> //可変長配列
// vectorの重複削除
// std::sort(test.begin(), test.end());
// test.erase(std::unique(test.begin(), test.end()), test.end());
using namespace std;
using ll = long long;
using P = pair<int, int>; // vector<P> ba(n); みたいな感じですぐ使える ba[i] =
// P(a, b); make_pairをしなくてもいい
// typedef vector<int> v;
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i = 0; i < (int)v.size(); i++)
o << (i > 0 ? ", " : "") << v[i];
o << "}";
return o;
}
#define debug(v) \
{ cerr << "\033[1;36m[debug]\033[m " << #v << " : " << v << endl; }
#define rep(i, c) for (int i = 0; i < int(c); i++)
#define ALL(x) (x).begin(), (x).end() // sort(ALL(obj))みたいな
#define SIZE(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値
#define pb push_back //
// const int MOD = 1000000007;
// string alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// printf("%.20f\n", ans); あれ
// const double PI = 3.141592653589793238462643383;
int main() {
// std::vector<int> v(5);
int n, m, c;
cin >> n >> m >> c;
std::vector<int> b(m);
// std::vector<int> a(m);
int cnt = 0;
rep(i, m) cin >> b[i];
rep(i, n) {
int ans = 0;
rep(j, m) {
int num;
cin >> num;
ans += (b[j] * num);
}
if ((ans + c) > 0)
cnt++;
}
cout << cnt << endl;
}
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change"
] | 908,639 | 908,640 | u694422786 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
typedef long long ll;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long INF = 1LL << 60;
const int inf = 1001001001;
const int mod = 1000000007;
using pint = pair<ll, ll>;
// union by size + path having
class UnionFind {
public:
vector<ll> par; // 各元の親を表す配列
vector<ll> siz; // 素集合のサイズを表す配列(1 で初期化)
// Constructor
UnionFind(ll sz_) : par(sz_), siz(sz_, 1LL) {
for (ll i = 0; i < sz_; ++i)
par[i] = i; // 初期では親は自分自身
}
void init(ll sz_) {
par.resize(sz_);
siz.assign(sz_, 1LL); // resize だとなぜか初期化されなかった
for (ll i = 0; i < sz_; ++i)
par[i] = i; // 初期では親は自分自身
}
// Member Function
// Find
ll root(ll x) { // 根の検索
while (par[x] != x) {
x = par[x] = par[par[x]]; // x の親の親を x の親とする
}
return x;
}
// Union(Unite, Merge)
bool unite(ll x, ll y) {
x = root(x);
y = root(y);
if (x == y)
return false;
// merge technique(データ構造をマージするテク.小を大にくっつける)
if (siz[x] < siz[y])
swap(x, y);
siz[x] += siz[y];
par[y] = x;
return true;
}
bool same(ll x, ll y) { // 連結判定
return root(x) == root(y);
}
ll size(ll x) { // 素集合のサイズ
return siz[root(x)];
}
};
ll modpow(ll x, ll n) {
x = x % mod;
if (n == 0)
return 1; //再帰の終了条件
else if (n % 2 == 1) {
return (x * modpow(x, n - 1)) % mod; // nが奇数ならnを1ずらす
} else
return modpow((x * x) % mod, n / 2) % mod; // nが偶数ならnが半分になる
}
ll com(ll n, ll k) {
ll x = 1;
for (int i = n - k + 1; i <= n; i++) {
x = x * i % mod;
}
ll y = 1;
for (int i = 1; i <= k; i++) {
y = y * i % mod;
}
y = modpow(y, mod - 2);
return x * y % mod;
}
int main() {
ll n, m, c, ans = 0;
cin >> n >> m >> c;
vector<ll> b(m);
vector<vector<ll>> a(n, vector<ll>(m));
rep(i, n) { cin >> b.at(i); }
rep(i, n) {
rep(j, m) { cin >> a.at(i).at(j); }
}
rep(i, n) {
ll x = c;
rep(j, m) { x += ((a.at(i).at(j)) * (b.at(j))); }
if (x > 0)
ans++;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
typedef long long ll;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long INF = 1LL << 60;
const int inf = 1001001001;
const int mod = 1000000007;
using pint = pair<ll, ll>;
// union by size + path having
class UnionFind {
public:
vector<ll> par; // 各元の親を表す配列
vector<ll> siz; // 素集合のサイズを表す配列(1 で初期化)
// Constructor
UnionFind(ll sz_) : par(sz_), siz(sz_, 1LL) {
for (ll i = 0; i < sz_; ++i)
par[i] = i; // 初期では親は自分自身
}
void init(ll sz_) {
par.resize(sz_);
siz.assign(sz_, 1LL); // resize だとなぜか初期化されなかった
for (ll i = 0; i < sz_; ++i)
par[i] = i; // 初期では親は自分自身
}
// Member Function
// Find
ll root(ll x) { // 根の検索
while (par[x] != x) {
x = par[x] = par[par[x]]; // x の親の親を x の親とする
}
return x;
}
// Union(Unite, Merge)
bool unite(ll x, ll y) {
x = root(x);
y = root(y);
if (x == y)
return false;
// merge technique(データ構造をマージするテク.小を大にくっつける)
if (siz[x] < siz[y])
swap(x, y);
siz[x] += siz[y];
par[y] = x;
return true;
}
bool same(ll x, ll y) { // 連結判定
return root(x) == root(y);
}
ll size(ll x) { // 素集合のサイズ
return siz[root(x)];
}
};
ll modpow(ll x, ll n) {
x = x % mod;
if (n == 0)
return 1; //再帰の終了条件
else if (n % 2 == 1) {
return (x * modpow(x, n - 1)) % mod; // nが奇数ならnを1ずらす
} else
return modpow((x * x) % mod, n / 2) % mod; // nが偶数ならnが半分になる
}
ll com(ll n, ll k) {
ll x = 1;
for (int i = n - k + 1; i <= n; i++) {
x = x * i % mod;
}
ll y = 1;
for (int i = 1; i <= k; i++) {
y = y * i % mod;
}
y = modpow(y, mod - 2);
return x * y % mod;
}
int main() {
ll n, m, c, ans = 0;
cin >> n >> m >> c;
vector<ll> b(m);
vector<vector<ll>> a(n, vector<ll>(m));
rep(i, m) { cin >> b.at(i); }
rep(i, n) {
rep(j, m) { cin >> a.at(i).at(j); }
}
rep(i, n) {
ll x = c;
rep(j, m) { x += ((a.at(i).at(j)) * (b.at(j))); }
if (x > 0)
ans++;
}
cout << ans << endl;
} | [] | 908,641 | 908,642 | u958873500 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
for (int i = 0; i < M; i++)
cin >> B[i];
int ans = 0;
int A[M];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[j];
}
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i] * B[i];
}
// cout << sum + C << endl;
if (sum + C > 0)
ans++;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
for (int i = 0; i < M; i++)
cin >> B[i];
int ans = 0;
int A[M];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[j];
}
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[j] * B[j];
}
// cout << sum + C << endl;
if (sum + C > 0)
ans++;
}
cout << ans << endl;
}
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,648 | 908,649 | u538808095 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
for (int i = 0; i < M; i++)
cin >> B[i];
int ans = 0;
int A[M];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i];
}
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i] * B[i];
}
if (sum + C > 0)
ans++;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M];
for (int i = 0; i < M; i++)
cin >> B[i];
int ans = 0;
int A[M];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[j];
}
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[j] * B[j];
}
// cout << sum + C << endl;
if (sum + C > 0)
ans++;
}
cout << ans << endl;
}
| [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"assignment.value.change"
] | 908,650 | 908,649 | u538808095 | cpp |
p03102 | #include <bits/stdc++.h>
// Useful constants
#define INF (int)1e9
#define EPS 1e-9
#define MOD 1000000007ll
#define PI 3.14159
// for input-output
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
// iteration macros: have advantage of auto-casting and not recomputing
// arguments
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local!
#define TRvi(c, it) for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) for (msi::iterator it = (c).begin(); it != (c).end(); it++)
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define setBit(S, j) (S |= (1 << j))
#define clearBit(S, j) (S &= ~(1 << j))
#define toggleBit(S, j) (S ^= (1 << j))
// input macro
#define in(x, n) \
for (int e = 0; e < n; e++) { \
ll y; \
cin >> y; \
x.pb(y); \
}
// output macro
#define print(x) \
for (auto it : x) \
cout << it << ' '; \
cout << endl;
#define printii(x) \
for (auto it : x) \
cout << it.F << ' ' << it.S << '\t'; \
cout << endl;
// shortcut for data type
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define ii pair<ll, ll>
#define pll pair<ll, ll>
#define vii vector<ii>
#define vvii vector<vii>
#define viii vector<pair<ii, ll>>
#define pb push_back
#define ppb pop_back
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define uset unordered_set
#define umap unordered_map
//--namespace
using namespace std;
//--useful function
ll gcd(ll a, ll b) {
ll temp;
while (b > 0) {
temp = a % b;
a = b;
b = temp;
}
return a;
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll fpow(ll b, ll exp, ll mod) {
if (exp == 0)
return 1;
ll t = fpow(b, exp / 2, mod);
if (exp & 1)
return t * t % mod * b % mod;
return t * t % mod;
}
ll divmod(ll i, ll j, ll mod) {
i %= mod, j %= mod;
return i * fpow(j, mod - 2, mod) % mod;
}
// --clock funtion
clock_t time_p = clock();
void TimeTaken() {
time_p = clock() - time_p;
cerr << "Completion time : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
// --solve function
void solve() {}
//--main function
int main() {
int n, m, c, a, cnt = 0, s = 0;
cin >> n >> m >> c;
vi b(m);
REP(i, 0, m - 1) cin >> b[i];
REP(i, 0, n - 1) {
REP(j, 0, m - 1) {
cin >> a;
s += a * b[j];
}
if (s + c > 0)
cnt++;
}
cout << cnt;
return 0;
// TimeTaken();
}
| #include <bits/stdc++.h>
// Useful constants
#define INF (int)1e9
#define EPS 1e-9
#define MOD 1000000007ll
#define PI 3.14159
// for input-output
#define fio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
// iteration macros: have advantage of auto-casting and not recomputing
// arguments
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local!
#define TRvi(c, it) for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) for (msi::iterator it = (c).begin(); it != (c).end(); it++)
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define setBit(S, j) (S |= (1 << j))
#define clearBit(S, j) (S &= ~(1 << j))
#define toggleBit(S, j) (S ^= (1 << j))
// input macro
#define in(x, n) \
for (int e = 0; e < n; e++) { \
ll y; \
cin >> y; \
x.pb(y); \
}
// output macro
#define print(x) \
for (auto it : x) \
cout << it << ' '; \
cout << endl;
#define printii(x) \
for (auto it : x) \
cout << it.F << ' ' << it.S << '\t'; \
cout << endl;
// shortcut for data type
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define ii pair<ll, ll>
#define pll pair<ll, ll>
#define vii vector<ii>
#define vvii vector<vii>
#define viii vector<pair<ii, ll>>
#define pb push_back
#define ppb pop_back
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define uset unordered_set
#define umap unordered_map
//--namespace
using namespace std;
//--useful function
ll gcd(ll a, ll b) {
ll temp;
while (b > 0) {
temp = a % b;
a = b;
b = temp;
}
return a;
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll fpow(ll b, ll exp, ll mod) {
if (exp == 0)
return 1;
ll t = fpow(b, exp / 2, mod);
if (exp & 1)
return t * t % mod * b % mod;
return t * t % mod;
}
ll divmod(ll i, ll j, ll mod) {
i %= mod, j %= mod;
return i * fpow(j, mod - 2, mod) % mod;
}
// --clock funtion
clock_t time_p = clock();
void TimeTaken() {
time_p = clock() - time_p;
cerr << "Completion time : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
// --solve function
void solve() {}
//--main function
int main() {
int n, m, c, a, cnt = 0, s = 0;
cin >> n >> m >> c;
vi b(m);
REP(i, 0, m - 1) cin >> b[i];
REP(i, 0, n - 1) {
REP(j, 0, m - 1) {
cin >> a;
s += a * b[j];
}
if (s + c > 0)
cnt++;
s = 0;
}
cout << cnt;
return 0;
// TimeTaken();
}
| [
"assignment.add"
] | 908,660 | 908,661 | u196507615 | cpp |
p03102 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int N, M;
int C;
cin >> N >> M >> C;
vector<int> B(N);
rep(i, M) cin >> B[i];
int ans = 0;
rep(i, N) {
ll S = 0;
rep(j, M) {
int A;
cin >> A;
S += A * B[j];
}
S += C;
if (S > 0)
ans++;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int N, M;
int C;
cin >> N >> M >> C;
vector<int> B(M);
rep(i, M) cin >> B[i];
int ans = 0;
rep(i, N) {
ll S = 0;
rep(j, M) {
int A;
cin >> A;
S += A * B[j];
}
S += C;
if (S > 0)
ans++;
}
cout << ans << endl;
return 0;
} | [] | 908,662 | 908,663 | u107464079 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<vector<int>> sorce(n, vector<int>(m));
vector<int> b(m);
vector<int> seki(n, 0);
rep(i, m) cin >> b.at(i);
rep(i, n) rep(j, m) { cin >> sorce[i][j]; }
int cnt = 0;
rep(i, n) {
rep(j, m) { seki.at(i) += sorce[i][j] * b[j]; }
if (seki.at(i) > 0)
cnt += 1;
}
cout << cnt << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<vector<int>> sorce(n, vector<int>(m));
vector<int> b(m);
vector<int> seki(n, 0);
rep(i, m) cin >> b.at(i);
rep(i, n) rep(j, m) { cin >> sorce[i][j]; }
int cnt = 0;
rep(i, n) {
rep(j, m) { seki.at(i) += sorce[i][j] * b[j]; }
if (seki.at(i) + c > 0)
cnt += 1;
}
cout << cnt << endl;
} | [
"control_flow.branch.if.condition.change"
] | 908,697 | 908,698 | u436660228 | cpp |
p03102 | // #include <bits/stdc++.h>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = 0; i < (f); --i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MAX = 100;
const int INF = (1 << 12);
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> B(n);
rep(i, m) cin >> B[i];
int ans = 0;
rep(i, n) {
int sum = c;
rep(j, m) {
int a;
cin >> a;
sum += a * B[j];
}
if (sum > 0)
ans++;
}
cout << ans << endl;
return 0;
} | // #include <bits/stdc++.h>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = 0; i < (f); --i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MAX = 100;
const int INF = (1 << 12);
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> B(m);
rep(i, m) cin >> B[i];
int ans = 0;
rep(i, n) {
int sum = c;
rep(j, m) {
int a;
cin >> a;
sum += a * B[j];
}
if (sum > 0)
ans++;
}
cout << ans << endl;
return 0;
} | [] | 908,699 | 908,700 | u543489264 | cpp |
p03102 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, C, sum, res;
cin >> N >> M >> C;
vector<int> A, B;
for (int i = 0; i < M; i++) {
cin >> B.at(i);
}
res = 0;
for (int j = 0; j < N; j++) {
sum = C;
for (int i = 0; i < M; i++) {
cin >> A.at(i);
sum += A.at(i) * B.at(i);
}
if (sum > 0) {
res++;
}
}
cout << res << endl;
return 0;
}
| #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, C, sum, res;
cin >> N >> M >> C;
vector<int> A(M), B(M);
for (int i = 0; i < M; i++) {
cin >> B.at(i);
}
res = 0;
for (int j = 0; j < N; j++) {
sum = C;
for (int i = 0; i < M; i++) {
cin >> A.at(i);
sum += A.at(i) * B.at(i);
}
if (sum > 0) {
res++;
}
}
cout << res << endl;
return 0;
}
| [] | 908,701 | 908,702 | u410888565 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef map<int, int> mii;
typedef map<ll, ll> mll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define fi first
#define se second
#define pi 3.141592653589793
#define mod 1e9 + 7
#define pb push_back
#define all(v) v.begin(), v.end()
#define rall(v) v.begin(), v.end(), greater<ll>()
#define tc \
int t; \
cin >> t; \
while (t--)
#define pqmax priority_queue<int>
#define pqmin priority_queue<int, vi, greater<int>>
#define fast_io ios_base::sync_with_stdio(0), cin.tie(NULL)
#define tc_g \
int tt; \
cin >> tt; \
for (int ti = 1; ti <= tt; ti++)
#define case_g "Case #" << ti << ": "
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_multiset;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
typedef tree<int, int, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_map;
using namespace std;
int main() {
ll n, m, c, num;
cin >> n >> m >> c;
vl b(m);
for (auto &it : b)
cin >> it;
int ans = 0;
for (int i = 0; i < n; ++i) {
ll temp = 0;
for (int j = 0; j < m; ++j) {
cin >> num;
temp += (num * b[i]);
}
if ((temp + c) > 0)
++ans;
}
cout << ans;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef map<int, int> mii;
typedef map<ll, ll> mll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define fi first
#define se second
#define pi 3.141592653589793
#define mod 1e9 + 7
#define pb push_back
#define all(v) v.begin(), v.end()
#define rall(v) v.begin(), v.end(), greater<ll>()
#define tc \
int t; \
cin >> t; \
while (t--)
#define pqmax priority_queue<int>
#define pqmin priority_queue<int, vi, greater<int>>
#define fast_io ios_base::sync_with_stdio(0), cin.tie(NULL)
#define tc_g \
int tt; \
cin >> tt; \
for (int ti = 1; ti <= tt; ti++)
#define case_g "Case #" << ti << ": "
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_multiset;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
typedef tree<int, int, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_map;
using namespace std;
int main() {
ll n, m, c, num;
cin >> n >> m >> c;
vl b(m);
for (auto &it : b)
cin >> it;
int ans = 0;
for (int i = 0; i < n; ++i) {
ll temp = 0;
for (int j = 0; j < m; ++j) {
cin >> num;
temp += (num * b[j]);
}
if ((temp + c) > 0)
++ans;
}
cout << ans;
}
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,703 | 908,704 | u688862905 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M, C, B[21], A[21][21];
cin >> N >> M >> C;
for (int i = 0; i < M; ++i) {
cin >> B[i];
}
for (int i = 0; i < N; ++i) {
for (int j = 0; j < M; ++j) {
cin >> A[i][j];
}
}
int correct_code = 0;
for (int i = 0; i < N; ++i) {
int result = 0;
for (int j = 0; j < M; ++j) {
result += A[i][j] * B[j];
}
if (result + C) {
correct_code++;
}
}
cout << correct_code << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M, C, B[21], A[21][21];
cin >> N >> M >> C;
for (int i = 0; i < M; ++i) {
cin >> B[i];
}
for (int i = 0; i < N; ++i) {
for (int j = 0; j < M; ++j) {
cin >> A[i][j];
}
}
int correct_code = 0;
for (int i = 0; i < N; ++i) {
int result = 0;
for (int j = 0; j < M; ++j) {
result += A[i][j] * B[j];
}
if ((result + C) > 0) {
correct_code++;
}
}
cout << correct_code << endl;
return 0;
}
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 908,711 | 908,712 | u791883159 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c, k = 0;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
vector<vector<int>> a(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < n; i++) {
int nm = 0;
for (int j = 0; j < m; j++) {
nm += b[j] * a[i][j];
}
if (nm > 0) {
k++;
}
}
cout << k << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c, k = 0;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
vector<vector<int>> a(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < n; i++) {
int nm = c;
for (int j = 0; j < m; j++) {
nm += b[j] * a[i][j];
}
if (nm > 0) {
k++;
}
}
cout << k << endl;
}
| [
"variable_declaration.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 908,716 | 908,717 | u834753207 | cpp |
p03102 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M], A[N][M];
for (int i = 0; i < M; i++) {
cin >> B[i];
}
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += B[j] * A[i][j];
}
if (sum + C > 0) {
ans++;
}
}
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M], A[N][M];
for (int i = 0; i < M; i++) {
cin >> B[i];
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += B[j] * A[i][j];
}
if (sum + C > 0) {
ans++;
}
}
cout << ans << endl;
return 0;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,724 | 908,725 | u249466958 | cpp |
p03102 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M], A[N][M];
for (int i = 0; i < M; i++) {
cin >> B[i];
}
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += B[j] * A[i][j];
}
if (sum - C > 0) {
ans++;
}
}
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
int B[M], A[N][M];
for (int i = 0; i < M; i++) {
cin >> B[i];
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += B[j] * A[i][j];
}
if (sum + C > 0) {
ans++;
}
}
cout << ans << endl;
return 0;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 908,726 | 908,725 | u249466958 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int n, m, c;
int main() {
int res = 0;
cin >> n >> m >> c;
vector<int> b(m + 1);
for (auto &x : b) {
cin >> x;
}
for (int i = 1; i <= n; i++) {
int sum = c;
for (int j = 1; j <= m; j++) {
int x;
cin >> x;
sum += b[j - 1] * x;
}
res += (sum > 0);
}
cout << res << "\n";
} | #include <bits/stdc++.h>
using namespace std;
int n, m, c;
int main() {
int res = 0;
cin >> n >> m >> c;
vector<int> b(m);
for (auto &x : b) {
cin >> x;
}
for (int i = 1; i <= n; i++) {
int sum = c;
for (int j = 1; j <= m; j++) {
int x;
cin >> x;
sum += b[j - 1] * x;
}
res += (sum > 0);
}
cout << res << "\n";
}
| [
"expression.operation.binary.remove"
] | 908,729 | 908,730 | u424091517 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (int i = 0; i < c; i++)
#define swap(a, b, type) \
do { \
type temp; \
temp = a; \
a = b; \
b = temp; \
} while (0);
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
int a[n][m];
rep(i, m) { cin >> b[i]; }
rep(i, n) {
rep(j, m) { cin >> a[i][j]; }
}
int ans = 0;
rep(i, n) {
int d = 0;
rep(j, m) { d += a[i][j] * b[i]; }
if (d + c > 0) {
++ans;
}
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (int i = 0; i < c; i++)
#define swap(a, b, type) \
do { \
type temp; \
temp = a; \
a = b; \
b = temp; \
} while (0);
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
int a[n][m];
rep(i, m) { cin >> b[i]; }
rep(i, n) {
rep(j, m) { cin >> a[i][j]; }
}
int ans = 0;
rep(i, n) {
int d = 0;
rep(j, m) { d += a[i][j] * b[j]; }
if (d + c > 0) {
++ans;
}
}
cout << ans << endl;
return 0;
}
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,731 | 908,732 | u717762991 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a, b, C;
cin >> a >> b >> C;
vector<ll> vec(a);
for (ll i = 0; i < a; i++) {
cin >> vec.at(i);
}
ll c = 0;
for (ll i = 0; i < b; i++) {
ll d = C;
for (ll j = 0; j < a; j++) {
ll e;
cin >> e;
d += e * vec.at(j);
}
if (d > 0) {
c += 1;
}
}
cout << c << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a, b, C;
cin >> a >> b >> C;
vector<ll> vec(b);
for (ll i = 0; i < b; i++) {
cin >> vec.at(i);
}
ll c = 0;
for (ll i = 0; i < a; i++) {
ll d = C;
for (ll j = 0; j < b; j++) {
ll e;
cin >> e;
d += e * vec.at(j);
}
if (d > 0) {
c += 1;
}
}
cout << c << endl;
return 0;
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,739 | 908,740 | u883297128 | cpp |
p03102 | /* 競プロ用のテンプレ
* SKMT
* 作成日 2020年09月06日 15:46
* ファイル名 ABC121_b.cpp
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main(int argc, char const *argv[]) {
int N, M, C;
cin >> N >> M >> C;
vector<int> b(M);
vector<vector<int>> a(N, vector<int>(M));
rep(i, M) cin >> b.at(i);
rep(i, N) {
rep(j, M) {
int temp;
cin >> temp;
a.at(i).at(j) = temp;
}
}
int cnt = 0;
long sum = C;
rep(i, N) {
rep(j, M) { sum += a.at(i).at(j) * b.at(j); }
if (sum > 0)
cnt++;
sum = 0;
}
cout << cnt << endl;
return 0;
}
| /* 競プロ用のテンプレ
* SKMT
* 作成日 2020年09月06日 15:46
* ファイル名 ABC121_b.cpp
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main(int argc, char const *argv[]) {
int N, M, C;
cin >> N >> M >> C;
vector<int> b(M);
vector<vector<int>> a(N, vector<int>(M));
rep(i, M) cin >> b.at(i);
rep(i, N) {
rep(j, M) {
int temp;
cin >> temp;
a.at(i).at(j) = temp;
}
}
int cnt = 0;
long sum = C;
rep(i, N) {
rep(j, M) { sum += a.at(i).at(j) * b.at(j); }
if (sum > 0)
cnt++;
sum = C;
}
cout << cnt << endl;
return 0;
}
| [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 908,745 | 908,746 | u601218364 | cpp |
p03102 | /* 競プロ用のテンプレ
* SKMT
* 作成日 2020年09月06日 15:46
* ファイル名 ABC121_b.cpp
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main(int argc, char const *argv[]) {
int N, M, C;
cin >> N >> M >> C;
vector<int> b(M);
vector<vector<int>> a(N, vector<int>(M));
rep(i, M) cin >> b.at(i);
rep(i, N) {
rep(j, M) {
int temp;
cin >> temp;
a.at(i).at(j) = temp;
}
}
int cnt = 0;
long sum = C;
rep(i, N) {
rep(j, M) { sum += a.at(i).at(j) * b.at(j); }
if (sum > 0)
cnt++;
}
cout << cnt << endl;
return 0;
}
| /* 競プロ用のテンプレ
* SKMT
* 作成日 2020年09月06日 15:46
* ファイル名 ABC121_b.cpp
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main(int argc, char const *argv[]) {
int N, M, C;
cin >> N >> M >> C;
vector<int> b(M);
vector<vector<int>> a(N, vector<int>(M));
rep(i, M) cin >> b.at(i);
rep(i, N) {
rep(j, M) {
int temp;
cin >> temp;
a.at(i).at(j) = temp;
}
}
int cnt = 0;
long sum = C;
rep(i, N) {
rep(j, M) { sum += a.at(i).at(j) * b.at(j); }
if (sum > 0)
cnt++;
sum = C;
}
cout << cnt << endl;
return 0;
}
| [
"assignment.add"
] | 908,747 | 908,746 | u601218364 | cpp |
p03102 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tl3;
const int BIG_NUM = 1e9;
const ll INF = 1000000000000000000;
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
vector<vector<int>> a(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
int cnt = 0;
for (int i = 0; i < n; i++) {
int s = 0;
for (int j = 0; j < m; j++) {
s += a[i][j] * b[j];
}
if (s > 0) {
cnt++;
}
}
cout << cnt << endl;
}
| #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tl3;
const int BIG_NUM = 1e9;
const ll INF = 1000000000000000000;
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
vector<vector<int>> a(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
int cnt = 0;
for (int i = 0; i < n; i++) {
int s = c;
for (int j = 0; j < m; j++) {
s += a[i][j] * b[j];
}
if (s > 0) {
cnt++;
}
}
cout << cnt << endl;
}
| [
"variable_declaration.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 908,756 | 908,757 | u156778176 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b.at(i);
}
vector<vector<int>> data(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> data.at(i).at(j);
}
}
int kauto = 0;
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
kauto += data.at(i).at(j) * b.at(j);
if (j = m - 1) {
if (kauto + c > 0) {
count++;
}
kauto = 0;
}
}
}
cout << count << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b.at(i);
}
vector<vector<int>> data(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> data.at(i).at(j);
}
}
int kauto = 0;
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
kauto += data.at(i).at(j) * b.at(j);
if (j == m - 1) {
if (kauto + c > 0) {
count++;
}
kauto = 0;
}
}
}
cout << count << endl;
} | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 908,769 | 908,770 | u926006934 | cpp |
p03102 | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x) \
for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define input(array) \
repi(_itr, array) { cin >> *(_itr); }
#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
string solve(bool a) { return ((a) ? "Yes" : "No"); }
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long INFLL = 1LL << 60;
const int INF = 1 << 30;
const double PI = acos(-1);
int main() {
int n, m, c;
int ans = 0;
int cnt = 0;
cin >> n >> m >> c;
Vi b(m);
VVi a(n, Vi(m));
input(b);
rep(i, n) { input(a[i]); }
rep(i, n) {
cnt = 0;
rep(j, m) { cnt += a[i][j] * b[j]; }
ans += (cnt == c);
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x) \
for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define input(array) \
repi(_itr, array) { cin >> *(_itr); }
#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
string solve(bool a) { return ((a) ? "Yes" : "No"); }
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long INFLL = 1LL << 60;
const int INF = 1 << 30;
const double PI = acos(-1);
int main() {
int n, m, c;
int ans = 0;
int cnt = 0;
cin >> n >> m >> c;
Vi b(m);
VVi a(n, Vi(m));
input(b);
rep(i, n) { input(a[i]); }
rep(i, n) {
cnt = 0;
rep(j, m) { cnt += a[i][j] * b[j]; }
ans += (cnt > -c);
}
cout << ans << endl;
} | [
"expression.operator.compare.change",
"assignment.value.change",
"expression.operation.binary.change",
"expression.operation.unary.add"
] | 908,771 | 908,772 | u179778090 | cpp |
p03102 | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x) \
for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define input(array) \
repi(_itr, array) { cin >> *(_itr); }
#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
string solve(bool a) { return ((a) ? "Yes" : "No"); }
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long INFLL = 1LL << 60;
const int INF = 1 << 30;
const double PI = acos(-1);
int main() {
int n, m, c;
int ans = 0;
int cnt = 0;
cin >> n >> m >> c;
Vi b(m);
VVi a(n, Vi(m));
input(b);
rep(i, n) { input(a[i]); }
rep(i, n) {
cnt = 0;
rep(j, m) { cnt += a[i][j] * b[j]; }
ans += (cnt == 0);
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x) \
for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define input(array) \
repi(_itr, array) { cin >> *(_itr); }
#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
string solve(bool a) { return ((a) ? "Yes" : "No"); }
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const long long INFLL = 1LL << 60;
const int INF = 1 << 30;
const double PI = acos(-1);
int main() {
int n, m, c;
int ans = 0;
int cnt = 0;
cin >> n >> m >> c;
Vi b(m);
VVi a(n, Vi(m));
input(b);
rep(i, n) { input(a[i]); }
rep(i, n) {
cnt = 0;
rep(j, m) { cnt += a[i][j] * b[j]; }
ans += (cnt > -c);
}
cout << ans << endl;
} | [
"expression.operation.unary.add"
] | 908,773 | 908,772 | u179778090 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define int long long
constexpr long long INF = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
signed main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, M, C;
cin >> N >> M >> C;
int B[M];
rep(i, M) { cin >> B[M]; }
int A[N][M];
rep(i, N) {
rep(j, M) { cin >> A[i][j]; }
}
int ans = 0;
rep(i, N) {
int sum = C;
rep(j, M) { sum += A[i][j] * B[j]; }
if (sum > 0)
ans++;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define int long long
constexpr long long INF = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
signed main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, M, C;
cin >> N >> M >> C;
int B[M];
rep(i, M) { cin >> B[i]; }
int A[N][M];
rep(i, N) {
rep(j, M) { cin >> A[i][j]; }
}
int ans = 0;
rep(i, N) {
int sum = C;
rep(j, M) { sum += A[i][j] * B[j]; }
if (sum > 0)
ans++;
}
cout << ans << endl;
}
| [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,774 | 908,775 | u093973314 | cpp |
p03102 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> B.at(i);
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[j];
if (sum > -C) {
ans++;
}
}
}
cout << ans << endl;
}
| #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> B.at(i);
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[j];
}
if (sum > -C) {
ans++;
}
}
cout << ans << endl;
}
| [] | 908,776 | 908,777 | u507349898 | cpp |
p03102 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> B.at(i);
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[j] + C;
if (sum > 0) {
ans++;
}
}
}
cout << ans << endl;
} | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> B.at(i);
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[j];
}
if (sum > -C) {
ans++;
}
}
cout << ans << endl;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change",
"expression.operation.unary.add"
] | 908,778 | 908,777 | u507349898 | cpp |
p03102 | /*
author : nishi5451
created : 14.08.2020 23:56:55
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
rep(i, m) cin >> b[m];
int ans = 0;
rep(i, n) {
int now = c;
rep(j, m) {
int a;
cin >> a;
now += a * b[j];
}
if (now > 0)
ans++;
}
cout << ans << endl;
return 0;
} | /*
author : nishi5451
created : 14.08.2020 23:56:55
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
rep(i, m) cin >> b[i];
int ans = 0;
rep(i, n) {
int now = c;
rep(j, m) {
int a;
cin >> a;
now += a * b[j];
}
if (now > 0)
ans++;
}
cout << ans << endl;
return 0;
} | [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,779 | 908,780 | u033937898 | cpp |
p03102 | /*
author : nishi5451
created : 14.08.2020 23:56:55
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
rep(i, m) cin >> b[m];
int ans = 0;
rep(i, n) {
int now = c;
rep(j, m) {
int a;
cin >> a;
now += a * b[i];
}
if (now > 0)
ans++;
}
cout << ans << endl;
return 0;
} | /*
author : nishi5451
created : 14.08.2020 23:56:55
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
rep(i, m) cin >> b[i];
int ans = 0;
rep(i, n) {
int now = c;
rep(j, m) {
int a;
cin >> a;
now += a * b[j];
}
if (now > 0)
ans++;
}
cout << ans << endl;
return 0;
} | [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"assignment.value.change"
] | 908,781 | 908,780 | u033937898 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
int ans = 0;
for (int i = 0; i < n; i++) {
cin >> b[i];
}
for (int i = 0; i < n; i++) {
vector<int> a(m);
int sum = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i] * b[i];
}
if (sum + c > 0) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
int ans = 0;
for (int i = 0; i < m; i++) {
cin >> b[i];
}
for (int i = 0; i < n; i++) {
vector<int> a(m);
int sum = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i] * b[i];
}
if (sum + c > 0) {
ans++;
}
}
cout << ans << endl;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,784 | 908,785 | u225777148 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
int ans = 0;
for (int i = 0; i < n; i++) {
cin >> b[i];
}
for (int i = 0; i < n; i++) {
vector<int> a(m);
int sum = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i] * b[i];
}
if (sum > 0) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
int ans = 0;
for (int i = 0; i < m; i++) {
cin >> b[i];
}
for (int i = 0; i < n; i++) {
vector<int> a(m);
int sum = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
sum += a[i] * b[i];
}
if (sum + c > 0) {
ans++;
}
}
cout << ans << endl;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change"
] | 908,786 | 908,785 | u225777148 | cpp |
p03102 | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
int n, m, c, i = 0, j = 0, ans, anss = 0;
cin >> n >> m >> c;
vector<int> b(m);
vector<vector<int>> a(n, vector<int>(m));
rep(i, m) { cin >> b.at(i); }
rep(i, n) {
ans = 0;
rep(j, m) {
cin >> a.at(i).at(j);
ans += a.at(i).at(j) * b.at(j);
if (ans + c > 0) {
anss++;
}
}
}
cout << anss << endl;
return 0;
} | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
int n, m, c, i = 0, j = 0, ans = 0, anss = 0;
cin >> n >> m >> c;
vector<int> b(m);
vector<vector<int>> a(n, vector<int>(m));
rep(i, m) { cin >> b.at(i); }
rep(i, n) {
ans = 0;
rep(j, m) {
cin >> a.at(i).at(j);
ans += a.at(i).at(j) * b.at(j);
}
if (ans + c > 0) {
anss++;
}
}
cout << anss << endl;
return 0;
} | [
"variable_declaration.value.change"
] | 908,787 | 908,788 | u965667196 | cpp |
p03102 | #include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <fstream> //ファイルストリーム(標準入力変更用)
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> //入出力
#include <iterator> //集合演算(積集合,和集合,差集合など)
#include <map> //map(辞書)
#include <numeric> //iota(整数列の生成),gcdとlcm(c++17)
#include <queue> //キュー
#include <set> //集合
#include <stack> //スタック
#include <string> //文字列
#include <unordered_map> //イテレータあるけど順序保持しないmap
#include <unordered_set> //イテレータあるけど順序保持しないset
#include <utility> //pair
#include <vector> //可変長配列
//名前
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef map<string, int> msi;
typedef map<string, ll> msll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pllll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef vector<vector<string>> vvs;
typedef vector<vector<bool>> vvb;
//定数
const ll MOD = 1000000007;
const ll INF = 1000000000000000000;
//マクロ
#define rep(i, n) for (int i = 0; i < n; i++)
#define reps(i, s, e) for (int i = s; i < e; i++)
#define repse(i, s, e) for (int i = s; i <= e; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define in(x1) cin >> x1
#define in2(x1, x2) cin >> x1 >> x2
#define in3(x1, x2, x3) cin >> x1 >> x2 >> x3
#define outl(x) cout << x << endl
#define out2l(x, y) cout << x << " " << y << endl
//よく使う関数
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
//標準入力をファイルに変更
// std::ifstream in("input.txt");
// std::cin.rdbuf(in.rdbuf());
int N, M;
in2(N, M);
ll C;
in(C);
vll B(M);
rep(i, M) in(B[i]);
int count = 0;
rep(_, N) {
vll A(M);
rep(i, N) in(A[i]);
ll tmp = 0;
rep(i, M) tmp += A[i] * B[i];
if (tmp + C > 0)
count++;
}
outl(count);
return 0;
} | #include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <fstream> //ファイルストリーム(標準入力変更用)
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> //入出力
#include <iterator> //集合演算(積集合,和集合,差集合など)
#include <map> //map(辞書)
#include <numeric> //iota(整数列の生成),gcdとlcm(c++17)
#include <queue> //キュー
#include <set> //集合
#include <stack> //スタック
#include <string> //文字列
#include <unordered_map> //イテレータあるけど順序保持しないmap
#include <unordered_set> //イテレータあるけど順序保持しないset
#include <utility> //pair
#include <vector> //可変長配列
//名前
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef map<string, int> msi;
typedef map<string, ll> msll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pllll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef vector<vector<string>> vvs;
typedef vector<vector<bool>> vvb;
//定数
const ll MOD = 1000000007;
const ll INF = 1000000000000000000;
//マクロ
#define rep(i, n) for (int i = 0; i < n; i++)
#define reps(i, s, e) for (int i = s; i < e; i++)
#define repse(i, s, e) for (int i = s; i <= e; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define in(x1) cin >> x1
#define in2(x1, x2) cin >> x1 >> x2
#define in3(x1, x2, x3) cin >> x1 >> x2 >> x3
#define outl(x) cout << x << endl
#define out2l(x, y) cout << x << " " << y << endl
//よく使う関数
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
//標準入力をファイルに変更
// std::ifstream in("input.txt");
// std::cin.rdbuf(in.rdbuf());
int N, M;
in2(N, M);
ll C;
in(C);
vll B(M);
rep(i, M) in(B[i]);
int count = 0;
rep(_, N) {
vll A(M);
rep(i, M) in(A[i]);
ll tmp = 0;
rep(i, M) tmp += A[i] * B[i];
if (tmp + C > 0)
count++;
}
outl(count);
return 0;
} | [
"identifier.change",
"call.arguments.change"
] | 908,789 | 908,790 | u889915625 | cpp |
p03102 | #include <iostream>
using namespace std;
int main() {
int N;
int M;
int C;
cin >> N >> M >> C;
int i;
int B[M];
for (i = 0; i <= M - 1; i++) {
cin >> B[i];
}
int j;
int A[N][M];
for (i = 0; i <= N - 1; i++) {
for (j = 0; j <= M - 1; j++) {
cin >> A[i][j];
}
}
int CHECK;
int ans = 0;
for (i = 0; i <= N - 1; i++) {
CHECK = 0;
CHECK += C;
for (j = 0; j <= M - 1; j++) {
CHECK += A[i][j] * B[j];
}
if (CHECK >= 0)
ans++;
}
cout << ans;
} | #include <iostream>
using namespace std;
int main() {
int N;
int M;
int C;
cin >> N >> M >> C;
int i;
int B[M];
for (i = 0; i <= M - 1; i++) {
cin >> B[i];
}
int j;
int A[N][M];
for (i = 0; i <= N - 1; i++) {
for (j = 0; j <= M - 1; j++) {
cin >> A[i][j];
}
}
int CHECK;
int ans = 0;
for (i = 0; i <= N - 1; i++) {
CHECK = 0;
CHECK += C;
for (j = 0; j <= M - 1; j++) {
CHECK += A[i][j] * B[j];
}
if (CHECK > 0)
ans++;
}
cout << ans;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 908,791 | 908,792 | u328530240 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
int ans = 0;
for (int i = 0; i < n; i++) {
vector<int> a(m);
for (int i = 0; i < m; i++) {
cin >> a[i];
}
int f = 0;
for (int j = 0; j < m; j++) {
f += a[i] * b[i];
}
if ((f + c) > 0) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
for (int i = 0; i < m; i++) {
cin >> b[i];
}
int ans = 0;
for (int i = 0; i < n; i++) {
vector<int> a(m);
for (int i = 0; i < m; i++) {
cin >> a[i];
}
int f = 0;
for (int j = 0; j < m; j++) {
f += a[j] * b[j];
}
if ((f + c) > 0) {
ans++;
}
}
cout << ans << endl;
} | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,799 | 908,800 | u210234656 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | [
"variable_declaration.value.change"
] | 908,801 | 908,802 | u692550512 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"variable_declaration.value.change"
] | 908,804 | 908,802 | u692550512 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | [
"variable_declaration.type.change",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"variable_declaration.value.change"
] | 908,805 | 908,802 | u692550512 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < M; i++) {
int b;
cin >> b;
B.at(i) = b;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int a;
cin >> a;
A.at(i).at(j) = a;
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int s = 0;
for (int j = 0; j < M; j++) {
s += B.at(j) * A.at(i).at(j);
}
s += C;
if (s > 0) {
ans++;
}
}
cout << ans << endl;
} | [
"variable_declaration.type.change",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,806 | 908,802 | u692550512 | cpp |
p03102 | #include <iostream>
#include <vector>
int main() {
int n, m, c;
std::cin >> n >> m >> c;
std::vector<long long> b(n, 0);
int a = 0;
for (int mm = 0; mm < m; mm++) {
std::cin >> b[mm];
}
for (int nn = 0; nn < n; nn++) {
long long s = 0;
for (int mm = 0; mm < m; mm++) {
int a;
std::cin >> a;
s += a * b[mm];
}
if (s + c > 0) {
a++;
}
}
std::cout << a << std::endl;
return 0;
} | #include <iostream>
#include <vector>
int main() {
int n, m, c;
std::cin >> n >> m >> c;
std::vector<long long> b(m, 0);
int a = 0;
for (int mm = 0; mm < m; mm++) {
std::cin >> b[mm];
}
for (int nn = 0; nn < n; nn++) {
long long s = 0;
for (int mm = 0; mm < m; mm++) {
int a;
std::cin >> a;
s += a * b[mm];
}
if (s + c > 0) {
a++;
}
}
std::cout << a << std::endl;
return 0;
} | [
"identifier.change",
"call.arguments.change"
] | 908,807 | 908,808 | u730447703 | cpp |
p03102 | #include <bits/stdc++.h>
#define MOD (long long)(1E9 + 7)
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n, m, c, cnt = 0;
cin >> n >> m >> c;
vector<int> b(n);
rep(i, m) { cin >> b[i]; }
rep(i, n) {
int a, t = 0;
rep(j, m) {
cin >> a;
t += a * b[j];
}
t += c;
if (t > 0)
cnt++;
}
cout << cnt << endl;
} | #include <bits/stdc++.h>
#define MOD (long long)(1E9 + 7)
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n, m, c, cnt = 0;
cin >> n >> m >> c;
vector<int> b(m);
rep(i, m) { cin >> b[i]; }
rep(i, n) {
int a, t = 0;
rep(j, m) {
cin >> a;
t += a * b[j];
}
t += c;
if (t > 0)
cnt++;
}
cout << cnt << endl;
}
| [] | 908,817 | 908,818 | u503170128 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
int a[n][m];
int b[m];
for (int i = 0; i < m; i++)
cin >> b[i];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
int co = 0;
int x = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
x += a[i][j] * b[j];
}
x += c;
if (x > 0)
co++;
}
cout << co << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
int a[n][m];
int b[m];
for (int i = 0; i < m; i++)
cin >> b[i];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
int co = 0;
int x = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
x += a[i][j] * b[j];
}
x += c;
if (x > 0)
co++;
x = 0;
}
cout << co << endl;
return 0;
}
| [
"assignment.add"
] | 908,823 | 908,824 | u681869152 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int i, j, n, m, k, l, b[20], a, c;
int main() {
for (cin >> n >> m >> c; i < m; i++)
cin >> b[i];
for (i = 0; i < n; i++) {
for (k = 0, j = 0; j < m; j++)
cin >> a;
k += (a * b[j]);
if (k > -1 * c)
l++;
}
cout << l;
} | #include <bits/stdc++.h>
using namespace std;
int i, j, n, m, k, l, b[20], a, c;
int main() {
for (cin >> n >> m >> c; i < m; i++)
cin >> b[i];
for (i = 0; i < n; i++) {
for (k = 0, j = 0; j < m; j++) {
cin >> a;
k += (a * b[j]);
}
if (k > -1 * c)
l++;
}
cout << l;
} | [] | 908,826 | 908,827 | u303621502 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, M, C, T;
cin >> N >> M >> C;
T = 0;
vector<long long> b(M);
for (int i = 0; i < M; i++) {
cin >> b[i];
}
for (int i = 0; i < N; i++) {
vector<long long> a(M);
for (int j = 0; j < M; j++) {
cin >> a[j];
}
long long Z = 0;
for (int j = 0; j < M; j++) {
Z += a[j] + b[j];
}
if (Z + C > 0) {
T++;
}
}
cout << T << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, M, C, T;
cin >> N >> M >> C;
T = 0;
vector<long long> b(M);
for (int i = 0; i < M; i++) {
cin >> b[i];
}
for (int i = 0; i < N; i++) {
vector<long long> a(M);
for (int j = 0; j < M; j++) {
cin >> a[j];
}
long long Z = 0;
for (int j = 0; j < M; j++) {
Z += a[j] * b[j];
}
if (Z + C > 0) {
T++;
}
}
cout << T << endl;
} | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 908,846 | 908,847 | u261947526 | cpp |
p03102 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, c, i, j, ans = 0, s = 0;
cin >> n >> m >> c;
int a[n][m], b[m];
for (i = 0; i < m; i++) {
cin >> b[i];
}
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
s += b[j] * a[i][j];
}
s += c;
if (s > 0)
ans++;
}
cout << ans << endl;
return 0;
}
| #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, c, i, j, ans = 0, s = 0;
cin >> n >> m >> c;
int a[n][m], b[m];
for (i = 0; i < m; i++) {
cin >> b[i];
}
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
s += b[j] * a[i][j];
}
s += c;
if (s > 0)
ans++;
s = 0;
}
cout << ans << endl;
return 0;
}
| [
"assignment.add"
] | 908,850 | 908,851 | u056912761 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++)
cin >> B.at(i);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++)
cin >> A.at(i).at(j);
}
int sum = 0;
for (int i = 0; i < N; i++) {
int sum1 = C;
for (int j = 0; j < M; j++)
sum1 += B.at(j) * A.at(i).at(j);
if (0 <= sum1)
sum++;
}
cout << sum << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++)
cin >> B.at(i);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++)
cin >> A.at(i).at(j);
}
int sum = 0;
for (int i = 0; i < N; i++) {
int sum1 = C;
for (int j = 0; j < M; j++)
sum1 += B.at(j) * A.at(i).at(j);
if (0 < sum1)
sum++;
}
cout << sum << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 908,852 | 908,853 | u101018317 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++)
cin >> B.at(i);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++)
cin >> A.at(i).at(j);
}
int sum = C;
for (int i = 0; i < N; i++) {
int sum1 = 0;
for (int j = 0; j < M; j++)
sum1 += B.at(j) * A.at(i).at(j);
if (0 <= sum1)
sum++;
}
cout << sum << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++)
cin >> B.at(i);
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++)
cin >> A.at(i).at(j);
}
int sum = 0;
for (int i = 0; i < N; i++) {
int sum1 = C;
for (int j = 0; j < M; j++)
sum1 += B.at(j) * A.at(i).at(j);
if (0 < sum1)
sum++;
}
cout << sum << endl;
return 0;
} | [
"variable_declaration.value.change",
"identifier.replace.remove",
"literal.replace.add",
"identifier.replace.add",
"literal.replace.remove",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 908,854 | 908,853 | u101018317 | cpp |
p03102 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
#pragma region Macros
#define int long long
#define double long double
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define LAST(x) x[x.size() - 1]
#define ALL(x) (x).begin(), (x).end()
#define swap(a, b) (a += b, b = a - b, a -= b)
#define DIVCEIL(a, b) ((a + b - 1) / b)
// int CHMAX
int intpow(int a, int n) {
// a^nのint ver
rep(i, n - 1) a *= a;
return a;
}
int MODPOW(int a, int n, int mod) {
// a^n mod
int ans = 1;
while (n > 0) {
if (n & 1)
ans = ans * a % mod;
a = a * a % mod;
n >>= 1;
}
return ans;
}
int FACT(int a) {
if (a == 0)
return 1;
else
return a * FACT(a - 1);
}
int MODFACT(int a, int mod) {
if (a == 0)
return 1;
else
return (a * FACT(a - 1)) % mod;
}
int nPr(int n, int r) {
int s = n - r + 1;
int sum = 1;
for (int i = s; i <= n; i++)
sum *= i;
return sum;
}
int MODnPr(int n, int r, int mod) {
int s = n - r + 1;
int sum = 1;
for (int i = s; i <= n; i++) {
sum *= i;
sum = sum % MOD;
}
return sum;
}
// int nCr(int n, int r)
int nCr2(int n, int r) { return FACT(n) / (FACT(r) * FACT(n - r)); }
int GCD(int a, int b) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
if (a % b == 0)
return b;
return GCD(b, a % b);
}
int LCM(int a, int b) { return a * b / GCD(a, b); }
int NUMOFDIV(int n) {
//約数の数(だっけ?)
int ans = 0;
REP(i, n) {
if (n % i == 0)
ans++;
}
return ans;
}
int CEIL1(int n) {
// 1桁目切り上げ
return (n + 9) / 10 * 10;
}
int GetDigit(int n) { return log10(n) + 1; }
int DIGIT(int n, int k) {
// nのk桁目
rep(i, k - 1) n /= 10;
return n % 10;
}
int DIGITSUM(int n) {
int sum = 0, dig;
while (n) {
dig = n % 10;
sum += dig;
n /= 10;
}
return sum;
}
int DIVTIME(int n, int k) {
// nをkで何回割れるか的な
int div = 0;
while (n % k == 0) {
div++;
n /= k;
}
return div;
}
int binary(int n) {
// 10進数→2進数
int ans = 0;
for (int i = 0; n > 0; i++) {
ans += n % 2 * intpow(10, i);
n /= 2;
}
return ans;
}
int intabs(int n) {
if (n < 0)
return -1 * n;
else
return n;
}
double LOG(int a, int b) { return log(b) / log(a); }
double DISTANCE(int x1, int y1, int x2, int y2) {
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
inline bool BETWEEN(int x, int min, int max) {
if (min <= x && x <= max)
return true;
else
return false;
}
inline bool between(int x, int min, int max) {
if (min < x && x < max)
return true;
else
return false;
}
inline bool PRIMEOR(int x) {
if (x == 1)
return false;
if (x == 2)
return true;
if (x % 2 == 0)
return false;
double sqrtx = sqrt(x);
for (int i = 3; i <= sqrtx; i += 2) {
if (x % i == 0)
return false;
}
return true;
}
bool SQRTOR(int n) {
if (sqrt(n) == (int)sqrt(n))
return true;
else
return false;
}
// 順位付け
using namespace std;
#pragma endregion
signed main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(N);
rep(i, M) cin >> B[i];
int ans = 0;
rep(i, N) {
int a = 0;
rep(j, M) {
int x;
cin >> x;
a += x * B[j];
}
if (a + C > 0)
ans++;
}
cout << ans << endl;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
#pragma region Macros
#define int long long
#define double long double
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define LAST(x) x[x.size() - 1]
#define ALL(x) (x).begin(), (x).end()
#define swap(a, b) (a += b, b = a - b, a -= b)
#define DIVCEIL(a, b) ((a + b - 1) / b)
// int CHMAX
int intpow(int a, int n) {
// a^nのint ver
rep(i, n - 1) a *= a;
return a;
}
int MODPOW(int a, int n, int mod) {
// a^n mod
int ans = 1;
while (n > 0) {
if (n & 1)
ans = ans * a % mod;
a = a * a % mod;
n >>= 1;
}
return ans;
}
int FACT(int a) {
if (a == 0)
return 1;
else
return a * FACT(a - 1);
}
int MODFACT(int a, int mod) {
if (a == 0)
return 1;
else
return (a * FACT(a - 1)) % mod;
}
int nPr(int n, int r) {
int s = n - r + 1;
int sum = 1;
for (int i = s; i <= n; i++)
sum *= i;
return sum;
}
int MODnPr(int n, int r, int mod) {
int s = n - r + 1;
int sum = 1;
for (int i = s; i <= n; i++) {
sum *= i;
sum = sum % MOD;
}
return sum;
}
// int nCr(int n, int r)
int nCr2(int n, int r) { return FACT(n) / (FACT(r) * FACT(n - r)); }
int GCD(int a, int b) {
if (a < b)
swap(a, b);
if (b == 0)
return a;
if (a % b == 0)
return b;
return GCD(b, a % b);
}
int LCM(int a, int b) { return a * b / GCD(a, b); }
int NUMOFDIV(int n) {
//約数の数(だっけ?)
int ans = 0;
REP(i, n) {
if (n % i == 0)
ans++;
}
return ans;
}
int CEIL1(int n) {
// 1桁目切り上げ
return (n + 9) / 10 * 10;
}
int GetDigit(int n) { return log10(n) + 1; }
int DIGIT(int n, int k) {
// nのk桁目
rep(i, k - 1) n /= 10;
return n % 10;
}
int DIGITSUM(int n) {
int sum = 0, dig;
while (n) {
dig = n % 10;
sum += dig;
n /= 10;
}
return sum;
}
int DIVTIME(int n, int k) {
// nをkで何回割れるか的な
int div = 0;
while (n % k == 0) {
div++;
n /= k;
}
return div;
}
int binary(int n) {
// 10進数→2進数
int ans = 0;
for (int i = 0; n > 0; i++) {
ans += n % 2 * intpow(10, i);
n /= 2;
}
return ans;
}
int intabs(int n) {
if (n < 0)
return -1 * n;
else
return n;
}
double LOG(int a, int b) { return log(b) / log(a); }
double DISTANCE(int x1, int y1, int x2, int y2) {
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
inline bool BETWEEN(int x, int min, int max) {
if (min <= x && x <= max)
return true;
else
return false;
}
inline bool between(int x, int min, int max) {
if (min < x && x < max)
return true;
else
return false;
}
inline bool PRIMEOR(int x) {
if (x == 1)
return false;
if (x == 2)
return true;
if (x % 2 == 0)
return false;
double sqrtx = sqrt(x);
for (int i = 3; i <= sqrtx; i += 2) {
if (x % i == 0)
return false;
}
return true;
}
bool SQRTOR(int n) {
if (sqrt(n) == (int)sqrt(n))
return true;
else
return false;
}
// 順位付け
using namespace std;
#pragma endregion
signed main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
rep(i, M) cin >> B[i];
int ans = 0;
rep(i, N) {
int a = 0;
rep(j, M) {
int x;
cin >> x;
a += x * B[j];
}
if (a + C > 0)
ans++;
}
cout << ans;
} | [
"expression.operation.binary.remove"
] | 908,857 | 908,858 | u545364250 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
//長さMの配列を作る。要素を0で初期化する。
vector<int> B(M, 0);
for (int i = 0; i < N; i++)
cin >> B[i];
// N*Mの配列を作る。
// Aは、vector<int>の長さNの配列
//これを、vector<int>(M)で初期化
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[j];
}
sum += C;
if (sum > 0)
ans++;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
//長さMの配列を作る。要素を0で初期化する。
vector<int> B(M, 0);
for (int i = 0; i < M; i++)
cin >> B[i];
// N*Mの配列を作る。
// Aは、vector<int>の長さNの配列
//これを、vector<int>(M)で初期化
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[j];
}
sum += C;
if (sum > 0)
ans++;
}
cout << ans << endl;
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,873 | 908,874 | u348398921 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N, M, C;
cin >> N >> M >> C;
int b[M];
for (int i = 0; i < M; i++) {
cin >> b[i];
}
int res = 0;
for (int i = 0; i < M; i++) {
int sum = C;
for (int j = 0; j < N; j++) {
int a;
cin >> a;
sum += (a * b[j]);
}
if (sum > 0) {
res++;
}
}
cout << res << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N, M, C;
cin >> N >> M >> C;
int b[M];
for (int i = 0; i < M; i++) {
cin >> b[i];
}
int res = 0;
for (int i = 0; i < N; i++) {
int sum = C;
for (int j = 0; j < M; j++) {
int a;
cin >> a;
sum += (a * b[j]);
}
if (sum > 0) {
res++;
}
}
cout << res << endl;
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 908,875 | 908,876 | u559578080 | cpp |
p03102 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
//#include <boost/multiprecision/cpp_int.hpp>
#include <complex>
#include <cstdio>
#include <list>
//< in.txt > out.txt
using namespace std;
// std::ios::sync_with_stdio(false);
// std::cin.tie(0);
const long long MOD = 1e9 + 7;
typedef long long LL;
typedef long double LD;
typedef pair<LL, LL> PLL;
typedef pair<LD, LL> PDL;
typedef pair<LD, LD> PDD;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
// typedef boost::multiprecision::cpp_int bigint;
template <class T> void in(T &x) { cin >> x; }
template <class T> void in(vector<T> &v, LL st = -1, LL en = -1) {
if (st == -1) {
st = 0;
en = v.size() - 1;
}
for (LL n = st; n < en; n++) {
in(v[n]);
}
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
LL N, M, C;
cin >> N >> M >> C;
VLL B(M);
in(B);
LL ans = 0;
for (LL n = 0; n < N; n++) {
LL temp = 0;
for (LL m = 0; m < M; m++) {
LL A;
cin >> A;
temp += B[m] * A;
}
if (temp + C > 0)
ans++;
}
cout << ans << "\n";
return 0;
} | #include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
//#include <boost/multiprecision/cpp_int.hpp>
#include <complex>
#include <cstdio>
#include <list>
//< in.txt > out.txt
using namespace std;
// std::ios::sync_with_stdio(false);
// std::cin.tie(0);
const long long MOD = 1e9 + 7;
typedef long long LL;
typedef long double LD;
typedef pair<LL, LL> PLL;
typedef pair<LD, LL> PDL;
typedef pair<LD, LD> PDD;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
// typedef boost::multiprecision::cpp_int bigint;
template <class T> void in(T &x) { cin >> x; }
template <class T> void in(vector<T> &v, LL st = -1, LL en = -1) {
if (st == -1) {
st = 0;
en = v.size() - 1;
}
for (LL n = st; n <= en; n++) {
in(v[n]);
}
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
LL N, M, C;
cin >> N >> M >> C;
VLL B(M);
in(B);
LL ans = 0;
for (LL n = 0; n < N; n++) {
LL temp = 0;
for (LL m = 0; m < M; m++) {
LL A;
cin >> A;
temp += B[m] * A;
}
if (temp + C > 0)
ans++;
}
cout << ans << "\n";
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 908,877 | 908,878 | u457790148 | cpp |
p03102 | #define _USE_MATH_DEFINES // M_PI
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
using ll = long long;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define rREP(i, a, n) for (int(i) = (n)-1; (i) >= (a); --(i))
#define all(x) (x).begin(), (x).end()
#define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) || (x) >= (w)
constexpr int INF = 2147483647;
constexpr ll mod = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
inline void init() {
cin.tie(nullptr);
cout.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
}
int main() {
init();
int n, m, c;
cin >> n >> m >> c;
vector<int> ac_code(m);
rep(i, n) cin >> ac_code[i];
vector<vector<int>> A(n, vector<int>(m));
rep(i, n) rep(j, m) cin >> A[i][j];
int ans = 0;
rep(i, n) {
int cnt = 0;
rep(j, m) { cnt += A[i][j] + ac_code[j]; }
if (cnt + c > 0)
++ans;
}
cout << ans << "\n";
return 0;
} | #define _USE_MATH_DEFINES // M_PI
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
using ll = long long;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define rREP(i, a, n) for (int(i) = (n)-1; (i) >= (a); --(i))
#define all(x) (x).begin(), (x).end()
#define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) || (x) >= (w)
constexpr int INF = 2147483647;
constexpr ll mod = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
inline void init() {
cin.tie(nullptr);
cout.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
}
int main() {
init();
int n, m, c;
cin >> n >> m >> c;
vector<int> ac_code(m);
rep(i, m) cin >> ac_code[i];
vector<vector<int>> A(n, vector<int>(m));
rep(i, n) rep(j, m) cin >> A[i][j];
int ans = 0;
rep(i, n) {
int cnt = 0;
rep(j, m) { cnt += A[i][j] * ac_code[j]; }
if (cnt + c > 0)
++ans;
}
cout << ans << "\n";
return 0;
} | [
"identifier.change",
"call.arguments.change",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 908,879 | 908,880 | u813559924 | cpp |
p03102 | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int n, m, c, b[20], ans = 0;
cin >> n >> m >> c;
for (int i = 0; i < m; i++) {
cin >> b[i];
}
for (int i = 0; i < n; i++) {
int cnt = 0;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
cnt += a * b[j];
if (cnt + c > 0) {
ans++;
}
}
}
cout << ans << endl;
} | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int n, m, c, b[20], ans = 0;
cin >> n >> m >> c;
for (int i = 0; i < m; i++) {
cin >> b[i];
}
for (int i = 0; i < n; i++) {
int cnt = 0;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
cnt += a * b[j];
}
if (cnt + c > 0) {
ans++;
}
}
cout << ans << endl;
}
| [] | 908,881 | 908,882 | u401900157 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> B[i];
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[i];
}
if (sum + C > 0) {
ans++;
}
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, C;
cin >> N >> M >> C;
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> B[i];
}
vector<vector<int>> A(N, vector<int>(M));
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < M; j++) {
sum += A[i][j] * B[j];
}
if (sum + C > 0) {
ans++;
}
}
cout << ans << endl;
}
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,883 | 908,884 | u401900157 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define co(a) cout << a << endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pp() pop_back()
#define V vector
#define P pair
#define V2(a, b, c) V<V<int>> a(b, V<int>(c))
#define V2a(a, b, c, d) V<V<int>> a(b, V<int>(c, d))
#define incin(a) \
int a; \
cin >> a
#define yuko(a) setprecision(a)
#define uni(a) a.erase(unique(a.begin(), a.end()), a.end())
signed main() {
int n, m, c;
cin >> n >> m >> c;
int d = 0;
int ans = 0;
V<int> b(m);
fo(i, m) { cin >> b[i]; }
for (int i = 0; i < n; i++) {
V<int> a(m);
fo(i, m) { cin >> a[i]; }
for (int j = 0; j < m; j++) {
d += a[j] * b[j];
}
d += c;
if (d > 0)
ans++;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define co(a) cout << a << endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pp() pop_back()
#define V vector
#define P pair
#define V2(a, b, c) V<V<int>> a(b, V<int>(c))
#define V2a(a, b, c, d) V<V<int>> a(b, V<int>(c, d))
#define incin(a) \
int a; \
cin >> a
#define yuko(a) setprecision(a)
#define uni(a) a.erase(unique(a.begin(), a.end()), a.end())
signed main() {
int n, m, c;
cin >> n >> m >> c;
int d = 0;
int ans = 0;
V<int> b(m);
fo(i, m) { cin >> b[i]; }
for (int i = 0; i < n; i++) {
V<int> a(m);
fo(i, m) { cin >> a[i]; }
for (int j = 0; j < m; j++) {
d += a[j] * b[j];
}
d += c;
if (d > 0)
ans++;
d = 0;
}
cout << ans << endl;
}
| [
"assignment.add"
] | 908,890 | 908,891 | u790461875 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = s; i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ((n) ? "Yes" : "No") << '\n';
#define CFYN(n) cout << ((n) ? "YES" : "NO") << '\n';
#define OUT(n) cout << (n) << '\n';
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
int main(void) {
IOS int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
REP(i, m) cin >> b[i];
int ans = 0;
REP(i, n) {
int x = c;
REP(j, m) {
int a;
cin >> a;
x += a * b[i];
}
if (x > 0)
ans++;
}
cout << ans << '\n';
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = s; i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ((n) ? "Yes" : "No") << '\n';
#define CFYN(n) cout << ((n) ? "YES" : "NO") << '\n';
#define OUT(n) cout << (n) << '\n';
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
int main(void) {
IOS int n, m, c;
cin >> n >> m >> c;
vector<int> b(m);
REP(i, m) cin >> b[i];
int ans = 0;
REP(i, n) {
int x = c;
REP(j, m) {
int a;
cin >> a;
x += a * b[j];
}
if (x > 0)
ans++;
}
cout << ans << '\n';
return 0;
} | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 908,911 | 908,912 | u330661451 | cpp |
p03102 | #include <bits/stdc++.h>
typedef long long ll;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define all(v) v.begin(), v.end()
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
const int INF = 1 << 30;
const ll INFll = 1ll << 60;
template <typename T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b; // aをbで更新
return true;
}
return false;
}
template <typename T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b; // aをbで更新
return true;
}
return false;
}
int main() {
int N, M, C;
cin >> N >> M >> C;
vi B(M);
rep(i, M) cin >> B[i];
vvi A(N, vi(M));
rep(i, N) { rep(j, M) cin >> A[i][j]; }
int ans = 0;
rep(i, N) {
int sum = 0;
rep(j, M) { sum += A[i][j] * B[j]; }
if (sum - C > 0)
ans++;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
typedef long long ll;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define all(v) v.begin(), v.end()
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
const int INF = 1 << 30;
const ll INFll = 1ll << 60;
template <typename T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b; // aをbで更新
return true;
}
return false;
}
template <typename T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b; // aをbで更新
return true;
}
return false;
}
int main() {
int N, M, C;
cin >> N >> M >> C;
vi B(M);
rep(i, M) cin >> B[i];
vvi A(N, vi(M));
rep(i, N) { rep(j, M) cin >> A[i][j]; }
int ans = 0;
rep(i, N) {
int sum = 0;
rep(j, M) { sum += A[i][j] * B[j]; }
if (sum + C > 0)
ans++;
}
cout << ans << endl;
return 0;
} | [
"misc.opposites",
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 908,918 | 908,919 | u735008991 | cpp |
p03102 | #include <iostream>
using namespace std;
int main() {
int i, n, m, c, j, solve = 0, num;
cin >> n >> m >> c;
int b[m];
for (i = 0; i < m; i++)
cin >> b[i];
int a[n][m];
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (i = 0; i < n; i++) {
num = c;
for (j = 0; j < m; j++) {
num = num + a[i][j] * b[j];
}
if (num)
solve++;
}
cout << solve;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int i, n, m, c, j, solve = 0, num;
cin >> n >> m >> c;
int b[m];
for (i = 0; i < m; i++)
cin >> b[i];
int a[n][m];
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (i = 0; i < n; i++) {
num = c;
for (j = 0; j < m; j++) {
num = num + a[i][j] * b[j];
}
if (num > 0)
solve++;
}
cout << solve;
return 0;
} | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 908,926 | 908,927 | u476054945 | cpp |
p03102 | #include <iostream>
using namespace std;
int main() {
int i, n, m, c, j, solve = 0, num;
cin >> n >> m >> c;
int b[m];
for (i = 0; i < m; i++)
cin >> b[i];
int a[n][m];
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (i = 0; i < n; i++) {
num = 0;
for (j = 0; j < m; j++) {
num = num + a[i][j] * b[j];
}
if (num + c)
solve++;
}
cout << solve;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int i, n, m, c, j, solve = 0, num;
cin >> n >> m >> c;
int b[m];
for (i = 0; i < m; i++)
cin >> b[i];
int a[n][m];
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (i = 0; i < n; i++) {
num = c;
for (j = 0; j < m; j++) {
num = num + a[i][j] * b[j];
}
if (num > 0)
solve++;
}
cout << solve;
return 0;
} | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change"
] | 908,928 | 908,927 | u476054945 | cpp |
p03102 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> v(m);
for (int i = 0; i < m; i++)
cin >> v[i];
int res = 0;
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
sum += a * v[j];
}
if (sum + c > 0)
cout << sum + c;
// res++;
}
cout << res;
return 0;
} | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> v(m);
for (int i = 0; i < m; i++)
cin >> v[i];
int res = 0;
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
sum += a * v[j];
}
if (sum + c > 0)
res++;
}
cout << res;
return 0;
} | [
"expression.operation.binary.remove"
] | 908,931 | 908,932 | u494904817 | cpp |
p03102 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> v(n);
for (int i = 0; i < m; i++)
cin >> v[i];
int res = 0;
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
sum += a * v[j];
}
if (sum + c > 0)
res++;
}
cout << res;
return 0;
} | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> v(m);
for (int i = 0; i < m; i++)
cin >> v[i];
int res = 0;
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = 0; j < m; j++) {
int a;
cin >> a;
sum += a * v[j];
}
if (sum + c > 0)
res++;
}
cout << res;
return 0;
} | [] | 908,933 | 908,932 | u494904817 | cpp |
p03102 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> base(m);
for (int i = 0; i < m; i++) {
cin >> base.at(i);
}
vector<vector<int>> code(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> code.at(i).at(j);
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
int s = 0;
for (int j = 0; j < m; j++) {
s += code.at(i).at(j) * base.at(j);
}
if (s > 0)
ans++;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c;
cin >> n >> m >> c;
vector<int> base(m);
for (int i = 0; i < m; i++) {
cin >> base.at(i);
}
vector<vector<int>> code(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> code.at(i).at(j);
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
int s = 0;
for (int j = 0; j < m; j++) {
s += code.at(i).at(j) * base.at(j);
}
s += c;
if (s > 0)
ans++;
}
cout << ans << endl;
}
| [
"assignment.add"
] | 908,934 | 908,935 | u319783732 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.