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 |
|---|---|---|---|---|---|---|---|
p03001 | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#define watch(x) cout << (#x) << " is " << (x) << endl
typedef long long ll;
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll w, h;
int x, y;
cin >> w >> h >> x >> y;
cout << (w * h) / 2 << ' ';
if (x == w / 2 && y == h / 2) {
cout << 1;
} else {
cout << 0;
}
return 0;
}
| #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#define watch(x) cout << (#x) << " is " << (x) << endl
typedef long long ll;
typedef long double ld;
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ld w, h;
int x, y;
cin >> w >> h >> x >> y;
cout << (w * h) / 2 << ' ';
if (x == w / 2 && y == h / 2) {
cout << 1;
} else {
cout << 0;
}
return 0;
}
| [
"variable_declaration.type.change"
] | 816,293 | 816,294 | u117615163 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int a, b, x, y;
cin >> a >> b >> x >> y;
cout << fixed << setprecision(6) << (double)(a + b) / 2 << " ";
if (2 * x == a && 2 * y == b)
cout << 1;
else
cout << 0;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int a, b, x, y;
cin >> a >> b >> x >> y;
cout << fixed << setprecision(6) << (double)a * b / 2 << " ";
if (2 * x == a && 2 * y == b)
cout << 1;
else
cout << 0;
return 0;
}
| [
"expression.operator.arithmetic.change",
"io.output.change"
] | 816,297 | 816,298 | u891061025 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double ans;
ans = w * h / 2;
if (x == w / 2 && y == h / 2)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans;
ans = w * h / 2;
if (x == w / 2 && y == h / 2)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
return 0;
} | [
"variable_declaration.type.primitive.change"
] | 816,301 | 816,302 | u812475404 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
cin >> W;
cin >> H;
cin >> x;
cin >> y;
int kotae = 0;
if (H * x == W * y || H * x + W * y == H * W) {
kotae++;
}
cout << fixed << setprecision(6);
cout << W * H / 2 << " " << kotae << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
cin >> W;
cin >> H;
cin >> x;
cin >> y;
int kotae = 0;
if (H * x == W * y && H * x + W * y == H * W) {
kotae++;
}
cout << fixed << setprecision(6);
cout << W * H / 2 << " " << kotae << endl;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 816,313 | 816,314 | u676441479 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/* short */
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v), rend(v)
/* REPmacro */
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define EACH(begin, end) for (auto itr = (begin); itr != (end); itr++)
/* function */
#define IN(x) cin >> x
#define DEBUG(x) cerr << (x) << " "
#define LN() cerr << "\n"
#define PRINT(x) cout << (x) << endl
#define BR cout << endl
/* const */
const int INF = 1001001001; // 10^9
const ll LINF = 1001001001001001001; // 10^18
const int MOD = 1e9 + 7;
ll N = 0;
ll W, H, x, y;
ll ret = 0;
void input() {
IN(W);
IN(H);
IN(x);
IN(y);
}
void solve() {
bool flg = (x == W / 2) && (y == H / 2);
double s = (double)W * (double)H / 2.0;
cout << setprecision(10) << s << " " << (flg ? 1 : 0) << endl;
}
int main(void) {
input();
solve();
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/* short */
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v), rend(v)
/* REPmacro */
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define EACH(begin, end) for (auto itr = (begin); itr != (end); itr++)
/* function */
#define IN(x) cin >> x
#define DEBUG(x) cerr << (x) << " "
#define LN() cerr << "\n"
#define PRINT(x) cout << (x) << endl
#define BR cout << endl
/* const */
const int INF = 1001001001; // 10^9
const ll LINF = 1001001001001001001; // 10^18
const int MOD = 1e9 + 7;
ll N = 0;
ll W, H, x, y;
ll ret = 0;
void input() {
IN(W);
IN(H);
IN(x);
IN(y);
}
void solve() {
bool flg = (x == W / 2.0) && (y == H / 2.0);
double s = (double)W * (double)H / 2.0;
cout << setprecision(10) << s << " " << (flg ? 1 : 0) << endl;
}
int main(void) {
input();
solve();
}
| [
"literal.number.change",
"expression.operation.binary.change"
] | 816,315 | 816,316 | u790171360 | cpp |
p03001 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define INF 1e9;
using namespace std;
typedef long long ll;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double ans = (double)(W * H / 2);
cout << fixed << setprecision(10) << ans << " ";
if (2 * x == W && 2 * y == H) {
cout << 1;
} else {
cout << 0;
}
return 0;
} | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define INF 1e9;
using namespace std;
typedef long long ll;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double ans = (double)(W)*H / 2;
cout << fixed << setprecision(10) << ans << " ";
if (2 * x == W && 2 * y == H) {
cout << 1;
} else {
cout << 0;
}
return 0;
} | [] | 816,319 | 816,320 | u520841950 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long w, h, x, y;
cin >> w >> h >> x >> y;
cout << setprecision(12) << w * h / 2 << " ";
cout << (2 * x == w && 2 * y == h);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long w, h, x, y;
cin >> w >> h >> x >> y;
cout << setprecision(12) << w * h / 2.0 << " ";
cout << (2 * x == w && 2 * y == h);
return 0;
} | [
"literal.number.change",
"io.output.change"
] | 816,321 | 816,322 | u359313068 | cpp |
p03001 | #include <bits/stdc++.h>
#define REP(i, n) for (decltype(n) i = 0; i < n; i++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) std::sort(ALL(c))
#define RSORT(c) std::sort(ALL(c), std::greater<decltype(c)::value_type>())
using namespace std;
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9 + 1;
const ll LINF = (ll)1e18 + 1;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int W, H, x, y;
std::cin >> W >> H >> x >> y;
long double ans = W * H / 2.0;
if (x == W / 2 && y == H / 2) {
std::cout << ans << setprecision(10) << " " << 1 << std::endl;
} else {
std::cout << ans << setprecision(10) << " " << 0 << std::endl;
}
return 0;
}
| #include <bits/stdc++.h>
#define REP(i, n) for (decltype(n) i = 0; i < n; i++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) std::sort(ALL(c))
#define RSORT(c) std::sort(ALL(c), std::greater<decltype(c)::value_type>())
using namespace std;
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9 + 1;
const ll LINF = (ll)1e18 + 1;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
double W, H, x, y;
std::cin >> W >> H >> x >> y;
long double ans = W * H / 2.0;
if (x == W / 2 && y == H / 2) {
std::cout << ans << setprecision(20) << " " << 1 << std::endl;
} else {
std::cout << ans << setprecision(20) << " " << 0 << std::endl;
}
return 0;
}
| [
"variable_declaration.type.primitive.change",
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 816,323 | 816,324 | u403800404 | cpp |
p03001 | #include <bits/stdc++.h>
#define REP(i, n) for (decltype(n) i = 0; i < n; i++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) std::sort(ALL(c))
#define RSORT(c) std::sort(ALL(c), std::greater<decltype(c)::value_type>())
using namespace std;
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9 + 1;
const ll LINF = (ll)1e18 + 1;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int W, H, x, y;
std::cin >> W >> H >> x >> y;
double ans = W * H / 2.0;
if (x == W / 2 && y == H / 2) {
std::cout << ans << setprecision(10) << " " << 1 << std::endl;
} else {
std::cout << ans << setprecision(10) << " " << 0 << std::endl;
}
return 0;
}
| #include <bits/stdc++.h>
#define REP(i, n) for (decltype(n) i = 0; i < n; i++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) std::sort(ALL(c))
#define RSORT(c) std::sort(ALL(c), std::greater<decltype(c)::value_type>())
using namespace std;
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9 + 1;
const ll LINF = (ll)1e18 + 1;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
double W, H, x, y;
std::cin >> W >> H >> x >> y;
long double ans = W * H / 2.0;
if (x == W / 2 && y == H / 2) {
std::cout << ans << setprecision(20) << " " << 1 << std::endl;
} else {
std::cout << ans << setprecision(20) << " " << 0 << std::endl;
}
return 0;
}
| [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 816,325 | 816,324 | u403800404 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
long long area = W * H;
int ways = 0;
if (W % 2 == 0 and x == W / 2) {
if (H % 2 == 0 and y == H / 2) {
ways = 1;
}
}
cout << area / 2 << " " << ways << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
double area = W * H;
int ways = 0;
if (W % 2 == 0 and x == W / 2) {
if (H % 2 == 0 and y == H / 2) {
ways = 1;
}
}
cout << area / 2 << " " << ways << endl;
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.narrow.change"
] | 816,326 | 816,327 | u229213815 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
long long area = W * H;
int ways = 0;
if (W % 2 == 0 and x == W / 2) {
if (H % 2 == 0 and y == H / 2) {
ways = 1;
}
}
cout << area / 2 << " " << ways << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
double area = W * H;
int ways = 0;
if (W % 2 == 0 and x == W / 2) {
if (H % 2 == 0 and y == H / 2) {
ways = 1;
}
}
cout << area / 2 << " " << ways << endl;
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"variable_declaration.type.narrow.change"
] | 816,328 | 816,327 | u229213815 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int area = W * H;
int ways = 0;
if (W % 2 == 0 and x == W / 2) {
if (H % 2 == 0 and y == H / 2) {
ways = 1;
}
}
cout << area / 2 << " " << ways << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
double area = W * H;
int ways = 0;
if (W % 2 == 0 and x == W / 2) {
if (H % 2 == 0 and y == H / 2) {
ways = 1;
}
}
cout << area / 2 << " " << ways << endl;
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 816,329 | 816,327 | u229213815 | cpp |
p03001 | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
double U = W * H;
cout << setprecision(9) << U << " ";
if (2 * x == W && 2 * y == H) {
cout << '1' << endl;
} else {
cout << '0' << endl;
}
return 0;
} | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
double U = W * H;
cout << setprecision(9) << U / 2 << " ";
if (2 * x == W && 2 * y == H) {
cout << '1' << endl;
} else {
cout << '0' << endl;
}
return 0;
}
| [
"expression.operation.binary.add"
] | 816,330 | 816,331 | u904123392 | cpp |
p03001 | #include <iomanip>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
cout << setprecision(9) << (long double)(W * H) << " ";
if (x + x == W && y + y == H) {
cout << '1';
} else {
cout << '0';
}
return 0;
}
| #include <iomanip>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
cout << setprecision(9) << (long double)(W * H) / 2 << " ";
if (x + x == W && y + y == H) {
cout << '1';
} else {
cout << '0';
}
return 0;
}
| [
"expression.operation.binary.add"
] | 816,333 | 816,334 | u904123392 | cpp |
p03001 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
ll ans;
ans = w * h / 2;
cout << ans << " ";
if (w == 2 * x && h == 2 * y) {
cout << "1";
} else {
cout << "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() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans;
ans = w * h / 2;
cout << ans << " ";
if (w == 2 * x && h == 2 * y) {
cout << "1";
} else {
cout << "0";
}
}
| [
"variable_declaration.type.change"
] | 816,342 | 816,343 | u447604786 | cpp |
p03001 | #include <iostream>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main(void) {
long int W, H, x, y;
cin >> W >> H >> x >> y;
if ((W % 2 == 0 && x == W / 2) && (H % 2 == 0 && y == H / 2)) {
cout << W * H / 2 << " " << 1 << endl;
} else {
cout << W * H / 2 << " " << 0 << endl;
}
}
| #include <iostream>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main(void) {
long int W, H, x, y;
cin >> W >> H >> x >> y;
if ((W % 2 == 0 && x == W / 2) && (H % 2 == 0 && y == H / 2)) {
cout << (double)W * H / 2 << " " << 1 << endl;
} else {
cout << (double)W * H / 2 << " " << 0 << endl;
}
}
| [
"type_conversion.add"
] | 816,356 | 816,357 | u161609067 | cpp |
p03001 | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author toshibablack
*/
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define ll long long int
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOREACH(x, a) for (auto &(x) : (a))
#define ALL(a) (a).begin(), (a).end()
#define COUT(x) out << (x) << endl;
#define M0(x) memset(x, 0, sizeof(x))
#define MINF(x) memset(x, 0x3f, sizeof(x))
#define MMINUS(a) memset(a, 0xff, sizeof(a))
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
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;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
using namespace std;
class CRectangleCutting {
public:
ll W, H, x, y;
void solve(std::istream &in, std::ostream &out) {
in >> W >> H >> x >> y;
out << W * H / 2.0;
out << " ";
int ans = x - W / 2.0 < 1.0 / INF && y - H / 2.0 < 1.0 / INF ? 1 : 0;
COUT(ans);
}
};
int main() {
CRectangleCutting solver;
std::istream &in(std::cin);
std::ostream &out(std::cout);
solver.solve(in, out);
return 0;
}
| /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author toshibablack
*/
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define ll long long int
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOREACH(x, a) for (auto &(x) : (a))
#define ALL(a) (a).begin(), (a).end()
#define COUT(x) out << (x) << endl;
#define M0(x) memset(x, 0, sizeof(x))
#define MINF(x) memset(x, 0x3f, sizeof(x))
#define MMINUS(a) memset(a, 0xff, sizeof(a))
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
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;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
using namespace std;
class CRectangleCutting {
public:
ll W, H, x, y;
void solve(std::istream &in, std::ostream &out) {
in >> W >> H >> x >> y;
out << W * H / 2.0;
out << " ";
int ans =
abs(x - W / 2.0) < 1.0 / INF && abs(y - H / 2.0) < 1.0 / INF ? 1 : 0;
COUT(ans);
}
};
int main() {
CRectangleCutting solver;
std::istream &in(std::cin);
std::ostream &out(std::cout);
solver.solve(in, out);
return 0;
}
| [
"call.add",
"call.arguments.change"
] | 816,361 | 816,362 | u585670083 | cpp |
p03001 | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author toshibablack
*/
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define ll long long int
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOREACH(x, a) for (auto &(x) : (a))
#define ALL(a) (a).begin(), (a).end()
#define COUT(x) out << (x) << endl;
#define M0(x) memset(x, 0, sizeof(x))
#define MINF(x) memset(x, 0x3f, sizeof(x))
#define MMINUS(a) memset(a, 0xff, sizeof(a))
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
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;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
using namespace std;
class CRectangleCutting {
public:
ll W, H, x, y;
void solve(std::istream &in, std::ostream &out) {
in >> W >> H >> x >> y;
out << (double)W * (double)H / 2.0;
out << " ";
int ans = W - 2 * x < 1.0 / INF && H - 2 * y < 1.0 / INF ? 1 : 0;
COUT(ans);
}
};
int main() {
CRectangleCutting solver;
std::istream &in(std::cin);
std::ostream &out(std::cout);
solver.solve(in, out);
return 0;
}
| /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author toshibablack
*/
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define ll long long int
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOREACH(x, a) for (auto &(x) : (a))
#define ALL(a) (a).begin(), (a).end()
#define COUT(x) out << (x) << endl;
#define M0(x) memset(x, 0, sizeof(x))
#define MINF(x) memset(x, 0x3f, sizeof(x))
#define MMINUS(a) memset(a, 0xff, sizeof(a))
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
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;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
using namespace std;
class CRectangleCutting {
public:
ll W, H, x, y;
void solve(std::istream &in, std::ostream &out) {
in >> W >> H >> x >> y;
out << (double)W * (double)H / 2.0;
out << " ";
int ans = abs(W - 2 * x) < 1.0 / INF && abs(H - 2 * y) < 1.0 / INF ? 1 : 0;
COUT(ans);
}
};
int main() {
CRectangleCutting solver;
std::istream &in(std::cin);
std::ostream &out(std::cout);
solver.solve(in, out);
return 0;
}
| [
"call.add",
"call.arguments.change"
] | 816,363 | 816,364 | u585670083 | cpp |
p03001 | #include <iomanip>
#include <iostream>
int main() {
int W, H, x, y;
std::cin >> W >> H >> x >> y;
std::cout << std::fixed << std::setprecision(10) << (double)(W * H / 2)
<< " ";
std::cout << (W == 2 * x and H == 2 * y) << std::endl;
}
| #include <iomanip>
#include <iostream>
int main() {
long long W, H, x, y;
std::cin >> W >> H >> x >> y;
std::cout << std::fixed << std::setprecision(10)
<< (long double)(W * H / 2.00000) << " ";
std::cout << (W == 2 * x and H == 2 * y) << std::endl;
}
| [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,380 | 816,379 | u318334550 | cpp |
p03001 | #include <iostream>
int main() {
int w, h, x, y;
std::cin >> w >> h, x, y;
std::cout << static_cast<double>(w) * static_cast<double>(h) / 2 << " ";
if (w == 2 * x && h == 2 * y) {
std::cout << "1";
} else {
std::cout << "0";
}
} | #include <iostream>
int main() {
int w, h, x, y;
std::cin >> w >> h >> x >> y;
std::cout << static_cast<double>(w) * static_cast<double>(h) / 2 << " ";
if (w == 2 * x && h == 2 * y) {
std::cout << "1";
} else {
std::cout << "0";
}
} | [] | 816,381 | 816,382 | u533749093 | cpp |
p03001 | #include <bits/stdc++.h>
#define li long long int
#define pb push_back
using namespace std;
int main() {
li w, h, x, y;
cin >> w >> h >> x >> y;
double ans;
int p;
cout << setprecision(15) << fixed;
if (x == w / 2 && y == h / 2) {
p = 1;
} else
p = 0;
ans = (w * h) / 2;
cout << ans << " " << p << endl;
}
| #include <bits/stdc++.h>
#define li long long int
#define pb push_back
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans;
int p;
cout << setprecision(15) << fixed;
if (x == w / 2 && y == h / 2) {
p = 1;
} else
p = 0;
ans = (w * h) / 2;
cout << ans << " " << p << endl;
}
| [
"variable_declaration.type.change"
] | 816,383 | 816,384 | u968280449 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
int ans;
if (x == w / 2 && y == h / 2) {
ans = 1;
} else {
ans = 0;
}
float a = (w * h) / 2;
cout << a << " " << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
int ans;
if (x == w / 2 && y == h / 2) {
ans = 1;
} else {
ans = 0;
}
double a = w * (h / 2);
cout << a << " " << ans << endl;
return 0;
} | [
"variable_declaration.type.primitive.change"
] | 816,388 | 816,386 | u160754729 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
long long w, h, x, y;
cin >> w >> h >> x >> y;
long double area = (w * h) / 2;
cout << fixed << setprecision(10) << area << ' ';
if (w == 2 * x and h == 2 * y) {
cout << 1;
} else {
cout << 0;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
long long w, h, x, y;
cin >> w >> h >> x >> y;
long double area = (w * h) / 2.0;
cout << fixed << setprecision(10) << area << ' ';
if (w == 2 * x and h == 2 * y) {
cout << 1;
} else {
cout << 0;
}
return 0;
} | [
"literal.number.change",
"expression.operation.binary.change"
] | 816,397 | 816,398 | u387147192 | cpp |
p03001 | #include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
#include <math.h>
#include <stdexcept>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--) /// n-1番目からn回
#define REP(i, a, b) for (int i = a; i <= b; i++) /// a番目からb回
#define RREP(i, a, b) for (int i = a; i < b; i--)
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pair_t;
#define MOD 1000003
// int arr[N]
////sort(arr,arr +N)
// vector <int> hoge
////sort(hoge.begin(),hoge.end());
///*min_element(hoge.begin(),hoge.end(); 最小値 最大値はmax_element();
///(10-(n%10))%10 10-(1桁目)取得 12->8 20->0
#define Ru(n) (((n) + 9) / 10 * 10) //切りあげ
#define Rd(n) (((n)-10) / 10 * 10 + 10) 切り捨て
int gcd(int a, int b);
size_t length(const std::string &str) { return str.length(); }
bool comp(const pair_t &a, const pair_t &b) { return a.first < b.first; }
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 || y == h / 2) {
cout << w * h / 2.0;
cout << " " << 0 << endl;
} else {
cout << w * h / 2.0;
cout << " " << 1 << endl;
}
}
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
| #include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
#include <math.h>
#include <stdexcept>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--) /// n-1番目からn回
#define REP(i, a, b) for (int i = a; i <= b; i++) /// a番目からb回
#define RREP(i, a, b) for (int i = a; i < b; i--)
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pair_t;
#define MOD 1000003
// int arr[N]
////sort(arr,arr +N)
// vector <int> hoge
////sort(hoge.begin(),hoge.end());
///*min_element(hoge.begin(),hoge.end(); 最小値 最大値はmax_element();
///(10-(n%10))%10 10-(1桁目)取得 12->8 20->0
#define Ru(n) (((n) + 9) / 10 * 10) //切りあげ
#define Rd(n) (((n)-10) / 10 * 10 + 10) 切り捨て
int gcd(int a, int b);
size_t length(const std::string &str) { return str.length(); }
bool comp(const pair_t &a, const pair_t &b) { return a.first < b.first; }
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2) {
cout << w * h / 2.0;
cout << " " << 1 << endl;
} else {
cout << w * h / 2.0;
cout << " " << 0 << endl;
}
}
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
| [
"misc.opposites",
"control_flow.branch.if.condition.change",
"literal.number.change",
"io.output.change"
] | 816,407 | 816,408 | u696415377 | cpp |
p03001 | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
ll w, h, a, b;
cin >> w >> h >> a >> b;
long double ans = (w * h * 1.0) / 2;
if (w % 2 == 0 || h % 2 == 0 && w / 2 == a && h / 2 == b) {
cout << fixed << setprecision(9) << ans << " "
<< "1"
<< "\n";
} else
cout << fixed << setprecision(9) << ans << " "
<< "0"
<< "\n";
return 0;
} | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
ll w, h, a, b;
cin >> w >> h >> a >> b;
long double ans = (w * h * 1.0) / 2;
if (w % 2 == 0 && h % 2 == 0 && w / 2 == a && h / 2 == b) {
cout << fixed << setprecision(9) << ans << " "
<< "1"
<< "\n";
} else
cout << fixed << setprecision(9) << ans << " "
<< "0"
<< "\n";
return 0;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 816,426 | 816,427 | u632753129 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
// {{{Template for Competitive Programming
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i = n; i >= 0; --i)
#define ALL(x) (x).begin(), (x).end()
const int INF = 1'010'000'000'000'000'017LL;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
using vint = vector<int>;
using pint = pair<int, int>;
// }}}
signed main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
printf("%7f ", (double)(w * h) / 2);
if (x == w / 2 and y == h / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
// {{{Template for Competitive Programming
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i = n; i >= 0; --i)
#define ALL(x) (x).begin(), (x).end()
const int INF = 1'010'000'000'000'000'017LL;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
using vint = vector<int>;
using pint = pair<int, int>;
// }}}
signed main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
printf("%7f ", (w * h) / 2);
if (x == w / 2 and y == h / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| [
"variable_declaration.type.primitive.change"
] | 816,428 | 816,429 | u637515289 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll w, h, x, y;
int main() {
scanf("%lld %lld %lld %lld", &w, &h, &x, &y);
printf("%.6f ", w * h / 2);
if (x * 2 == w && y * 2 == h)
printf("1\n");
else
printf("0\n");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll w, h, x, y;
int main() {
scanf("%lld %lld %lld %lld", &w, &h, &x, &y);
printf("%.6f ", w * h * 1.0 / 2);
if (x * 2 == w && y * 2 == h)
printf("1\n");
else
printf("0\n");
return 0;
} | [
"expression.operation.binary.add"
] | 816,430 | 816,431 | u623136228 | cpp |
p03001 | #include <iostream>
using namespace std;
long W, H, x, y;
void solve();
int main() {
cin >> W >> H >> x >> y;
solve();
}
void solve() {
// 任意の点と中心を通る直線で必ず2等分できるため
double area = W / 2 * H;
// x, y が中心を通る場合は直線は一意に決まらない
bool is_center = (x * 2 == W) && (y * 2 == H);
cout << area << " " << (is_center ? 1 : 0) << endl;
}
| #include <iostream>
using namespace std;
long W, H, x, y;
void solve();
int main() {
cin >> W >> H >> x >> y;
solve();
}
void solve() {
// 任意の点と中心を通る直線で必ず2等分できるため
double area = double(W) / 2 * H;
// x, y が中心を通る場合は直線は一意に決まらない
bool is_center = (x * 2 == W) && (y * 2 == H);
cout << area << " " << (is_center ? 1 : 0) << endl;
} | [
"call.add",
"call.arguments.change"
] | 816,441 | 816,442 | u820164965 | cpp |
p03001 | #include <iostream>
using namespace std;
long W, H, x, y;
void solve();
int main() {
cin >> W >> H >> x >> y;
solve();
}
void solve() {
// 任意の点と中心を通る直線で必ず2等分できるため
double area = W / 2 * H;
// x, y が中心を通る場合は直線は一意に決まらない
bool is_center = (x * 2 == W) && (y * 2 == H);
cout << area << " " << (is_center ? 1 : 0) << endl;
}
| #include <iostream>
using namespace std;
long W, H, x, y;
void solve();
int main() {
cin >> W >> H >> x >> y;
solve();
}
void solve() {
// 任意の点と中心を通る直線で必ず2等分できるため
double area = (double)W / 2 * H;
// x, y が中心を通る場合は直線は一意に決まらない
bool is_center = (x * 2 == W) && (y * 2 == H);
cout << area << " " << (is_center ? 1 : 0) << endl;
}
| [
"type_conversion.add"
] | 816,441 | 816,443 | u820164965 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define ll long long
typedef pair<int, int> P;
#define mod 1000000007
#define INF (1LL << 60)
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define YES puts("YES\n")
#define Yes puts("Yes\n")
#define NO puts("NO\n")
#define No puts("No\n")
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
signed main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
if (x * 2 == W && y * 2 == H) {
cout << H * W / 2 << " "
<< "1" << endl;
} else
cout << H * W / 2 << " "
<< "0" << endl;
return 0;
} | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define ll long long
typedef pair<int, int> P;
#define mod 1000000007
#define INF (1LL << 60)
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define YES puts("YES\n")
#define Yes puts("Yes\n")
#define NO puts("NO\n")
#define No puts("No\n")
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
signed main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
if (x * 2 == W && y * 2 == H) {
cout << (double)H * W / 2 << " "
<< "1" << endl;
} else
cout << (double)H * W / 2 << " "
<< "0" << endl;
return 0;
} | [
"type_conversion.add"
] | 816,484 | 816,485 | u592610268 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && h == y / 2)
cout << w * h / 2 << " " << 1 << endl;
else
cout << w * h / 2 << " " << 0 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2)
cout << w * h / 2 << " " << 1 << endl;
else
cout << w * h / 2 << " " << 0 << endl;
return 0;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 816,486 | 816,487 | u466568754 | cpp |
p03001 | #include <bits/stdc++.h>
#define ull unsigned long long
#define ul unsigned long
#define ll long long
#define size_t long long
// sort(&a[0], &a[4], [](auto& x, auto& y){return x[0] < y[0];});
// accumulate(&arr2[n], &arr2[m-1], 0);
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
double W, H, x, y;
std::cin >> W >> H >> x >> y;
std::cout << W * H / 2 << (x == W / 2 && y == H / 2) << '\n';
return 0;
}
| #include <bits/stdc++.h>
#define ull unsigned long long
#define ul unsigned long
#define ll long long
#define size_t long long
// sort(&a[0], &a[4], [](auto& x, auto& y){return x[0] < y[0];});
// accumulate(&arr2[n], &arr2[m-1], 0);
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
double W, H, x, y;
std::cin >> W >> H >> x >> y;
std::cout << W * H / 2 << " " << (x == W / 2 && y == H / 2) << '\n';
return 0;
}
| [
"expression.operation.binary.add"
] | 816,490 | 816,491 | u131033623 | cpp |
p03001 | /* Name : c
* Creat : Fri Jul 12 22:30:10 CST 2019
* Accept : Fri Jul 12 22:47:23 CST 2019
* Author : landcold7
* Action speaks louder more than words
*/
#include <bits/stdc++.h>
using namespace std;
#define x first
#define y second
#define sz(x) ((int)(x).size())
#ifndef _has_trace
#define trace(...)
#endif
typedef long long ll;
void solve() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
int ok = 0;
if (x * 2 == w && y * 2 == h) {
ok = 1;
}
cout << h * w / 2 << " " << ok << "\n";
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout << setprecision(6) << fixed;
solve();
return 0;
}
| /* Name : c
* Creat : Fri Jul 12 22:30:10 CST 2019
* Accept : Fri Jul 12 22:57:08 CST 2019
* Author : landcold7
* Action speaks louder more than words
*/
#include <bits/stdc++.h>
using namespace std;
#define x first
#define y second
#define sz(x) ((int)(x).size())
#ifndef _has_trace
#define trace(...)
#endif
typedef long long ll;
void solve() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
int ok = 0;
if (x * 2 == w && y * 2 == h) {
ok = 1;
}
cout << h * w / 2.0 << " " << ok << "\n";
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout << setprecision(15) << fixed;
solve();
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 816,494 | 816,495 | u161007542 | cpp |
p03001 | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define LLONG_MAXs 9223372036854775800
#define ALL(a) (a).begin(), (a).end()
#include <cmath>
#include <iostream>
using namespace std;
bool isPrimeNum(ll x) { // 素数である場合 true を返す
if (x <= 1) { // 1以下である場合は素数でないことがすぐにわかる
return false;
}
// sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
int n = (int)sqrt((double)x);
for (int i = 2; i <= n; i++) {
if (x % i == 0) { // 割り切る整数がある場合、即判定終了
return false;
}
}
return true; // 割り切る整数がない場合、素数である
}
ll myPow(ll x, ll n, ll m) {
if (n == 0)
return 1;
if (n % 2 == 0)
return myPow(x * x % m, n / 2, m);
else
return x * myPow(x, n - 1, m) % m;
}
constexpr ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
constexpr ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll abs(ll a, ll b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr ll min(ll a, ll b) {
if (a >= b)
return b;
if (a < b)
return a;
}
constexpr ll max(ll a, ll b) {
if (a >= b)
return a;
if (a < b)
return b;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
class UnionFind {
public:
//親の番号を格納する。親だった場合は-(その集合のサイズ)
vector<int> Parent;
//作るときはParentの値を全て-1にする
//こうすると全てバラバラになる
UnionFind(int N) { Parent = vector<int>(N, -1); }
// Aがどのグループに属しているか調べる
int root(int A) {
if (Parent[A] < 0)
return A;
return Parent[A] = root(Parent[A]);
}
//自分のいるグループの頂点数を調べる
int size(int A) {
return -Parent[root(A)]; //親をとってきたい]
}
// AとBをくっ付ける
bool connect(int A, int B) {
// AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
A = root(A);
B = root(B);
if (A == B) {
//すでにくっついてるからくっ付けない
return false;
}
//大きい方(A)に小さいほう(B)をくっ付けたい
//大小が逆だったらひっくり返しちゃう。
if (size(A) < size(B))
swap(A, B);
// Aのサイズを更新する
Parent[A] += Parent[B];
// Bの親をAに変更する
Parent[B] = A;
return true;
}
};
long long fac[510000], finv[510000], inv[510000];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < 510000; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
string replaceAll(string &replacedStr, string from, string to) {
unsigned int pos = replacedStr.find(from);
int toLen = to.length();
if (from.empty()) {
return replacedStr;
}
while ((pos = replacedStr.find(from, pos)) != std::string::npos) {
replacedStr.replace(pos, from.length(), to);
pos += toLen;
}
return replacedStr;
}
void yn(bool flag) {
if (flag) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return;
}
void YN(bool flag) {
if (flag) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return;
}
struct Edge {
int to; // 辺の行き先
int weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
// using Graph = vector<vector<Edge>>;
using Graph = vector<vector<int>>;
vector<bool> seen;
vector<ll> step;
void dfs(const Graph &G, int v, ll now) {
seen[v] = true; // v を訪問済にする
step[v] = now;
// v から行ける各頂点 next_v について
for (auto next_v : G[v]) {
if (seen[next_v] && (now + 1 >= step[next_v]))
continue; // next_v が探索済だったらスルー
dfs(G, next_v, now + 1); // 再帰的に探索
}
}
int main() {
COMinit();
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / (double)2;
cout << std::setprecision(2) << ans; // "12"
if (x * 2 == H && y * 2 == W) {
cout << " 1" << endl;
} else {
cout << " 0" << endl;
}
return 0;
}
| #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define LLONG_MAXs 9223372036854775800
#define ALL(a) (a).begin(), (a).end()
#include <cmath>
#include <iostream>
using namespace std;
bool isPrimeNum(ll x) { // 素数である場合 true を返す
if (x <= 1) { // 1以下である場合は素数でないことがすぐにわかる
return false;
}
// sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
int n = (int)sqrt((double)x);
for (int i = 2; i <= n; i++) {
if (x % i == 0) { // 割り切る整数がある場合、即判定終了
return false;
}
}
return true; // 割り切る整数がない場合、素数である
}
ll myPow(ll x, ll n, ll m) {
if (n == 0)
return 1;
if (n % 2 == 0)
return myPow(x * x % m, n / 2, m);
else
return x * myPow(x, n - 1, m) % m;
}
constexpr ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
constexpr ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll abs(ll a, ll b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr ll min(ll a, ll b) {
if (a >= b)
return b;
if (a < b)
return a;
}
constexpr ll max(ll a, ll b) {
if (a >= b)
return a;
if (a < b)
return b;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
class UnionFind {
public:
//親の番号を格納する。親だった場合は-(その集合のサイズ)
vector<int> Parent;
//作るときはParentの値を全て-1にする
//こうすると全てバラバラになる
UnionFind(int N) { Parent = vector<int>(N, -1); }
// Aがどのグループに属しているか調べる
int root(int A) {
if (Parent[A] < 0)
return A;
return Parent[A] = root(Parent[A]);
}
//自分のいるグループの頂点数を調べる
int size(int A) {
return -Parent[root(A)]; //親をとってきたい]
}
// AとBをくっ付ける
bool connect(int A, int B) {
// AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
A = root(A);
B = root(B);
if (A == B) {
//すでにくっついてるからくっ付けない
return false;
}
//大きい方(A)に小さいほう(B)をくっ付けたい
//大小が逆だったらひっくり返しちゃう。
if (size(A) < size(B))
swap(A, B);
// Aのサイズを更新する
Parent[A] += Parent[B];
// Bの親をAに変更する
Parent[B] = A;
return true;
}
};
long long fac[510000], finv[510000], inv[510000];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < 510000; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
string replaceAll(string &replacedStr, string from, string to) {
unsigned int pos = replacedStr.find(from);
int toLen = to.length();
if (from.empty()) {
return replacedStr;
}
while ((pos = replacedStr.find(from, pos)) != std::string::npos) {
replacedStr.replace(pos, from.length(), to);
pos += toLen;
}
return replacedStr;
}
void yn(bool flag) {
if (flag) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return;
}
void YN(bool flag) {
if (flag) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return;
}
struct Edge {
int to; // 辺の行き先
int weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
// using Graph = vector<vector<Edge>>;
using Graph = vector<vector<int>>;
vector<bool> seen;
vector<ll> step;
void dfs(const Graph &G, int v, ll now) {
seen[v] = true; // v を訪問済にする
step[v] = now;
// v から行ける各頂点 next_v について
for (auto next_v : G[v]) {
if (seen[next_v] && (now + 1 >= step[next_v]))
continue; // next_v が探索済だったらスルー
dfs(G, next_v, now + 1); // 再帰的に探索
}
}
int main() {
COMinit();
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / (double)2;
cout << std::setprecision(30) << ans; // "12"
if (x * 2 == W && y * 2 == H) {
cout << " 1" << endl;
} else {
cout << " 0" << endl;
}
return 0;
}
| [
"literal.number.change",
"io.output.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 816,500 | 816,501 | u043443359 | cpp |
p03001 | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define LLONG_MAXs 9223372036854775800
#define ALL(a) (a).begin(), (a).end()
#include <cmath>
#include <iostream>
using namespace std;
bool isPrimeNum(ll x) { // 素数である場合 true を返す
if (x <= 1) { // 1以下である場合は素数でないことがすぐにわかる
return false;
}
// sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
int n = (int)sqrt((double)x);
for (int i = 2; i <= n; i++) {
if (x % i == 0) { // 割り切る整数がある場合、即判定終了
return false;
}
}
return true; // 割り切る整数がない場合、素数である
}
ll myPow(ll x, ll n, ll m) {
if (n == 0)
return 1;
if (n % 2 == 0)
return myPow(x * x % m, n / 2, m);
else
return x * myPow(x, n - 1, m) % m;
}
constexpr ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
constexpr ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll abs(ll a, ll b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr ll min(ll a, ll b) {
if (a >= b)
return b;
if (a < b)
return a;
}
constexpr ll max(ll a, ll b) {
if (a >= b)
return a;
if (a < b)
return b;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
class UnionFind {
public:
//親の番号を格納する。親だった場合は-(その集合のサイズ)
vector<int> Parent;
//作るときはParentの値を全て-1にする
//こうすると全てバラバラになる
UnionFind(int N) { Parent = vector<int>(N, -1); }
// Aがどのグループに属しているか調べる
int root(int A) {
if (Parent[A] < 0)
return A;
return Parent[A] = root(Parent[A]);
}
//自分のいるグループの頂点数を調べる
int size(int A) {
return -Parent[root(A)]; //親をとってきたい]
}
// AとBをくっ付ける
bool connect(int A, int B) {
// AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
A = root(A);
B = root(B);
if (A == B) {
//すでにくっついてるからくっ付けない
return false;
}
//大きい方(A)に小さいほう(B)をくっ付けたい
//大小が逆だったらひっくり返しちゃう。
if (size(A) < size(B))
swap(A, B);
// Aのサイズを更新する
Parent[A] += Parent[B];
// Bの親をAに変更する
Parent[B] = A;
return true;
}
};
long long fac[510000], finv[510000], inv[510000];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < 510000; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
string replaceAll(string &replacedStr, string from, string to) {
unsigned int pos = replacedStr.find(from);
int toLen = to.length();
if (from.empty()) {
return replacedStr;
}
while ((pos = replacedStr.find(from, pos)) != std::string::npos) {
replacedStr.replace(pos, from.length(), to);
pos += toLen;
}
return replacedStr;
}
void yn(bool flag) {
if (flag) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return;
}
void YN(bool flag) {
if (flag) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return;
}
struct Edge {
int to; // 辺の行き先
int weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
// using Graph = vector<vector<Edge>>;
using Graph = vector<vector<int>>;
vector<bool> seen;
vector<ll> step;
void dfs(const Graph &G, int v, ll now) {
seen[v] = true; // v を訪問済にする
step[v] = now;
// v から行ける各頂点 next_v について
for (auto next_v : G[v]) {
if (seen[next_v] && (now + 1 >= step[next_v]))
continue; // next_v が探索済だったらスルー
dfs(G, next_v, now + 1); // 再帰的に探索
}
}
int main() {
COMinit();
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / (double)2;
cout << std::setprecision(2) << ans; // "12"
if (x * 2 == W && y * 2 == H) {
cout << " 1" << endl;
} else {
cout << " 0" << endl;
}
return 0;
}
| #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define LLONG_MAXs 9223372036854775800
#define ALL(a) (a).begin(), (a).end()
#include <cmath>
#include <iostream>
using namespace std;
bool isPrimeNum(ll x) { // 素数である場合 true を返す
if (x <= 1) { // 1以下である場合は素数でないことがすぐにわかる
return false;
}
// sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
int n = (int)sqrt((double)x);
for (int i = 2; i <= n; i++) {
if (x % i == 0) { // 割り切る整数がある場合、即判定終了
return false;
}
}
return true; // 割り切る整数がない場合、素数である
}
ll myPow(ll x, ll n, ll m) {
if (n == 0)
return 1;
if (n % 2 == 0)
return myPow(x * x % m, n / 2, m);
else
return x * myPow(x, n - 1, m) % m;
}
constexpr ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
constexpr ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll abs(ll a, ll b) {
if (a >= b)
return a - b;
if (a < b)
return b - a;
}
constexpr ll min(ll a, ll b) {
if (a >= b)
return b;
if (a < b)
return a;
}
constexpr ll max(ll a, ll b) {
if (a >= b)
return a;
if (a < b)
return b;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
class UnionFind {
public:
//親の番号を格納する。親だった場合は-(その集合のサイズ)
vector<int> Parent;
//作るときはParentの値を全て-1にする
//こうすると全てバラバラになる
UnionFind(int N) { Parent = vector<int>(N, -1); }
// Aがどのグループに属しているか調べる
int root(int A) {
if (Parent[A] < 0)
return A;
return Parent[A] = root(Parent[A]);
}
//自分のいるグループの頂点数を調べる
int size(int A) {
return -Parent[root(A)]; //親をとってきたい]
}
// AとBをくっ付ける
bool connect(int A, int B) {
// AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
A = root(A);
B = root(B);
if (A == B) {
//すでにくっついてるからくっ付けない
return false;
}
//大きい方(A)に小さいほう(B)をくっ付けたい
//大小が逆だったらひっくり返しちゃう。
if (size(A) < size(B))
swap(A, B);
// Aのサイズを更新する
Parent[A] += Parent[B];
// Bの親をAに変更する
Parent[B] = A;
return true;
}
};
long long fac[510000], finv[510000], inv[510000];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < 510000; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0)
u += m;
return u;
}
string replaceAll(string &replacedStr, string from, string to) {
unsigned int pos = replacedStr.find(from);
int toLen = to.length();
if (from.empty()) {
return replacedStr;
}
while ((pos = replacedStr.find(from, pos)) != std::string::npos) {
replacedStr.replace(pos, from.length(), to);
pos += toLen;
}
return replacedStr;
}
void yn(bool flag) {
if (flag) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return;
}
void YN(bool flag) {
if (flag) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return;
}
struct Edge {
int to; // 辺の行き先
int weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
// using Graph = vector<vector<Edge>>;
using Graph = vector<vector<int>>;
vector<bool> seen;
vector<ll> step;
void dfs(const Graph &G, int v, ll now) {
seen[v] = true; // v を訪問済にする
step[v] = now;
// v から行ける各頂点 next_v について
for (auto next_v : G[v]) {
if (seen[next_v] && (now + 1 >= step[next_v]))
continue; // next_v が探索済だったらスルー
dfs(G, next_v, now + 1); // 再帰的に探索
}
}
int main() {
COMinit();
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / (double)2;
cout << std::setprecision(30) << ans; // "12"
if (x * 2 == W && y * 2 == H) {
cout << " 1" << endl;
} else {
cout << " 0" << endl;
}
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 816,502 | 816,501 | u043443359 | cpp |
p03001 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
#define CHMAX(a, b) a = std::max(a, b)
#define CHMIN(a, b) a = std::min(a, b)
#define CHABS(a) a = std::abs(a)
#define COUT(a) std::cout << a << std::endl
#define CERR(a) std::cerr << a << std::endl
#define FOR(n) for (lli i = 0; i < n; i++)
using namespace std;
using lli = long long int;
using pll = pair<lli, lli>;
lli mod197 = 1000000007LL;
// ax + by = gcd(a,b) 最大公約数
template <typename T> T extgcd(T a, T b, T &x, T &y) {
T d = a;
if (b != 0) {
d = extgcd(b, a % b, y, x);
y -= (a / b) * x;
} else {
x = 1;
y = 0;
}
return d;
}
int main(void) {
lli W, H, x, y;
cin >> W >> H >> x >> y;
cout << (W * H) / 2 << " " << (W == 2 * x && H == 2 * y ? 1 : 0) << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
#define CHMAX(a, b) a = std::max(a, b)
#define CHMIN(a, b) a = std::min(a, b)
#define CHABS(a) a = std::abs(a)
#define COUT(a) std::cout << a << std::endl
#define CERR(a) std::cerr << a << std::endl
#define FOR(n) for (lli i = 0; i < n; i++)
using namespace std;
using lli = long long int;
using pll = pair<lli, lli>;
lli mod197 = 1000000007LL;
// ax + by = gcd(a,b) 最大公約数
template <typename T> T extgcd(T a, T b, T &x, T &y) {
T d = a;
if (b != 0) {
d = extgcd(b, a % b, y, x);
y -= (a / b) * x;
} else {
x = 1;
y = 0;
}
return d;
}
int main(void) {
lli W, H, x, y;
cin >> W >> H >> x >> y;
cout << (W * H) / 2.0 << " " << (W == 2 * x && H == 2 * y ? 1 : 0) << endl;
return 0;
} | [
"literal.number.change",
"io.output.change"
] | 816,505 | 816,506 | u155216115 | cpp |
p03001 | #include <algorithm>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define INF 1000000009;
using namespace std;
int gcd(int a, int b) {
while (a % b != 0) {
int c = 0;
c = a % b;
a = b;
b = c;
}
return b;
}
long long a, b;
long long counto;
long long ans[109];
char bb[5];
int main() {
int W = 0, H = 0, x = 0, y = 0;
int counto = 0;
cin >> W >> H >> x >> y;
cout << setprecision(9) << W * H / 2 << " ";
if (x == W / 2 && y == H / 2) {
cout << '1' << endl;
return 0;
} else {
cout << '0' << endl;
return 0;
}
return 0;
} | #include <algorithm>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define INF 1000000009;
using namespace std;
int gcd(int a, int b) {
while (a % b != 0) {
int c = 0;
c = a % b;
a = b;
b = c;
}
return b;
}
long long a, b;
long long counto;
long long ans[109];
char bb[5];
int main() {
long double W = 0, H = 0, x = 0, y = 0;
int counto = 0;
cin >> W >> H >> x >> y;
cout << setprecision(9) << W * H / 2 << " ";
if (x == W / 2 && y == H / 2) {
cout << '1' << endl;
return 0;
} else {
cout << '0' << endl;
return 0;
}
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 816,507 | 816,508 | u019465635 | cpp |
p03001 | #include <bits/stdc++.h>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
long long width, height, x, y;
cin >> width >> height >> x >> y;
double sqr = width * height / 2;
cout << fixed << setprecision(10) << sqr << " ";
if (x * 2 == width && y * 2 == height) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
}
| #include <bits/stdc++.h>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
long long width, height, x, y;
cin >> width >> height >> x >> y;
double sqr = (double)(width)*height / 2;
cout << fixed << setprecision(10) << sqr << " ";
if (x * 2 == width && y * 2 == height) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
}
| [
"type_conversion.add"
] | 816,509 | 816,510 | u625522718 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << " ";
if (x == w / 2 && y == h / 2) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 816,520 | 816,521 | u255172538 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2 << " ";
if (x == w / 2 && y == h / 2) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| [
"literal.number.change",
"io.output.change",
"control_flow.branch.if.condition.change"
] | 816,522 | 816,521 | u255172538 | cpp |
p03001 | #include <iostream>
#include <string.h>
#include <string>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double area;
area = (double(W) * double(H)) / 2;
string way = "0";
if (x + x == W && y + y == H) {
way = "1";
}
cout << area << "," << way << endl;
return 0;
} | #include <iostream>
#include <string.h>
#include <string>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double area;
area = (double(W) * double(H)) / 2;
string way = "0";
if (x + x == W && y + y == H) {
way = "1";
}
cout << area << " " << way << endl;
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 816,529 | 816,530 | u182310429 | cpp |
p03001 | #include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int w, h, x, y;
int ans;
cin >> w >> h >> x >> y;
if (x * 2 == w && y * 2 == h) {
ans = 1;
} else {
ans = 0;
}
cout << w * h / 2 << ' ' << ans;
}
| #include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int w, h, x, y;
int ans;
cin >> w >> h >> x >> y;
if (x * 2 == w && y * 2 == h) {
ans = 1;
} else {
ans = 0;
}
cout << (double)w * h / 2 << ' ' << ans;
}
| [
"type_conversion.add"
] | 816,546 | 816,547 | u005570675 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
int W, H, x, y;
cin >> W >> H >> x >> y;
double area = (double)W * H;
cout.precision(17);
cout << fixed << area / 2. << " " << (x == W / 2 && y == H / 2) << "\n";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
int W, H, x, y;
cin >> W >> H >> x >> y;
double area = (double)W * H;
cout.precision(17);
cout << fixed << area / 2. << " " << (x == W / 2. && y == H / 2.) << "\n";
return 0;
} | [] | 816,567 | 816,568 | u959960486 | cpp |
p03001 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define INT_MAX 2147483647
typedef long long ll;
ll gcd(ll m, ll n);
ll lcm(ll m, ll n);
int main(void) {
int a, b, c, d;
cin >> a >> b >> c >> d;
double ans = a * b / 2;
int ans1 = 0;
if (a / 2 == c && b / 2 == d)
ans1 = 1;
printf("%lf %d\n", ans, ans1);
return 0;
}
// 2番目から3要素だけ抜き出した部分文字列を取得する
// std::string result = s.substr(2, 3);
#if 1
//最大公倍数
ll gcd(ll m, ll n) {
ll temp;
while (m % n != 0) {
temp = n;
n = m % n;
m = temp;
}
return n;
}
//最小公倍数
ll lcm(ll m, ll n) { return m * n / gcd(m, n); }
#endif | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define INT_MAX 2147483647
typedef long long ll;
ll gcd(ll m, ll n);
ll lcm(ll m, ll n);
int main(void) {
double a, b, c, d;
cin >> a >> b >> c >> d;
double ans = a * b / 2;
int ans1 = 0;
if (a / 2 == c && b / 2 == d)
ans1 = 1;
printf("%lf %d\n", ans, ans1);
return 0;
}
// 2番目から3要素だけ抜き出した部分文字列を取得する
// std::string result = s.substr(2, 3);
#if 1
//最大公倍数
ll gcd(ll m, ll n) {
ll temp;
while (m % n != 0) {
temp = n;
n = m % n;
m = temp;
}
return n;
}
//最小公倍数
ll lcm(ll m, ll n) { return m * n / gcd(m, n); }
#endif | [
"variable_declaration.type.primitive.change"
] | 816,569 | 816,570 | u421782399 | cpp |
p03001 | #include "bits/stdc++.h"
#define ed cout << "\n";
#define speed \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define All(obj) (obj).begin(), (obj).end()
using namespace std;
int main() {
speed;
int W, H, x, y;
cin >> W >> H >> x >> y;
double ans1 = double(W) * double(H) / 2;
int ans2 = 0;
if (2 * x == W && 2 * y == H)
ans2 = 1;
cout << ans1 << ans2;
ed;
return 0;
}
| #include "bits/stdc++.h"
#define ed cout << "\n";
#define speed \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define All(obj) (obj).begin(), (obj).end()
using namespace std;
int main() {
speed;
int W, H, x, y;
cin >> W >> H >> x >> y;
double ans1 = double(W) * double(H) / 2;
int ans2 = 0;
if (2 * x == W && 2 * y == H)
ans2 = 1;
cout << ans1 << " " << ans2;
ed;
return 0;
}
| [
"io.output.change"
] | 816,571 | 816,572 | u662918817 | cpp |
p03001 | //
// main.cpp
// CoderTest
//
// Created by yuya on 2019/05/20.
// Copyright © 2019 yuya. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
if (x == W / 2 && y == H / 2) {
cout << setprecision(12) << W * H / 2 << " " << 1 << endl;
} else {
cout << setprecision(12) << W * H / 2 << " " << 0 << endl;
}
return 0;
}
| //
// main.cpp
// CoderTest
//
// Created by yuya on 2019/05/20.
// Copyright © 2019 yuya. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
if (x == W / 2 && y == H / 2) {
cout << setprecision(12) << W * H / 2 << " " << 1 << endl;
} else {
cout << setprecision(12) << W * H / 2 << " " << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 816,575 | 816,576 | u422769833 | cpp |
p03001 | //
// main.cpp
// CoderTest
//
// Created by yuya on 2019/05/20.
// Copyright © 2019 yuya. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
if (x == W / 2 && y == H / 2) {
cout << setprecision(9) << W * H / 2 << " " << 1 << endl;
} else {
cout << setprecision(9) << W * H / 2 << " " << 0 << endl;
}
return 0;
}
| //
// main.cpp
// CoderTest
//
// Created by yuya on 2019/05/20.
// Copyright © 2019 yuya. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
if (x == W / 2 && y == H / 2) {
cout << setprecision(12) << W * H / 2 << " " << 1 << endl;
} else {
cout << setprecision(12) << W * H / 2 << " " << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.primitive.change",
"literal.number.change",
"io.output.change"
] | 816,577 | 816,576 | u422769833 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int ans = 0;
if (x == W / 2 && y == H / 2) {
cout << W * H / 2 << " 1" << endl;
} else {
cout << W * H / 2 << " 0" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
int ans = 0;
if (x == W / 2 && y == H / 2) {
cout << W * H / 2 << " 1" << endl;
} else {
cout << W * H / 2 << " 0" << endl;
}
}
| [
"variable_declaration.type.primitive.change"
] | 816,583 | 816,584 | u469953228 | cpp |
p03001 | #include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <utility>
using namespace std;
#define ll long long
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
cout << W * H / 2 << " " << ((W / 2 == x) && (H / 2 == y)) << endl;
return 0;
}
| #include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <utility>
using namespace std;
#define ll long long
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
cout << W * H / 2 << " " << ((W / 2 == x) && (H / 2 == y)) << endl;
return 0;
}
| [
"variable_declaration.type.change"
] | 816,587 | 816,588 | u668443884 | cpp |
p03001 | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define REPR(i, n) for (int(i) = (n); (i) >= 0; (i)--)
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define ALL(x) x.begin(), x.end()
#define REVERSE(x) reverse(x.begin(), x.end())
#define SORT(x, n) sort(x, x)
#define P pair<int, int>
typedef long long LL;
const int INF = 1000000007;
using namespace std;
int gcd(int a, int b) {
if (a % b == 0) {
return b;
} else {
return gcd(b, a % b);
}
}
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
if (2 * x == W && 2 * y == H) {
cout << H * W / 2 << '1';
} else {
cout << H * W / 2 << " " << '0';
}
} | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define REPR(i, n) for (int(i) = (n); (i) >= 0; (i)--)
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define ALL(x) x.begin(), x.end()
#define REVERSE(x) reverse(x.begin(), x.end())
#define SORT(x, n) sort(x, x)
#define P pair<int, int>
typedef long long LL;
const int INF = 1000000007;
using namespace std;
int gcd(int a, int b) {
if (a % b == 0) {
return b;
} else {
return gcd(b, a % b);
}
}
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
if (2 * x == W && 2 * y == H) {
cout << H * W / 2 << " " << '1';
} else {
cout << H * W / 2 << " " << '0';
}
}
| [
"io.output.change"
] | 816,589 | 816,590 | u709810602 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
double S;
cin >> W >> H >> x >> y;
S = W * H / 2;
int second = 0;
if (x == W / 2 && y == H / 2) {
second = 1;
}
cout << S << " " << second << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
double S;
cin >> W >> H >> x >> y;
S = W * H / 2;
int second = 0;
if (x == W / 2 && y == H / 2) {
second = 1;
}
cout << S << " " << second << endl;
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 816,597 | 816,598 | u636279017 | cpp |
p03001 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tuple>
#include <vector>
using ll = long long;
// LLONG_MAX
#define int long long
#define CONTAINS(v, n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a) + (size))
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define REMOVE(v, a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v, a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v, a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
using namespace std;
int W, H, X, Y;
signed main() {
cin >> W >> H >> X >> Y;
int m = W * H / 2;
int n = (X == W / 2.0 && Y == H / 2.0) ? 1 : 0;
cout << m << " " << n << endl;
}
| #define _USE_MATH_DEFINES
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <tuple>
#include <vector>
using ll = long long;
// LLONG_MAX
#define int long long
#define CONTAINS(v, n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a) + (size))
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define REMOVE(v, a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v, a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v, a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
using namespace std;
int W, H, X, Y;
signed main() {
cin >> W >> H >> X >> Y;
double m = W * H / 2.0;
int n = (X == W / 2.0 && Y == H / 2.0) ? 1 : 0;
cout << m << " " << n << endl;
}
| [
"variable_declaration.type.primitive.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,599 | 816,600 | u624800360 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long w, h, x, y;
cin >> w >> h >> x >> y;
if (x * 2 != w || y * 2 != h) {
cout << w * h / 2 << " 0" << endl;
} else {
cout << w * h / 2 << " 1" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long w, h, x, y;
cin >> w >> h >> x >> y;
if (x * 2 != w || y * 2 != h) {
cout << (double)w * h / 2 << " 0" << endl;
} else {
cout << (double)w * h / 2 << " 1" << endl;
}
}
| [
"type_conversion.add"
] | 816,605 | 816,606 | u229596090 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long w, h, x, y;
cin >> w >> h >> x >> y;
long ans = w * h / 2;
int num;
if (w / 2.0 == x && h / 2.0 == y)
num = 1;
else
num = 0;
printf("%.10f %d\n", ans, num);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h / 2;
int num;
if (w / 2 == x && h / 2 == y)
num = 1;
else
num = 0;
printf("%.10f %d\n", ans, num);
return 0;
} | [
"variable_declaration.type.primitive.change",
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 816,613 | 816,614 | u464527162 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF LONG_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int W, H, x, y;
cin >> W >> H >> x >> y;
cout << fixed << setprecision(10) << 1. * H * W / 2;
cout << " ";
if (W / 2 == x && H / 2 == y)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF LONG_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
double W, H, x, y;
cin >> W >> H >> x >> y;
cout << fixed << setprecision(10) << 1. * H * W / 2;
cout << " ";
if (W / 2 == x && H / 2 == y)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 816,615 | 816,616 | u864171425 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = (double)(w * h) / 2;
if (x == centerX && y == centerY)
ans = 1;
cout << fixed << s << " " << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = w * h / 2;
if (x == centerX && y == centerY)
ans = 1;
cout << fixed << s << " " << ans << endl;
return 0;
} | [
"variable_declaration.type.primitive.change"
] | 816,619 | 816,620 | u420528322 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = (double)(w * h / 2);
if (x == centerX && y == centerY)
ans = 1;
cout << fixed << s << " " << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = w * h / 2;
if (x == centerX && y == centerY)
ans = 1;
cout << fixed << s << " " << ans << endl;
return 0;
} | [
"variable_declaration.type.primitive.change"
] | 816,621 | 816,620 | u420528322 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = w * h / 2;
if (x == centerX && y == centerY)
ans = 1;
cout << fixed << s << " " << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = w * h / 2;
if (x == centerX && y == centerY)
ans = 1;
cout << fixed << s << " " << ans << endl;
return 0;
} | [
"variable_declaration.type.primitive.change"
] | 816,622 | 816,620 | u420528322 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = w * h / 2;
if (x == centerX && y == centerY)
ans = 1;
cout << s << " " << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double centerX, centerY;
double s;
int ans = 0;
centerX = w / 2;
centerY = h / 2;
s = w * h / 2;
if (x == centerX && y == centerY)
ans = 1;
cout << fixed << s << " " << ans << endl;
return 0;
} | [
"variable_declaration.type.primitive.change",
"io.output.change"
] | 816,623 | 816,620 | u420528322 | cpp |
p03001 | #include <iostream>
using namespace std;
long long w, h, x, y;
int main() {
cin >> w >> h >> x >> y;
cout << w * h / 2 << ' ' << (2 * x == w && 2 * y == h);
return 0;
} | #include <iostream>
using namespace std;
long long w, h, x, y;
int main() {
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << ' ' << (2 * x == w && 2 * y == h);
return 0;
} | [
"literal.number.change",
"io.output.change"
] | 816,627 | 816,628 | u093170535 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / 2;
int ans2;
if (x * 2 == W && y * 2 == H) {
ans2 = 1;
} else {
ans2 = 0;
}
cout << ans << " " << ans2 << endl;
};
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
double ans = double(W) * double(H) / 2;
int ans2;
if (x * 2 == W && y * 2 == H) {
ans2 = 1;
} else {
ans2 = 0;
}
cout << ans << " " << ans2 << endl;
};
| [
"call.add",
"call.arguments.change"
] | 816,633 | 816,634 | u987594251 | cpp |
p03001 | #include <iostream>
int main() {
int W, H, x, y;
std::cin >> W >> H >> x >> y;
double ans = W * H / 2;
std::cout << ans << ' ' << (x == W / 2 && y == H / 2 ? 1 : 0) << std::endl;
return 0;
}
| #include <iostream>
int main() {
double W, H, x, y;
std::cin >> W >> H >> x >> y;
double ans = W * H / 2;
std::cout << ans << ' ' << (x == W / 2 && y == H / 2 ? 1 : 0) << std::endl;
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 816,641 | 816,642 | u749907841 | cpp |
p03001 | #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
struct edge {
int to, cost;
};
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> P;
const int INF = 1e9;
const double EPS = 1e-10;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const int mx4[] = {0, 1, 0, -1};
const int my4[] = {1, 0, -1, 0};
const int mx8[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int my8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << ' '
<< (w % 2 == 0 && h % 2 == 0 && x == w / 2 && y == h / 2 ? 0 : 0)
<< endl;
return 0;
}
| #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
struct edge {
int to, cost;
};
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> P;
const int INF = 1e9;
const double EPS = 1e-10;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const int mx4[] = {0, 1, 0, -1};
const int my4[] = {1, 0, -1, 0};
const int mx8[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int my8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << ' '
<< (w % 2 == 0 && h % 2 == 0 && x == w / 2 && y == h / 2 ? 1 : 0)
<< endl;
return 0;
}
| [
"variable_declaration.type.change",
"literal.number.change",
"io.output.change"
] | 816,649 | 816,650 | u216772548 | cpp |
p03001 | #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
struct edge {
int to, cost;
};
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> P;
const int INF = 1e9;
const double EPS = 1e-10;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const int mx4[] = {0, 1, 0, -1};
const int my4[] = {1, 0, -1, 0};
const int mx8[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int my8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << ' '
<< (w % 2 == 0 && h % 2 == 0 && x == w / 2 && y == h / 2 ? 1 : 1)
<< endl;
return 0;
}
| #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
struct edge {
int to, cost;
};
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> P;
const int INF = 1e9;
const double EPS = 1e-10;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const int mx4[] = {0, 1, 0, -1};
const int my4[] = {1, 0, -1, 0};
const int mx8[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int my8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << ' '
<< (w % 2 == 0 && h % 2 == 0 && x == w / 2 && y == h / 2 ? 1 : 0)
<< endl;
return 0;
}
| [
"variable_declaration.type.change",
"literal.number.change",
"io.output.change"
] | 816,651 | 816,650 | u216772548 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
printf("%lf ", W * H / 2);
if ((x != W / 2) && (y != H / 2)) {
cout << 0;
} else {
cout << 1;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
printf("%lf ", W * H / 2);
if ((x == W / 2) && (y == H / 2)) {
cout << 1;
} else {
cout << 0;
}
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.number.change",
"io.output.change"
] | 816,655 | 816,656 | u456633003 | cpp |
p03001 | #include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
unsigned long long w, h, x, y;
scanf("%d%d%d%d", &w, &h, &x, &y);
printf("%lf %d\n", double(w) * double(h) / 2, x + x == w && y + y == h);
}
| #include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int w, h, x, y;
scanf("%d%d%d%d", &w, &h, &x, &y);
printf("%lf %d\n", double(w) * double(h) / 2, x + x == w && y + y == h);
}
| [
"variable_declaration.type.primitive.change"
] | 816,672 | 816,673 | u662852612 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define inf 1000000000000000
#define mod 1000000007
typedef pair<int, int> P;
bool prime(int n) {
for (int i = 2; i <= sqrt(n); i++) {
if (n % i == 0)
return false;
}
return n != 1;
}
int gcd(int x, int y) {
if (y == 0)
return x;
return gcd(y, x % y);
}
int lcm(int x, int y) { return x / gcd(x, y) * y; }
int mod_pow(int n, int p, int m) {
if (p == 0)
return 1;
if (p % 2 == 0) {
int t = mod_pow(n, p / 2, m);
return (t * t) % m;
}
return n * mod_pow(n, p - 1, m) % m;
}
signed main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
printf("%.9lf", w * h / 2);
cout << " ";
if (x * 2 == 2 && y * 2 == h) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define inf 1000000000000000
#define mod 1000000007
typedef pair<int, int> P;
bool prime(int n) {
for (int i = 2; i <= sqrt(n); i++) {
if (n % i == 0)
return false;
}
return n != 1;
}
int gcd(int x, int y) {
if (y == 0)
return x;
return gcd(y, x % y);
}
int lcm(int x, int y) { return x / gcd(x, y) * y; }
int mod_pow(int n, int p, int m) {
if (p == 0)
return 1;
if (p % 2 == 0) {
int t = mod_pow(n, p / 2, m);
return (t * t) % m;
}
return n * mod_pow(n, p - 1, m) % m;
}
signed main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
printf("%.9lf", w * h / 2);
cout << " ";
if (x * 2 == w && y * 2 == h) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 816,674 | 816,675 | u452009494 | cpp |
p03001 | using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) \
for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int> a(n)
#define PQ(a) priority_queue<int> a
#define PQmin(a) priority_queue<int, : vector<int>, greater<int>> a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s) {
bool ans = true;
rep(i, s.size() / 2) {
if (s[i] != s[s.size() / 2 + i]) {
ans = false;
break;
}
}
return ans;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll W, H, x, y;
cin >> W >> H >> x >> y;
if (x + x == W && y + y == H)
cout << W * H / 2.0 << ' ' << 0 << endl;
else
cout << W * H / 2.0 << ' ' << 1 << endl;
}
| using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) \
for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int> a(n)
#define PQ(a) priority_queue<int> a
#define PQmin(a) priority_queue<int, : vector<int>, greater<int>> a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s) {
bool ans = true;
rep(i, s.size() / 2) {
if (s[i] != s[s.size() / 2 + i]) {
ans = false;
break;
}
}
return ans;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll W, H, x, y;
cin >> W >> H >> x >> y;
if (x + x == W && y + y == H)
cout << W * H / 2.0 << ' ' << 1 << endl;
else
cout << W * H / 2.0 << ' ' << 0 << endl;
}
| [
"control_flow.branch.else.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 816,690 | 816,691 | u535810324 | cpp |
p03001 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1 << 29;
const long long INFL = 1e18;
const int MOD = 1000000007;
const int MAX = 210000;
int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
//逆元を求める関数
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
//組み合わせ
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
void solve() {
double w;
cin >> w;
double h;
cin >> h;
int x;
cin >> x;
int y;
cin >> y;
cout << fixed << setprecision(9) << (w * h) / 2.0 << " ";
if (((int)w % 2 == 0 && (int)h & 2 == 0) &&
((int)x == w / 2 && (int)y == h / 2)) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return;
}
int main() {
solve();
return 0;
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1 << 29;
const long long INFL = 1e18;
const int MOD = 1000000007;
const int MAX = 210000;
int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
//逆元を求める関数
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
//組み合わせ
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
void solve() {
double w;
cin >> w;
double h;
cin >> h;
int x;
cin >> x;
int y;
cin >> y;
cout << fixed << setprecision(9) << (w * h) / 2.0 << " ";
//高さと幅が偶数であれば、直線x = w / 2、y = h / 2で分割する
//長方形の内部が2つの三角形となるような直線で分割する
//パターンが考えられるためその他の分割方法ありと判定する
if (((int)w % 2 == 0 && (int)h % 2 == 0) &&
((int)x == (w / 2) && (int)y == (h / 2))) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return;
}
int main() {
solve();
return 0;
}
| [
"control_flow.branch.if.condition.change"
] | 816,699 | 816,700 | u781381862 | cpp |
p03001 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1 << 29;
const long long INFL = 1e18;
const int MOD = 1000000007;
const int MAX = 210000;
int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
//逆元を求める関数
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
//組み合わせ
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
void solve() {
double w;
cin >> w;
double h;
cin >> h;
int x;
cin >> x;
int y;
cin >> y;
cout << fixed << setprecision(9) << (w * h) / 2.0 << " ";
if (((int)w % 2 == 0 && (int)h & 2 == 0) &&
((int)x == w / 2 && (int)y == h / 2)) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return;
}
int main() {
solve();
return 0;
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1 << 29;
const long long INFL = 1e18;
const int MOD = 1000000007;
const int MAX = 210000;
int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
//逆元を求める関数
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
//組み合わせ
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
void solve() {
double w;
cin >> w;
double h;
cin >> h;
int x;
cin >> x;
int y;
cin >> y;
cout << fixed << setprecision(9) << (w * h) / 2.0 << " ";
if (((int)w % 2 == 0 && (int)h % 2 == 0) &&
((int)x == (w / 2) && (int)y == (h / 2))) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return;
}
int main() {
solve();
return 0;
}
| [
"control_flow.branch.if.condition.change"
] | 816,699 | 816,701 | u781381862 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2;
if (x * 2 == w && y * 2 == h) {
cout << 1 << endl;
} else
cout << 0 << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2 << " ";
if (x * 2 == w && y * 2 == h) {
cout << 1 << endl;
} else
cout << 0 << endl;
} | [
"io.output.change"
] | 816,704 | 816,705 | u544165468 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t w, h, x, y;
cin >> w >> h >> x >> y;
double s = w * h / 2;
if (w == 2 * x && h == 2 * y) {
cout << fixed << setprecision(10) << s << ' ' << 1 << endl;
} else {
cout << fixed << setprecision(10) << s << ' ' << 0 << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double s = w * h / 2;
if (w == 2 * x && h == 2 * y) {
cout << fixed << setprecision(10) << s << ' ' << 1 << endl;
} else {
cout << fixed << setprecision(10) << s << ' ' << 0 << endl;
}
} | [
"variable_declaration.type.primitive.change"
] | 816,719 | 816,720 | u244626757 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double s = w * h / 2;
if (w == 2 * x && h == 2 * y) {
cout << fixed << setprecision(10) << s << ' ' << 1 << endl;
} else {
cout << fixed << setprecision(10) << s << ' ' << 0 << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double s = w * h / 2;
if (w == 2 * x && h == 2 * y) {
cout << fixed << setprecision(10) << s << ' ' << 1 << endl;
} else {
cout << fixed << setprecision(10) << s << ' ' << 0 << endl;
}
} | [
"variable_declaration.type.primitive.change"
] | 816,721 | 816,720 | u244626757 | cpp |
p03001 | #include <iostream>
#include <string>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
float max;
int answer = 0;
max = 0.5 * w * h;
if (2 * x == w || 2 * y == h) {
answer = 1;
}
cout << max << " " << answer << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
float max;
int answer = 0;
max = 0.5 * w * h;
if (2 * x == w && 2 * y == h) {
answer = 1;
}
cout << max << " " << answer << endl;
return 0;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 816,726 | 816,725 | u208102827 | cpp |
p03001 | #include <iostream>
#include <string>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
float max;
int answer = 0;
max = 0.5 * w * h;
if (x == y || 2 * x == w || 2 * y == h) {
answer = 1;
}
cout << max << " " << answer << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
float max;
int answer = 0;
max = 0.5 * w * h;
if (2 * x == w && 2 * y == h) {
answer = 1;
}
cout << max << " " << answer << endl;
return 0;
} | [
"expression.operation.binary.remove",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 816,727 | 816,725 | u208102827 | cpp |
p03001 | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mod 1000000007
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
using namespace std;
int main() {
IOS;
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << fixed;
cout << setprecision(10) << (w * h) / 2;
if (2 * x == w && 2 * y == h) {
cout << " 1\n";
} else
cout << " 0\n";
}
| #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mod 1000000007
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
using namespace std;
int main() {
IOS;
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << fixed;
cout << setprecision(10) << ((ld)w * h) / 2;
if (2 * x == w && 2 * y == h) {
cout << " 1\n";
} else
cout << " 0\n";
}
| [
"type_conversion.add"
] | 816,732 | 816,733 | u476304270 | cpp |
p03001 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
long W, H, x, y;
double S;
cin >> W >> H >> x >> y;
S = (double)W * (double)H / (double)2; // Sは切り分けた面積の最大値
printf("%18.10lf ", S);
if (W % 2 == 0 && H % 2 == 0) {
if (W / 2 == x, H / 2 == y) {
printf("1\n");
return 0;
}
}
printf("0\n");
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
long W, H, x, y;
double S;
cin >> W >> H >> x >> y;
S = (double)W * (double)H / (double)2; // Sは切り分けた面積の最大値
printf("%18.10lf ", S);
if (W % 2 == 0 && H % 2 == 0) {
if (W / 2 == x && H / 2 == y) {
printf("1\n");
return 0;
}
}
printf("0\n");
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 816,745 | 816,746 | u348109388 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
bool t = 0;
if (W == 2 * x && H == 2 * y) {
t = 1;
}
cout << W * H / 2 << " " << t << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
bool t = 0;
if (W == 2 * x && H == 2 * y) {
t = 1;
}
cout << W * H / 2 << " " << t << endl;
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 816,751 | 816,752 | u833295869 | cpp |
p03001 | #include <iostream>
int main() {
double w, h, x, y;
std::cin >> w >> h >> x >> y;
std::cout << w * h / 2;
if (x == w / 2 && y == h / 2) {
std::cout << 1;
} else {
std::cout << 0;
}
std::cout << std::endl;
} | #include <iostream>
int main() {
double w, h, x, y;
std::cin >> w >> h >> x >> y;
std::cout << w * h / 2 << " ";
if (x == w / 2 && y == h / 2) {
std::cout << 1;
} else {
std::cout << 0;
}
std::cout << std::endl;
} | [
"expression.operation.binary.add"
] | 816,753 | 816,754 | u965075144 | cpp |
p03001 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int W, H;
int x, y;
cin >> W >> H >> x >> y;
cout << W * H / 2 << " ";
if (x * 2 == W && y * 2 == H) {
cout << 1;
} else {
cout << 0;
}
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
double W, H;
double x, y;
cin >> W >> H >> x >> y;
cout << W * H / 2 << " ";
if (x * 2 == W && y * 2 == H) {
cout << 1;
} else {
cout << 0;
}
} | [
"variable_declaration.type.primitive.change"
] | 816,769 | 816,770 | u473116917 | cpp |
p03001 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y;
int center = 0;
cin >> w >> h >> x >> y;
if ((x == w / 2) && (y == h / 2)) {
center = 1;
}
double c;
c = w * h / 2;
cout << c << ' ' << center << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
int center = 0;
cin >> w >> h >> x >> y;
if ((x == w / 2) && (y == h / 2)) {
center = 1;
}
double c;
c = w * h / 2;
cout << c << ' ' << center << endl;
}
| [
"variable_declaration.type.primitive.change"
] | 816,771 | 816,772 | u173210352 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
int judge = 0;
cin >> w >> h;
cin >> x >> y;
cout << (float)((float)w * (float)h / 2.0) << ' ';
if ((float)w / 2.0 == x || (float)h / 2.0 == y)
judge = 1;
cout << judge << endl;
} | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
int judge = 0;
cin >> w >> h;
cin >> x >> y;
cout << (float)((float)w * (float)h / 2.0) << ' ';
if ((float)w / 2.0 == x && (float)h / 2.0 == y)
judge = 1;
cout << judge << endl;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 816,790 | 816,791 | u331302877 | cpp |
p03001 | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define pii pair<int, int>
#define ll long long
#define el '\n'
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int w, h, x, y;
cin >> w >> h >> x >> y;
double a = (double)(w + h) / 2;
cout << fixed << setprecision(11);
if (w % 2 + h % 2 > 0) {
cout << a << " " << (int)0 << el;
return 0;
}
if (w / 2 == x && h / 2 == y) {
cout << a << " " << (int)1 << el;
return 0;
}
cout << a << " " << (int)0 << el;
return 0;
} | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define pii pair<int, int>
#define ll long long
#define el '\n'
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll w, h, x, y;
cin >> w >> h >> x >> y;
double a = (double)(w * h) / 2;
cout << fixed << setprecision(11);
if (w % 2 + h % 2 > 0) {
cout << a << " " << (int)0 << el;
return 0;
}
if (w / 2 == x && h / 2 == y) {
cout << a << " " << (int)1 << el;
return 0;
}
cout << a << " " << (int)0 << el;
return 0;
} | [
"variable_declaration.type.change",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 816,810 | 816,809 | u287988203 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
cout << 1.0 * H * W / 2 << " ";
if (W / 2 == x && H / 2 == y) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
cout << 1.0 * H * W / 2 << " ";
if (W / 2 == x && H / 2 == y) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
}
| [
"variable_declaration.type.primitive.change"
] | 816,813 | 816,814 | u580402951 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double D = (W * H) / 2.0;
int T = 1;
if (W % 2 == 0 && H % 2 == 0) {
if (x == W / 2 && y == H / 2) {
T = 0;
}
}
cout << D << ' ' << T << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t W, H, x, y;
cin >> W >> H >> x >> y;
double D = (W * H) / 2.0;
int T = 0;
if (W % 2 == 0 && H % 2 == 0) {
if (x == W / 2 && y == H / 2) {
T = 1;
}
}
cout << D << ' ' << T << endl;
}
| [
"variable_declaration.type.primitive.change",
"literal.number.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 816,817 | 816,818 | u365882800 | cpp |
p03001 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
if (x + x == w && y + y == h) {
cout << w * h / 2 << " " << 1 << endl;
} else {
cout << w * h / 2 << " " << 0 << endl;
}
} | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
if (x + x == w && y + y == h) {
cout << w * h / 2 << " " << 1 << endl;
} else {
cout << w * h / 2 << " " << 0 << endl;
}
} | [
"variable_declaration.type.primitive.change"
] | 816,820 | 816,821 | u564755644 | cpp |
p03001 | #include <cmath>
#include <iostream>
#include <vector>
#define f(x, y) fabs((double)x / 2 - y)
using namespace std;
int main() {
int w, h, x, y;
bool yj = false;
cin >> w >> h >> x >> y;
cout << (double)w * h / 2 << " ";
if (2 * x == w || 2 * y == h)
cout << 0 << endl;
else
cout << 1 << endl;
return 0;
} | #include <cmath>
#include <iostream>
#include <vector>
#define f(x, y) fabs((double)x / 2 - y)
using namespace std;
int main() {
int w, h, x, y;
bool yj = false;
cin >> w >> h >> x >> y;
cout << (double)w * h / 2 << " ";
if (2 * x == w && 2 * y == h)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change",
"literal.number.change",
"io.output.change"
] | 816,824 | 816,825 | u890922829 | cpp |
p03001 | #include <cmath>
#include <iostream>
#include <vector>
#define f(x, y) fabs((double)x / 2 - y)
using namespace std;
int main() {
int w, h, x, y;
bool yj = false;
cin >> w >> h >> x >> y;
cout << (double)w * h / 2 << " ";
if (2 * x == w || 2 * y == h)
cout << 0 << endl;
cout << 1 << endl;
return 0;
} | #include <cmath>
#include <iostream>
#include <vector>
#define f(x, y) fabs((double)x / 2 - y)
using namespace std;
int main() {
int w, h, x, y;
bool yj = false;
cin >> w >> h >> x >> y;
cout << (double)w * h / 2 << " ";
if (2 * x == w && 2 * y == h)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 816,826 | 816,825 | u890922829 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double S;
S = W * H / 2;
cout << S << " " << int((x * 2 == W) && (y * 2 == H)) << endl;
} | #include <iostream>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double S;
S = W * H / 2;
cout << S << " " << int((x * 2 == W) && (y * 2 == H)) << endl;
} | [
"variable_declaration.type.primitive.change"
] | 816,836 | 816,837 | u600118696 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
int S;
S = W * H / 2;
cout << S << " " << int((x * 2 == W) && (y * 2 == H)) << endl;
} | #include <iostream>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double S;
S = W * H / 2;
cout << S << " " << int((x * 2 == W) && (y * 2 == H)) << endl;
} | [
"variable_declaration.type.primitive.change"
] | 816,838 | 816,837 | u600118696 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
cout << double(W) * double(H) / 2;
if (x + x == W && y + y == H) {
cout << "1";
} else {
cout << "0";
}
cout << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
cout << double(W) * double(H) / 2;
if (x + x == W && y + y == H) {
cout << " 1";
} else {
cout << " 0";
}
cout << endl;
} | [
"literal.string.change",
"io.output.change"
] | 816,839 | 816,840 | u348914050 | cpp |
p03001 | #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n';
typedef long long ll;
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int same = 0;
if (2 * x == W && 2 * y == H) {
same = 1;
}
double ans = H * W / 2;
cout << fixed;
cout << setprecision(8) << ans << ' ';
cout << same << endl;
return 0;
}
| #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n';
typedef long long ll;
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int same = 0;
if (2 * x == W && 2 * y == H) {
same = 1;
}
double ans = 1. * H * W / 2;
cout << fixed;
cout << setprecision(8) << ans << ' ';
cout << same << endl;
return 0;
}
| [
"assignment.change"
] | 816,861 | 816,862 | u966508131 | cpp |
p03001 | #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n';
typedef long long ll;
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int same = 0;
if (2 * x == W && 2 * y == H) {
same = 1;
}
double ans = H * W / 2;
cout << fixed;
cout << setprecision(8) << ans << ' ';
cout << same << endl;
return 0;
}
| #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n';
typedef long long ll;
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int same = 0;
if (2 * x == W && 2 * y == H) {
same = 1;
}
double ans = (double)H * W / 2;
cout << fixed;
cout << setprecision(8) << ans << ' ';
cout << same << endl;
return 0;
}
| [
"type_conversion.add"
] | 816,861 | 816,863 | u966508131 | cpp |
p03001 | #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n';
typedef long long ll;
using namespace std;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
int same = 0;
if (2 * x == W && 2 * y == H) {
same = 1;
}
double ans = x * y / 2.0;
cout << fixed;
cout << setprecision(8) << ans << ' ';
cout << same << endl;
return 0;
}
| #include <algorithm>
#include <cstdlib>
#include <iomanip> //小数点以下を表示させる(setprecision())
#include <iostream> //入出力
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define debug(x) \
cerr << x << " " \
<< "(L:" << __LINE__ << ")" << '\n';
typedef long long ll;
using namespace std;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
int same = 0;
if (2 * x == W && 2 * y == H) {
same = 1;
}
double ans = H * W / 2.0;
cout << fixed;
cout << setprecision(8) << ans << ' ';
cout << same << endl;
return 0;
}
| [
"identifier.change",
"expression.operation.binary.change"
] | 816,864 | 816,865 | u966508131 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, ans = 0;
cin >> a >> b >> c >> d;
if (c * 2 == a && d * 2 == b)
ans = 1;
cout << fixed << setprecision(10) << (a * b) / 2 << " " << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, d;
int ans = 0;
cin >> a >> b >> c >> d;
if (c * 2 == a && d * 2 == b)
ans = 1;
cout << fixed << setprecision(10) << (a * b) / 2 << " " << ans << endl;
} | [
"variable_declaration.type.primitive.change"
] | 816,869 | 816,870 | u183479807 | cpp |
p03001 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
long long W, H;
cin >> W >> H;
long long x, y;
cin >> x >> y;
cout << fixed << setprecision(10) << H * W / 2 << " "
<< (y == H * 0.5 && x == W * 0.5 ? 1 : 0) << endl;
return 0;
} | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
long long W, H;
cin >> W >> H;
long long x, y;
cin >> x >> y;
cout << fixed << setprecision(10) << H * W * 0.5 << " "
<< (y == H * 0.5 && x == W * 0.5 ? 1 : 0) << endl;
return 0;
} | [] | 816,873 | 816,874 | u265881782 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h / 2;
if (x == w / 2.0 && y == h / 2.0)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
auto ans = w * h / 2;
if (x == w / 2 && y == h / 2)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
}
| [
"variable_declaration.type.primitive.change",
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 816,909 | 816,910 | u424602097 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h / 2;
if (x == w / 2.0 && y == h / 2.0)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
auto ans = w * h / 2;
if (x == w / 2 && y == h / 2.0)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
}
| [
"variable_declaration.type.primitive.change",
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 816,909 | 816,911 | u424602097 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h / 2;
if (x == w / 2.0 && y == h / 2.0)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
auto ans = w * h / 2;
if (x == w / 2.0 && y == h / 2.0)
cout << ans << " " << 1 << endl;
else
cout << ans << " " << 0 << endl;
}
| [
"variable_declaration.type.primitive.change"
] | 816,909 | 816,912 | u424602097 | cpp |
p03001 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#define mst(a, b) memset(a, b, sizeof(a))
#define repi(a, b) for (int i = a; i < b; i++)
#define repj(a, b) for (int j = a; j < b; j++)
#define pii pair<int, int>
#ifdef LOCAL
#define fre() freopen("in.txt", "r", stdin)
#endif
#ifndef LOCAL
#define fre()
#endif
// static int x = []() {
// std::ios::sync_with_stdio(false);
// std::cin.tie(NULL);
// return 0;
//}();
#define FASTIO
#ifdef FASTIO
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
//#define scanf abcabc
//#define printf abcabc
#endif
//#ifndef FASTIO
//#define cin abcabc
//#define cout abcabc
//#endif
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double mw = w / 2, mh = h / 2, f = 0, ans = w * h / 2.0;
if (x == mw && y == mh)
f = 1;
cout << ans << " " << f << endl;
return 0;
} | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#define mst(a, b) memset(a, b, sizeof(a))
#define repi(a, b) for (int i = a; i < b; i++)
#define repj(a, b) for (int j = a; j < b; j++)
#define pii pair<int, int>
#ifdef LOCAL
#define fre() freopen("in.txt", "r", stdin)
#endif
#ifndef LOCAL
#define fre()
#endif
// static int x = []() {
// std::ios::sync_with_stdio(false);
// std::cin.tie(NULL);
// return 0;
//}();
#define FASTIO
#ifdef FASTIO
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
//#define scanf abcabc
//#define printf abcabc
#endif
//#ifndef FASTIO
//#define cin abcabc
//#define cout abcabc
//#endif
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
using namespace std;
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
double mw = w / 2.0, mh = h / 2.0, f = 0, ans = w * h / 2.0;
if (x == mw && y == mh)
f = 1;
cout << ans << " " << f << endl;
return 0;
} | [
"variable_declaration.type.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,915 | 816,914 | u401146093 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.