Datasets:

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 <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define eps 1e-9 using namespace std; const int MAXN = 1e5 + 3; const int INF = 0x3f3f3f3f; const int MOD = 1e9 + 7; int arr[MAXN]; signed main() { double w, h; scanf("%lf%lf", &w, &h); double x, y; scanf("%lf%lf", &x, &y); int midx = w / 2.0, midy = h / 2.0; printf("%f", w * h / 2.0); if (fabs(x - midx) < eps && fabs(y - midy) < eps) puts(" 1"); else puts(" 0"); return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define eps 1e-9 using namespace std; const int MAXN = 1e5 + 3; const int INF = 0x3f3f3f3f; const int MOD = 1e9 + 7; int arr[MAXN]; signed main() { double w, h; scanf("%lf%lf", &w, &h); double x, y; scanf("%lf%lf", &x, &y); double midx = w / 2.0, midy = h / 2.0; printf("%f", w * h / 2.0); if (fabs(x - midx) < eps && fabs(y - midy) < eps) puts(" 1"); else puts(" 0"); return 0; }
[ "variable_declaration.type.primitive.change" ]
817,455
817,456
u050253575
cpp
p03001
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define eps 1e-9 using namespace std; const int MAXN = 1e5 + 3; const int INF = 0x3f3f3f3f; const int MOD = 1e9 + 7; int arr[MAXN]; signed main() { double w, h; scanf("%lf%lf", &w, &h); double x, y; scanf("%lf%lf", &x, &y); int midx = w / 2.0, midy = h / 2.0; printf("%.6f", w * h / 2.0); if (fabs(x - midx) <= eps && fabs(y - midy) <= eps) puts(" 1"); else puts(" 0"); return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define eps 1e-9 using namespace std; const int MAXN = 1e5 + 3; const int INF = 0x3f3f3f3f; const int MOD = 1e9 + 7; int arr[MAXN]; signed main() { double w, h; scanf("%lf%lf", &w, &h); double x, y; scanf("%lf%lf", &x, &y); double midx = w / 2.0, midy = h / 2.0; printf("%f", w * h / 2.0); if (fabs(x - midx) < eps && fabs(y - midy) < eps) puts(" 1"); else puts(" 0"); return 0; }
[ "variable_declaration.type.primitive.change", "literal.string.change", "call.arguments.change", "io.output.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
817,457
817,456
u050253575
cpp
p03001
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <utility> #include <vector> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; double ans; ans = (double)w * h / 2.0; printf("%.9f", ans); if (x == (w / 2) && y == (h / 2)) cout << " 1" << endl; else cout << " 0" << endl; return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <utility> #include <vector> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; double ans; ans = (double)w * h / 2.0; printf("%.9f", ans); 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" ]
817,468
817,469
u902428263
cpp
p03001
#include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <math.h> #include <numeric> #include <queue> #include <stdio.h> #include <string> #include <vector> #define MOD 1000000007 int i, j, k; struct edge { int to; int cost; }; typedef long long ll; using namespace std; using P = pair<int, int>; bool compare_by_b(pair<int, pair<string, int>> a, pair<int, pair<string, int>> b) { if (a.second.first != b.second.first) { return a.second.first < b.second.first; } else { return a.second.second > b.second.second; } } int main(void) { ll w, h; cin >> w >> h; ll x, y; cin >> x >> y; printf("%.6f %d\n", (double)(w * h / 2), (int)(x + x == w && y + y == h)); // cout << (double)(w*h/2) << (int)(x+x==w&&y+y==h) <<endl; return 0; }
#include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <math.h> #include <numeric> #include <queue> #include <stdio.h> #include <string> #include <vector> #define MOD 1000000007 int i, j, k; struct edge { int to; int cost; }; typedef long long ll; using namespace std; using P = pair<int, int>; bool compare_by_b(pair<int, pair<string, int>> a, pair<int, pair<string, int>> b) { if (a.second.first != b.second.first) { return a.second.first < b.second.first; } else { return a.second.second > b.second.second; } } int main(void) { ll w, h; cin >> w >> h; ll x, y; cin >> x >> y; printf("%.6lf %d\n", ((double)(w * h)) / 2.0, (int)(x + x == w && y + y == h)); // cout << (double)(w*h/2) << (int)(x+x==w&&y+y==h) <<endl; return 0; }
[ "literal.string.change", "call.arguments.change", "io.output.change", "expression.operation.binary.remove" ]
817,476
817,477
u753265117
cpp
p03001
#include <algorithm> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { long w, h, x, y; double answer; cin >> w >> h >> x >> y; answer = w * h / 2; if ((double(w) / 2 == double(x)) && (double(h) / 2 == double(y))) { cout << setprecision(10) << answer << " " << 1 << endl; } else { cout << setprecision(10) << answer << " " << 0 << endl; } return 0; }
#include <algorithm> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { long w, h, x, y; double answer; cin >> w >> h >> x >> y; answer = double(w * h) / 2; if ((double(w) / 2 == double(x)) && (double(h) / 2 == double(y))) { cout << setprecision(10) << answer << " " << 1 << endl; } else { cout << setprecision(10) << answer << " " << 0 << endl; } return 0; }
[ "call.add", "call.arguments.change" ]
817,480
817,481
u509936198
cpp
p03001
/* digu_J - Digvijay Janartha NIT Hamirpur - INDIA */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typename T> using MinPriorityQueue = priority_queue<T, vector<T>, greater<T>>; #ifndef ONLINE_JUDGE #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cout << name << " : " << arg1 << std ::endl; } template <typename Arg1, typename... Args> void __f(const char *names, Arg1 &&arg1, Args &&...args) { const char *comma = strchr(names + 1, ','); int len = comma - names; for (int i = 0; i < len; ++i) { cout << names[i]; } cout << " : " << arg1 << " | "; __f(comma + 1, args...); } #else #define trace(...) #endif typedef double db; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<ll, ll> pll; typedef pair<int, int> pii; typedef vector<ll> vll; typedef vector<int> vi; #define eb emplace_back #define pb push_back #define F first #define S second #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define unique_sort(x) \ (sort(x.begin(), x.end()), \ x.resize(distance(x.begin(), unique(x.begin(), x.end())))) #define fast_io() \ ios_base ::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) const ll LINF = LLONG_MAX, base = 1e9, MOD = 1e9 + 7, N = 1e5 + 5, M = 1e3 + 5; const int INF = INT_MAX; const db PI = acos(-1); void test(); int main() { fast_io(); cout << fixed << setprecision(15); test(); return 0; } void test() { ll a, b, x, y; cin >> a >> b >> x >> y; cout << db((a * b) / 2) << " " << ((!(a & 1) and x == a / 2) and (!(b & 1) and y == b / 2) ? 1 : 0) << "\n"; }
/* digu_J - Digvijay Janartha NIT Hamirpur - INDIA */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typename T> using MinPriorityQueue = priority_queue<T, vector<T>, greater<T>>; #ifndef ONLINE_JUDGE #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cout << name << " : " << arg1 << std ::endl; } template <typename Arg1, typename... Args> void __f(const char *names, Arg1 &&arg1, Args &&...args) { const char *comma = strchr(names + 1, ','); int len = comma - names; for (int i = 0; i < len; ++i) { cout << names[i]; } cout << " : " << arg1 << " | "; __f(comma + 1, args...); } #else #define trace(...) #endif typedef double db; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<ll, ll> pll; typedef pair<int, int> pii; typedef vector<ll> vll; typedef vector<int> vi; #define eb emplace_back #define pb push_back #define F first #define S second #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define unique_sort(x) \ (sort(x.begin(), x.end()), \ x.resize(distance(x.begin(), unique(x.begin(), x.end())))) #define fast_io() \ ios_base ::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) const ll LINF = LLONG_MAX, base = 1e9, MOD = 1e9 + 7, N = 1e5 + 5, M = 1e3 + 5; const int INF = INT_MAX; const db PI = acos(-1); void test(); int main() { fast_io(); cout << fixed << setprecision(15); test(); return 0; } void test() { ll a, b, x, y; cin >> a >> b >> x >> y; cout << db((a * b) / db(2)) << " " << ((!(a & 1) and x == a / 2) and (!(b & 1) and y == b / 2) ? 1 : 0) << "\n"; }
[ "call.add", "call.arguments.change" ]
817,482
817,483
u887604715
cpp
p03001
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); cout << setprecision(20) << fixed; ll W, H, X, Y; cin >> W >> H >> X >> Y; long double area = (W * H) / 2; int ans = (2 * X == W && 2 * Y == H); cout << area << ' ' << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); cout << setprecision(20) << fixed; ll W, H, X, Y; cin >> W >> H >> X >> Y; long double area = (W * H) / 2.0; int ans = (2 * X == W && 2 * Y == H); cout << area << ' ' << ans << endl; return 0; }
[ "literal.number.change", "expression.operation.binary.change" ]
817,486
817,487
u242534780
cpp
p03001
/** * Dont raise your voice, improve your argument. * --Desmond Tutu */ #include <bits/stdc++.h> using namespace std; /* see https://github.com/pllk/cphb/ */ #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; typedef unsigned int uint; typedef long long ll; // typedef __int128 lll; #define fori(n) for (ll i = 0; i < (n); i++) #define forn(i, n) for (ll i = 0; i < (n); i++) #define forn3(i, x, n) for (ll i = (x); i < (n); i++) int main() { cin.tie(nullptr); std::ios::sync_with_stdio(false); int w, h, x, y; cin >> w >> h >> x >> y; double area = (1LL * w * h) / 2; bool mult = (x * 2 == w) && (y * 2 == h); cout << area << " " << (mult ? 1 : 0) << endl; }
/** * Dont raise your voice, improve your argument. * --Desmond Tutu */ #include <bits/stdc++.h> using namespace std; /* see https://github.com/pllk/cphb/ */ #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; typedef unsigned int uint; typedef long long ll; // typedef __int128 lll; #define fori(n) for (ll i = 0; i < (n); i++) #define forn(i, n) for (ll i = 0; i < (n); i++) #define forn3(i, x, n) for (ll i = (x); i < (n); i++) int main() { cin.tie(nullptr); std::ios::sync_with_stdio(false); int w, h, x, y; cin >> w >> h >> x >> y; double area = (1LL * w * h) / 2.0; bool mult = (x * 2 == w) && (y * 2 == h); cout << area << " " << (mult ? 1 : 0) << endl; }
[ "literal.number.change", "expression.operation.binary.change" ]
817,493
817,494
u014617387
cpp
p03001
#include <cstdio> using ll = long long; int main() { ll w, h, x, y; scanf("%lld%lld%lld%lld", &w, &h, &x, &y); printf("%lld %d\n", w * h / 2, ((x * 2 == w) && (y * 2 == h)) ? 1 : 0); return 0; }
#include <cstdio> using ll = long long; int main() { ll w, h, x, y; scanf("%lld%lld%lld%lld", &w, &h, &x, &y); printf("%.10lf %d\n", (double)w * h / 2, ((x * 2 == w) && (y * 2 == h)) ? 1 : 0); return 0; }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
817,497
817,498
u350561621
cpp
p03001
#include <bits/stdc++.h> #define ALL(v) (v).begin(), (v).end() #define rep(i, n) for (ll i = 0, __##i##_length = (n); i < __##i##_length; i++) #define rep_reverse(i, n) for (ll i = (n)-1; 0 <= i; i--) #define FOR(i, from, to) \ for (ll i = (from), __##i##_end = (to); i < __##i##_end; i++) #define FOR_REVERSE(i, from, to) \ for (ll i = (to)-1, __##i##_end = (from); __##i##_end <= i; i--) #define foreach(e, v) for (const auto e : (v)) #define vfree(v) std::vector<int>().swap(v) #define DEBUG(x) cout << #x << " = " << (x) << endl using namespace std; typedef int64_t ll; typedef vector<ll> llv; typedef vector<llv> llvv; int main() { ll W, H, X, Y; cin >> W >> H >> X >> Y; if (X * 2 == W && H * 2 == H) { cout << fixed << setprecision(10) << (W * H) / 2.0 << " " << 1 << endl; return 0; } cout << fixed << setprecision(10) << (W * H) / 2.0 << " " << 0 << endl; return 0; }
#include <bits/stdc++.h> #define ALL(v) (v).begin(), (v).end() #define rep(i, n) for (ll i = 0, __##i##_length = (n); i < __##i##_length; i++) #define rep_reverse(i, n) for (ll i = (n)-1; 0 <= i; i--) #define FOR(i, from, to) \ for (ll i = (from), __##i##_end = (to); i < __##i##_end; i++) #define FOR_REVERSE(i, from, to) \ for (ll i = (to)-1, __##i##_end = (from); __##i##_end <= i; i--) #define foreach(e, v) for (const auto e : (v)) #define vfree(v) std::vector<int>().swap(v) #define DEBUG(x) cout << #x << " = " << (x) << endl using namespace std; typedef int64_t ll; typedef vector<ll> llv; typedef vector<llv> llvv; int main() { ll W, H, X, Y; cin >> W >> H >> X >> Y; if (X * 2 == W && Y * 2 == H) { cout << fixed << setprecision(10) << (W * H) / 2.0 << " " << 1 << endl; return 0; } cout << fixed << setprecision(10) << (W * H) / 2.0 << " " << 0 << endl; return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
817,506
817,507
u040599127
cpp
p03001
/*{{{*/ #include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vl vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> // pll pp; -> (pp.first,pp.second) // vector<vl> pp(n,vl(2)); sort(pp.begin(),pp.end(),[](vl a,vl b){return // a[0]<b[0];}); #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define RREP(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--) #define FOR(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) #define FORR(i, a, b) for (ll(i) = (b)-1; (i) >= (a); (i)--) #define DEBUG(x) cout << #x << ": " << x << endl #define CHMAX(a, b) a = max((a), (b)) #define CHMIN(a, b) a = min((a), (b)) /*}}}*/ int main() { ll w, h, x, y; cin >> w >> h >> x >> y; double ans = (double)w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
/*{{{*/ #include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vl vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> // pll pp; -> (pp.first,pp.second) // vector<vl> pp(n,vl(2)); sort(pp.begin(),pp.end(),[](vl a,vl b){return // a[0]<b[0];}); #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define RREP(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--) #define FOR(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) #define FORR(i, a, b) for (ll(i) = (b)-1; (i) >= (a); (i)--) #define DEBUG(x) cout << #x << ": " << x << endl #define CHMAX(a, b) a = max((a), (b)) #define CHMIN(a, b) a = min((a), (b)) /*}}}*/ int main() { double w, h, x, y; cin >> w >> h >> x >> y; double ans = w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
[ "variable_declaration.type.change" ]
817,510
817,511
u088893297
cpp
p03001
/*{{{*/ #include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vl vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> // pll pp; -> (pp.first,pp.second) // vector<vl> pp(n,vl(2)); sort(pp.begin(),pp.end(),[](vl a,vl b){return // a[0]<b[0];}); #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define RREP(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--) #define FOR(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) #define FORR(i, a, b) for (ll(i) = (b)-1; (i) >= (a); (i)--) #define DEBUG(x) cout << #x << ": " << x << endl #define CHMAX(a, b) a = max((a), (b)) #define CHMIN(a, b) a = min((a), (b)) /*}}}*/ int main() { ll w, h, x, y; cin >> w >> h >> x >> y; double ans = w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
/*{{{*/ #include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vl vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> // pll pp; -> (pp.first,pp.second) // vector<vl> pp(n,vl(2)); sort(pp.begin(),pp.end(),[](vl a,vl b){return // a[0]<b[0];}); #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define RREP(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--) #define FOR(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) #define FORR(i, a, b) for (ll(i) = (b)-1; (i) >= (a); (i)--) #define DEBUG(x) cout << #x << ": " << x << endl #define CHMAX(a, b) a = max((a), (b)) #define CHMIN(a, b) a = min((a), (b)) /*}}}*/ int main() { double w, h, x, y; cin >> w >> h >> x >> y; double ans = w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
[ "variable_declaration.type.change" ]
817,512
817,511
u088893297
cpp
p03001
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup; template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &p) { os << p.first << " " << p.second; return os; } template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.first >> p.second; return is; } template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (int i = 0; i < (int)v.size(); i++) { os << v[i] << (i + 1 != v.size() ? " " : ""); } return os; } template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; } template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); } template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); } template <typename T = int64> vector<T> make_v(size_t a) { return vector<T>(a); } template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); } template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; } template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for (auto &e : t) fill_v(e, v); } int main() { int64 A, B, C, D; cin >> A >> B >> C >> D; bool f = false; if (C * 2 == A && D * 2 == B) f = true; cout << A * B / 2 << " " << f << endl; }
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup; template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &p) { os << p.first << " " << p.second; return os; } template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.first >> p.second; return is; } template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (int i = 0; i < (int)v.size(); i++) { os << v[i] << (i + 1 != v.size() ? " " : ""); } return os; } template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; } template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); } template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); } template <typename T = int64> vector<T> make_v(size_t a) { return vector<T>(a); } template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); } template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; } template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for (auto &e : t) fill_v(e, v); } int main() { int64 A, B, C, D; cin >> A >> B >> C >> D; bool f = false; if (C * 2 == A && D * 2 == B) f = true; cout << A * B / 2.0 << " " << f << endl; }
[ "literal.number.change", "io.output.change" ]
817,515
817,516
u524343822
cpp
p03001
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using ll = long long; using namespace std; using P = pair<ll, ll>; static ll imin = std::numeric_limits<ll>::min() / 10; static ll imax = std::numeric_limits<ll>::max() / 10; #define rep(i, n) for (ll i = 0; (i) < (n); ++(i)) #define rep1(i, n) for (ll i = 1; (i) < (n); ++(i)) #define rev_rep(i, n) for (ll i = (n)-1; (i) >= 0; --(i)) #define range(a, i, b) for (ll i = (a); (i) < (b); ++(i)) #ifdef LOCAL #define dump(x) cout << #x << ":" << (x) << "\n"; #endif #ifndef LOCAL #define dump(x) #endif #define all(v) v.begin(), v.end() #define readl(N) \ ll N; \ cin >> N; #define readlv(N, vec) \ vector<ll> vec(N); \ rep(i, N) { cin >> vec[i]; } #define greater_than [](ll l, ll r) { return l > r; } template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::map<T1, T2> &mp); template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::pair<T1, T2> &pair); template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> &vec); template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::pair<T1, T2> &pair) { os << '(' << pair.first << ',' << pair.second << ')'; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> &vec) { std::size_t n = vec.size(); if (n == 0) { return os; } os << " "; for (ll i = 0; i < n - 1; ++i) { os << vec[i] << " "; } os << vec[n - 1]; os << std::endl; return os; } template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::map<T1, T2> &mp) { std::size_t n = mp.size(); if (n == 0) { return os; } os << " "; for (auto &&x : mp) { os << x << " "; } os << std::endl; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::set<T> &mp) { std::size_t n = mp.size(); if (n == 0) { return os; } os << " "; for (auto &&x : mp) { os << x << " "; } os << std::endl; return os; } template <class T> inline bool chmin(T &a, T const b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T const b) { if (a < b) { a = b; return true; } return false; } ll fact(ll n) { ll res = 1; while (n > 0) { res *= n; n--; } return res; } ll pow(ll i, ll n) { ll res = 1; while (n >= 0) { res *= i; n--; } return res; } ll gcd(ll l, ll r) { if (l < r) { return gcd(r, l); } if (r == 0) { return l; } return gcd(r, l % r); } template <class T> vector<T> accum_sum(vector<T> const &a) { vector<T> b(a.size() + 1); b[0] = 0; rep(i, a.size()) { b[i + 1] = b[i] + a[i]; } return b; } class modint { public: using ll = long long; ll num; static const ll MOD = 1e9 + 7; static vector<modint> factorial; modint() : num(0){}; modint(ll _n) : num((_n + MOD) % MOD) {} modint(const modint &r) : num(r.num) {} operator ll() const { return (num + MOD) % MOD; } friend istream &operator>>(istream &is, modint &r) { ll num_; is >> num_; r = num_; return is; } modint operator+(const modint &r) const { return modint(num + r.num); } modint operator-(const modint &r) const { return modint(num - r.num); } modint operator*(const modint &r) const { return modint(num * r.num); } template <typename T> modint operator^(const T &r) const { if (r == 0) return 1; return (((*this) * (*this)) ^ (r / 2)) * modint(r & 1 ? num : 1); } modint operator/(const modint &r) const { return num * (r ^ (MOD - 2)); } modint operator+=(const modint &r) { return *this = *this + r; } modint operator-=(const modint &r) { return *this = *this - r; } modint operator*=(const modint &r) { return *this = *this * r; } modint operator/=(const modint &r) { return *this = *this / r; } template <typename T> modint operator^=(const T &r) { return *this = *this ^ r; } static modint fact(int n) { if ((int)factorial.size() <= n) factorial.resize(n + 1); if (factorial[n]) return factorial[n]; if (n == 0) return 1; return factorial[n] = modint(n) * fact(n - 1); } static modint com(modint n, modint r) { return n >= r ? fact(n) / (fact(n - r) * fact(r)) : modint(0); } }; vector<modint> modint::factorial; constexpr ll mod = 1e9 + 7; bool isprime(ll n) { if (n < 2) { return false; } range(2, i, sqrt(n) + 1) { if (n == i) { break; } if (n % i == 0) { return false; } } return true; } template <class ValueType> auto mkVec(ValueType init, size_t x) { return vector<ValueType>(x, init); } template <class ValueType, class... Ns> auto mkVec(ValueType init, size_t n, Ns... ns) { return vector<decltype(mkVec(init, ns...))>(n, mkVec(init, ns...)); } int main(int argc, char const *argv[]) { ll w, h, x, y; cin >> w >> h >> x >> y; if (x == w / 2 && y == h / 2) { cout << std::setprecision(10) << fixed << w * h / 2.0 << " " << 1 << endl; } else { cout << std::setprecision(10) << fixed << w * h / 2.0 << " " << 0 << endl; } }
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using ll = long long; using namespace std; using P = pair<ll, ll>; static ll imin = std::numeric_limits<ll>::min() / 10; static ll imax = std::numeric_limits<ll>::max() / 10; #define rep(i, n) for (ll i = 0; (i) < (n); ++(i)) #define rep1(i, n) for (ll i = 1; (i) < (n); ++(i)) #define rev_rep(i, n) for (ll i = (n)-1; (i) >= 0; --(i)) #define range(a, i, b) for (ll i = (a); (i) < (b); ++(i)) #ifdef LOCAL #define dump(x) cout << #x << ":" << (x) << "\n"; #endif #ifndef LOCAL #define dump(x) #endif #define all(v) v.begin(), v.end() #define readl(N) \ ll N; \ cin >> N; #define readlv(N, vec) \ vector<ll> vec(N); \ rep(i, N) { cin >> vec[i]; } #define greater_than [](ll l, ll r) { return l > r; } template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::map<T1, T2> &mp); template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::pair<T1, T2> &pair); template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> &vec); template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::pair<T1, T2> &pair) { os << '(' << pair.first << ',' << pair.second << ')'; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> &vec) { std::size_t n = vec.size(); if (n == 0) { return os; } os << " "; for (ll i = 0; i < n - 1; ++i) { os << vec[i] << " "; } os << vec[n - 1]; os << std::endl; return os; } template <class T1, class T2> std::ostream &operator<<(std::ostream &os, std::map<T1, T2> &mp) { std::size_t n = mp.size(); if (n == 0) { return os; } os << " "; for (auto &&x : mp) { os << x << " "; } os << std::endl; return os; } template <class T> std::ostream &operator<<(std::ostream &os, std::set<T> &mp) { std::size_t n = mp.size(); if (n == 0) { return os; } os << " "; for (auto &&x : mp) { os << x << " "; } os << std::endl; return os; } template <class T> inline bool chmin(T &a, T const b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T const b) { if (a < b) { a = b; return true; } return false; } ll fact(ll n) { ll res = 1; while (n > 0) { res *= n; n--; } return res; } ll pow(ll i, ll n) { ll res = 1; while (n >= 0) { res *= i; n--; } return res; } ll gcd(ll l, ll r) { if (l < r) { return gcd(r, l); } if (r == 0) { return l; } return gcd(r, l % r); } template <class T> vector<T> accum_sum(vector<T> const &a) { vector<T> b(a.size() + 1); b[0] = 0; rep(i, a.size()) { b[i + 1] = b[i] + a[i]; } return b; } class modint { public: using ll = long long; ll num; static const ll MOD = 1e9 + 7; static vector<modint> factorial; modint() : num(0){}; modint(ll _n) : num((_n + MOD) % MOD) {} modint(const modint &r) : num(r.num) {} operator ll() const { return (num + MOD) % MOD; } friend istream &operator>>(istream &is, modint &r) { ll num_; is >> num_; r = num_; return is; } modint operator+(const modint &r) const { return modint(num + r.num); } modint operator-(const modint &r) const { return modint(num - r.num); } modint operator*(const modint &r) const { return modint(num * r.num); } template <typename T> modint operator^(const T &r) const { if (r == 0) return 1; return (((*this) * (*this)) ^ (r / 2)) * modint(r & 1 ? num : 1); } modint operator/(const modint &r) const { return num * (r ^ (MOD - 2)); } modint operator+=(const modint &r) { return *this = *this + r; } modint operator-=(const modint &r) { return *this = *this - r; } modint operator*=(const modint &r) { return *this = *this * r; } modint operator/=(const modint &r) { return *this = *this / r; } template <typename T> modint operator^=(const T &r) { return *this = *this ^ r; } static modint fact(int n) { if ((int)factorial.size() <= n) factorial.resize(n + 1); if (factorial[n]) return factorial[n]; if (n == 0) return 1; return factorial[n] = modint(n) * fact(n - 1); } static modint com(modint n, modint r) { return n >= r ? fact(n) / (fact(n - r) * fact(r)) : modint(0); } }; vector<modint> modint::factorial; constexpr ll mod = 1e9 + 7; bool isprime(ll n) { if (n < 2) { return false; } range(2, i, sqrt(n) + 1) { if (n == i) { break; } if (n % i == 0) { return false; } } return true; } template <class ValueType> auto mkVec(ValueType init, size_t x) { return vector<ValueType>(x, init); } template <class ValueType, class... Ns> auto mkVec(ValueType init, size_t n, Ns... ns) { return vector<decltype(mkVec(init, ns...))>(n, mkVec(init, ns...)); } int main(int argc, char const *argv[]) { long double w, h, x, y; cin >> w >> h >> x >> y; if (x == w / 2 && y == h / 2) { cout << std::setprecision(10) << fixed << w * h / 2.0 << " " << 1 << endl; } else { cout << std::setprecision(10) << fixed << w * h / 2.0 << " " << 0 << endl; } }
[ "variable_declaration.type.widen.change" ]
817,519
817,520
u068362919
cpp
p03001
#include <iostream> using namespace std; int main(void) { double W, H; double x, y; cin >> W >> H >> x >> y; double ans2 = 0; double ans1 = 0; ans1 = W * H / 2; if (W / 2 == x || H / 2 == y) { ans2 = 1; } cout << ans1 << " " << ans2 << endl; }
#include <iostream> using namespace std; int main(void) { double W, H; double x, y; cin >> W >> H >> x >> y; double ans2 = 0; double ans1 = 0; ans1 = W * H / 2; if (W / 2 == x && H / 2 == y) { ans2 = 1; } cout << ans1 << " " << ans2 << endl; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
817,529
817,530
u945452839
cpp
p03001
#include <iostream> using namespace std; int main(void) { double W, H; long long x, y; cin >> W >> H >> x >> y; double ans2 = 0; float ans1 = 0; ans1 = W * H / 2; if (W / 2 == x || H / 2 == y) { ans2 = 1; } cout << ans1 << " " << ans2 << endl; }
#include <iostream> using namespace std; int main(void) { double W, H; double x, y; cin >> W >> H >> x >> y; double ans2 = 0; double ans1 = 0; ans1 = W * H / 2; if (W / 2 == x && H / 2 == y) { ans2 = 1; } cout << ans1 << " " << ans2 << endl; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.narrow.change", "misc.opposites", "control_flow.branch.if.condition.change" ]
817,531
817,530
u945452839
cpp
p03001
#include <bits/stdc++.h> using namespace std; using LL = long long; using VI = vector<LL>; using VVI = vector<VI>; using VB = vector<bool>; using VS = vector<string>; using PII = pair<LL, LL>; using VP = vector<PII>; #define PB push_back #define MP make_pair #define SZ(a) LL((a).size()) #define EACH(x, c) for (auto x : (c)) #define ALL(c) (c).begin(), (c).end() #define REVERSE(c) reverse(ALL(c)) #define SORT(c) stable_sort(ALL(c)) #define RSORT(c) stable_sort((c).rbegin(), (c).rend()) #define FSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.first < y.first; }); #define FRSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.first > y.first; }); #define SSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.second < y.second; }); #define SRSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.second > y.second; }); #define FOR(i, a, b) for (LL i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define $(x) \ { cout << #x << " = " << (x) << endl; } int main() { LL W, H, x, y; cin >> W >> H >> x >> y; LL a = (double)W * H / 2; LL multiple = 0; if (W % 2 == 0 && W / 2 == x && H % 2 == 0 && H / 2 == y) multiple = 1; cout << fixed << setprecision(12) << a << " " << multiple << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using LL = long long; using VI = vector<LL>; using VVI = vector<VI>; using VB = vector<bool>; using VS = vector<string>; using PII = pair<LL, LL>; using VP = vector<PII>; #define PB push_back #define MP make_pair #define SZ(a) LL((a).size()) #define EACH(x, c) for (auto x : (c)) #define ALL(c) (c).begin(), (c).end() #define REVERSE(c) reverse(ALL(c)) #define SORT(c) stable_sort(ALL(c)) #define RSORT(c) stable_sort((c).rbegin(), (c).rend()) #define FSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.first < y.first; }); #define FRSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.first > y.first; }); #define SSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.second < y.second; }); #define SRSORT(c) \ stable_sort(ALL(c), [](auto &x, auto &y) { return x.second > y.second; }); #define FOR(i, a, b) for (LL i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define $(x) \ { cout << #x << " = " << (x) << endl; } int main() { LL W, H, x, y; cin >> W >> H >> x >> y; double a = (double)W * H / 2; LL multiple = 0; if (W % 2 == 0 && W / 2 == x && H % 2 == 0 && H / 2 == y) multiple = 1; cout << fixed << setprecision(12) << a << " " << multiple << endl; return 0; }
[ "variable_declaration.type.change" ]
817,534
817,535
u816800341
cpp
p03001
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int W, H, x, y; cin >> W >> H >> x >> y; double ans = W * H / 2; if (x == W / 2 && y == H / 2) cout << ans << " " << 1; else cout << ans << " " << 0; }
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; double ans = W * H / 2; if (x == W / 2 && y == H / 2) cout << ans << " " << 1; else cout << ans << " " << 0; }
[ "variable_declaration.type.primitive.change" ]
817,542
817,543
u582357587
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define mp make_pair #define F first #define S second #define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define SORT(c) sort((c).begin(), (c).end()) #define ve vector #define vi vector<int> #define vp vector<pair<int, int>> #define vvi vector<vector<int>> typedef long long ll; const ll INF = LLONG_MAX - 100; const ll mod = 1e9 + 7; const int MAX_N = 2e5 + 5; int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1}; vector<ll> prime; int fac[MAX_N], inv[MAX_N]; template <class T = ll> T in() { T x; cin >> x; return (x); } void DEBUG(vector<int> a) { for (int i = 0; i < a.size(); i++) cout << a[i] << " "; cout << endl; } ll GCD(ll a, ll b) { ll c; while (b != 0) { c = a % b; a = b; b = c; } return a; } ll LCM(ll a, ll b) { return a * b / GCD(a, b); } ll POW(ll a, ll b, bool usemod = true) { ll c = 1LL; while (b > 0) { if (b & 1LL) { if (!usemod) c *= a; else c = a * c % mod; } if (!usemod) a *= a; else a = a * a % mod; b >>= 1LL; } return c; } void _nCr() { fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) { fac[i] = fac[i - 1LL] * i % mod; } for (int i = 0; i < MAX_N; i++) { inv[i] = POW(fac[i], mod - 2); } } ll nCr(ll n, ll r) { return (fac[n] * inv[r] % mod) * inv[n - r] % mod; } void PRI(ll n) { bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) { a[i] = 1LL; } for (int i = 2; i < n + 1LL; i++) { if (a[i]) { prime.pb(i); ll b = i; while (b <= n) { a[b] = 0; b += i; } } } } template <typename T> T chmin(T &a, T b) { if (a > b) a = b; return a; } template <typename T> T chmax(T &a, T b) { if (a < b) a = b; return b; } bool solve() { int w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(6) << (float)w * (float)h / 2 << endl; if (x * 2 == w && y * 2 == h) cout << 1 << endl; else cout << 0 << endl; } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define mp make_pair #define F first #define S second #define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define SORT(c) sort((c).begin(), (c).end()) #define ve vector #define vi vector<int> #define vp vector<pair<int, int>> #define vvi vector<vector<int>> typedef long long ll; const ll INF = LLONG_MAX - 100; const ll mod = 1e9 + 7; const int MAX_N = 2e5 + 5; int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1}; vector<ll> prime; int fac[MAX_N], inv[MAX_N]; template <class T = ll> T in() { T x; cin >> x; return (x); } void DEBUG(vector<int> a) { for (int i = 0; i < a.size(); i++) cout << a[i] << " "; cout << endl; } ll GCD(ll a, ll b) { ll c; while (b != 0) { c = a % b; a = b; b = c; } return a; } ll LCM(ll a, ll b) { return a * b / GCD(a, b); } ll POW(ll a, ll b, bool usemod = true) { ll c = 1LL; while (b > 0) { if (b & 1LL) { if (!usemod) c *= a; else c = a * c % mod; } if (!usemod) a *= a; else a = a * a % mod; b >>= 1LL; } return c; } void _nCr() { fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) { fac[i] = fac[i - 1LL] * i % mod; } for (int i = 0; i < MAX_N; i++) { inv[i] = POW(fac[i], mod - 2); } } ll nCr(ll n, ll r) { return (fac[n] * inv[r] % mod) * inv[n - r] % mod; } void PRI(ll n) { bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) { a[i] = 1LL; } for (int i = 2; i < n + 1LL; i++) { if (a[i]) { prime.pb(i); ll b = i; while (b <= n) { a[b] = 0; b += i; } } } } template <typename T> T chmin(T &a, T b) { if (a > b) a = b; return a; } template <typename T> T chmax(T &a, T b) { if (a < b) a = b; return b; } bool solve() { int w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(10) << (double)w * (double)h / 2 << " "; if (x * 2 == w && y * 2 == h) cout << 1 << endl; else cout << 0 << endl; } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
[ "literal.number.change", "io.output.change" ]
817,546
817,545
u764234894
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define mp make_pair #define F first #define S second #define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define SORT(c) sort((c).begin(), (c).end()) #define ve vector #define vi vector<int> #define vp vector<pair<int, int>> #define vvi vector<vector<int>> typedef long long ll; const ll INF = LLONG_MAX - 100; const ll mod = 1e9 + 7; const int MAX_N = 2e5 + 5; int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1}; vector<ll> prime; int fac[MAX_N], inv[MAX_N]; template <class T = ll> T in() { T x; cin >> x; return (x); } void DEBUG(vector<int> a) { for (int i = 0; i < a.size(); i++) cout << a[i] << " "; cout << endl; } ll GCD(ll a, ll b) { ll c; while (b != 0) { c = a % b; a = b; b = c; } return a; } ll LCM(ll a, ll b) { return a * b / GCD(a, b); } ll POW(ll a, ll b, bool usemod = true) { ll c = 1LL; while (b > 0) { if (b & 1LL) { if (!usemod) c *= a; else c = a * c % mod; } if (!usemod) a *= a; else a = a * a % mod; b >>= 1LL; } return c; } void _nCr() { fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) { fac[i] = fac[i - 1LL] * i % mod; } for (int i = 0; i < MAX_N; i++) { inv[i] = POW(fac[i], mod - 2); } } ll nCr(ll n, ll r) { return (fac[n] * inv[r] % mod) * inv[n - r] % mod; } void PRI(ll n) { bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) { a[i] = 1LL; } for (int i = 2; i < n + 1LL; i++) { if (a[i]) { prime.pb(i); ll b = i; while (b <= n) { a[b] = 0; b += i; } } } } template <typename T> T chmin(T &a, T b) { if (a > b) a = b; return a; } template <typename T> T chmax(T &a, T b) { if (a < b) a = b; return b; } bool solve() { int w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(10) << (float)w * (float)h / 2 << endl; if (x * 2 == w && y * 2 == h) cout << 1 << endl; else cout << 0 << endl; } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define mp make_pair #define F first #define S second #define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++) #define REP(i, n) FOR(i, 0, n) #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define SORT(c) sort((c).begin(), (c).end()) #define ve vector #define vi vector<int> #define vp vector<pair<int, int>> #define vvi vector<vector<int>> typedef long long ll; const ll INF = LLONG_MAX - 100; const ll mod = 1e9 + 7; const int MAX_N = 2e5 + 5; int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1}; vector<ll> prime; int fac[MAX_N], inv[MAX_N]; template <class T = ll> T in() { T x; cin >> x; return (x); } void DEBUG(vector<int> a) { for (int i = 0; i < a.size(); i++) cout << a[i] << " "; cout << endl; } ll GCD(ll a, ll b) { ll c; while (b != 0) { c = a % b; a = b; b = c; } return a; } ll LCM(ll a, ll b) { return a * b / GCD(a, b); } ll POW(ll a, ll b, bool usemod = true) { ll c = 1LL; while (b > 0) { if (b & 1LL) { if (!usemod) c *= a; else c = a * c % mod; } if (!usemod) a *= a; else a = a * a % mod; b >>= 1LL; } return c; } void _nCr() { fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) { fac[i] = fac[i - 1LL] * i % mod; } for (int i = 0; i < MAX_N; i++) { inv[i] = POW(fac[i], mod - 2); } } ll nCr(ll n, ll r) { return (fac[n] * inv[r] % mod) * inv[n - r] % mod; } void PRI(ll n) { bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) { a[i] = 1LL; } for (int i = 2; i < n + 1LL; i++) { if (a[i]) { prime.pb(i); ll b = i; while (b <= n) { a[b] = 0; b += i; } } } } template <typename T> T chmin(T &a, T b) { if (a > b) a = b; return a; } template <typename T> T chmax(T &a, T b) { if (a < b) a = b; return b; } bool solve() { int w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(10) << (double)w * (double)h / 2 << " "; if (x * 2 == w && y * 2 == h) cout << 1 << endl; else cout << 0 << endl; } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
[ "io.output.change" ]
817,547
817,545
u764234894
cpp
p03001
#include "bits/stdc++.h" int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int64_t W, H, x, y; std::cin >> W >> H >> x >> y; long double ans = W * H / 2; bool exist = W == x * 2 && H == y * 2; std::cout << std::fixed << std::setprecision(10) << ans << " " << exist << std::endl; }
#include "bits/stdc++.h" int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int64_t W, H, x, y; std::cin >> W >> H >> x >> y; long double ans = W * H / 2.0l; bool exist = W == x * 2 && H == y * 2; std::cout << std::fixed << std::setprecision(10) << ans << " " << exist << std::endl; }
[ "literal.number.change", "expression.operation.binary.change" ]
817,550
817,551
u264304509
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { cout << fixed << setprecision(12); ll w, h, x, y; cin >> w >> h >> x >> y; ll ans; ans = w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } }
#include <bits/stdc++.h> using namespace std; #define ll double int main() { cout << fixed << setprecision(12); ll w, h, x, y; cin >> w >> h >> x >> y; ll ans; ans = w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } }
[ "preprocessor.define.value.change" ]
817,559
817,560
u794565416
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { cout << fixed << setprecision(10); ll w, h, x, y; cin >> w >> h >> x >> y; ll ans; ans = w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } }
#include <bits/stdc++.h> using namespace std; #define ll double int main() { cout << fixed << setprecision(12); ll w, h, x, y; cin >> w >> h >> x >> y; ll ans; ans = w * h / 2; cout << ans << " "; if (x == w / 2 && y == h / 2) { cout << 1 << endl; } else { cout << 0 << endl; } }
[ "preprocessor.define.value.change", "literal.number.change", "io.output.change" ]
817,561
817,560
u794565416
cpp
p03001
#include <algorithm> #include <iostream> #include <numeric> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { int W, H, x, y; cin >> W >> H >> x >> y; int res2 = 0; if (W / 2 == x && H / 2 == y) { res2 = 1; } float res1 = W * H / 2; cout << res1 << " " << res2 << endl; }
#include <algorithm> #include <iostream> #include <numeric> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; int res2 = 0; if (W / 2 == x && H / 2 == y) { res2 = 1; } double res1 = W * H / 2; cout << res1 << " " << res2 << endl; }
[ "variable_declaration.type.primitive.change" ]
817,584
817,583
u134857688
cpp
p03001
#include <algorithm> #include <iostream> #include <numeric> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { int W, H, x, y; cin >> W >> H >> x >> y; int res2 = 0; if (W / 2 == x && H / 2 == y) { res2 = 1; } double res1 = W * H / 2; cout << res1 << " " << res2 << endl; }
#include <algorithm> #include <iostream> #include <numeric> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; int res2 = 0; if (W / 2 == x && H / 2 == y) { res2 = 1; } double res1 = W * H / 2; cout << res1 << " " << res2 << endl; }
[ "variable_declaration.type.primitive.change" ]
817,585
817,583
u134857688
cpp
p03001
#include <algorithm> #include <iostream> #include <numeric> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { int W, H, x, y; cin >> W >> H >> x >> y; int res2 = 0; if (W / 2 == x && H / 2 == y) { res2 = 1; } int res1 = W * H / 2; cout << res1 << " " << res2 << endl; }
#include <algorithm> #include <iostream> #include <numeric> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; int res2 = 0; if (W / 2 == x && H / 2 == y) { res2 = 1; } double res1 = W * H / 2; cout << res1 << " " << res2 << endl; }
[ "variable_declaration.type.primitive.change" ]
817,586
817,583
u134857688
cpp
p03001
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; int a; a = (w * h) / 2; int b = 0; if (x == w / 2 && y == h / 2) { b = 1; } cout << a << " " << b << endl; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { double w, h, x, y; cin >> w >> h >> x >> y; double a; a = (w * h) / 2; int b = 0; if (x == w / 2 && y == h / 2) { b = 1; } cout << a << " " << b << endl; }
[ "variable_declaration.type.primitive.change" ]
817,605
817,606
u656568465
cpp
p03001
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; double W, H, x, y; int main() { cin >> W >> H >> x >> y; if (H > W) { swap(W, H); swap(x, y); } if (x > W / 2) x = W - x; if (y > H / 2) y = H - y; double S = W * H / 2; bool single_sol = x * 2 == W || y * 2 == H; cout << S << " " << (!single_sol) << endl; return 0; }
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; double W, H, x, y; int main() { cin >> W >> H >> x >> y; if (H > W) { swap(W, H); swap(x, y); } if (x > W / 2) x = W - x; if (y > H / 2) y = H - y; double S = W * H / 2; bool single_sol = x * 2 != W || y * 2 != H; cout << S << " " << (!single_sol) << endl; return 0; }
[ "misc.opposites", "expression.operator.compare.change", "expression.operation.binary.change" ]
817,607
817,608
u379710681
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { int W, H, x, y; cin >> W >> H >> x >> y; int p; if (x == W / 2 && y == H / 2) p = 1; else p = 0; cout << W * H / 2 << " " << p << endl; }
#include <bits/stdc++.h> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; int p; if ((x == W / 2) && (y == H / 2)) p = 1; else p = 0; cout << W * H / 2 << " " << p << endl; }
[ "variable_declaration.type.primitive.change", "control_flow.branch.if.condition.change" ]
817,648
817,649
u013203292
cpp
p03001
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' int main() { std::ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(10); ll c = 1; if (w % 2 == 0) { if (x == (w / 2)) { c = 0; } } if (h % 2 == 0) { if (y == (h / 2)) { c = 0; } } if (x == 0 and y == 0) c = 0; if (x == w and y == h) c = 0; if (((w * 1.0) / h) == ((x * 1.0) / h)) c = 0; if ((-(w * 1.0) / h) == (((x * 1.0) - w) / h)) c = 0; if (h % 2 == 0 and w % 2 == 0) { if (x == (w / 2) and y == (h / 2)) c = 1; } cout << (w * h * 1.0) / 2 << " " << c << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' int main() { std::ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(10); ll c = 0; if (w % 2 == 0) { if (x == (w / 2)) { c = 0; } } if (h % 2 == 0) { if (y == (h / 2)) { c = 0; } } if (x == 0 and y == 0) c = 0; if (x == w and y == h) c = 0; if (((w * 1.0) / h) == ((x * 1.0) / h)) c = 0; if ((-(w * 1.0) / h) == (((x * 1.0) - w) / h)) c = 0; if (h % 2 == 0 and w % 2 == 0) { if (x == (w / 2) and y == (h / 2)) c = 1; } cout << (w * h * 1.0) / 2 << " " << c << endl; }
[ "literal.number.change", "variable_declaration.value.change" ]
817,655
817,656
u482090956
cpp
p03001
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' int main() { std::ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(10); ll c = 1; if (w % 2 == 0) { if (x == (w / 2)) { c = 0; } } if (h % 2 == 0) { if (y == (h / 2)) { c = 0; } } if (x == 0 and y == 0) c = 0; if (x == w and y == h) c = 0; if (((w * 1.0) / h) == ((x * 1.0) / h)) c = 0; if (((w * 1.0) / h) == (((x * 1.0) - w) / h)) c = 0; if (h % 2 == 0 and w % 2 == 0) { if (x == (w / 2) and y == (h / 2)) c = 1; } cout << (w * h * 1.0) / 2 << " " << c << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define endl '\n' int main() { std::ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll w, h, x, y; cin >> w >> h >> x >> y; cout << fixed << setprecision(10); ll c = 0; if (w % 2 == 0) { if (x == (w / 2)) { c = 0; } } if (h % 2 == 0) { if (y == (h / 2)) { c = 0; } } if (x == 0 and y == 0) c = 0; if (x == w and y == h) c = 0; if (((w * 1.0) / h) == ((x * 1.0) / h)) c = 0; if ((-(w * 1.0) / h) == (((x * 1.0) - w) / h)) c = 0; if (h % 2 == 0 and w % 2 == 0) { if (x == (w / 2) and y == (h / 2)) c = 1; } cout << (w * h * 1.0) / 2 << " " << c << endl; }
[ "literal.number.change", "variable_declaration.value.change", "expression.operation.unary.add", "control_flow.branch.if.condition.change" ]
817,657
817,656
u482090956
cpp
p03001
#include "bits/stdc++.h" #define REP(i, num) for (int i = 0; i < (num); ++i) #define ALL(c) c.begin(), c.end() #define PRINTALL(c) \ for (auto &x : c) { \ cout << x << ' '; \ } \ cout << endl; using namespace std; using ll = long long; template <typename T = int> T in() { T x; cin >> x; return (x); } int main() { // cin.tie(0); // ios::sync_with_stdio(false); ll W = in<ll>(), H = in<ll>(); ll x = in<ll>(), y = in<ll>(); ll cw = W / 2, ch = H / 2; bool same = false; if (abs(x - cw) < 1e-9 && abs(y - ch) < 1e-9) same = true; double S = W * H; S *= 0.5; // std::cout << std::cout.precision(12); printf("%.12lf %d\n", S, same ? 1 : 0); // cout << S << ' ' << (same ? 1 : 0) << endl; return 0; }
#include "bits/stdc++.h" #define REP(i, num) for (int i = 0; i < (num); ++i) #define ALL(c) c.begin(), c.end() #define PRINTALL(c) \ for (auto &x : c) { \ cout << x << ' '; \ } \ cout << endl; using namespace std; using ll = long long; template <typename T = int> T in() { T x; cin >> x; return (x); } int main() { // cin.tie(0); // ios::sync_with_stdio(false); ll W = in<ll>(), H = in<ll>(); ll x = in<ll>(), y = in<ll>(); double cw = W / 2.0, ch = H / 2.0; bool same = false; if (abs(x - cw) < 1e-9 && abs(y - ch) < 1e-9) same = true; double S = W * H; S *= 0.5; // std::cout << std::cout.precision(12); printf("%.12lf %d\n", S, same ? 1 : 0); // cout << S << ' ' << (same ? 1 : 0) << endl; return 0; }
[ "variable_declaration.type.change", "literal.number.change", "expression.operation.binary.change" ]
817,664
817,665
u135248164
cpp
p03001
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define INF INT_MAX >> 1 //要climits#includ typedef long long ll; using namespace std; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; long double ans1 = w / 2 * h; if (h / 2 == y && w / 2 == x && h % 2 == 0 && w % 2 == 0) { cout << ans1 << " " << 1 << endl; // printf("%.12lf 1\n", ans1); } else { cout << ans1 << " " << 0 << endl; // printf("%.12lf 0\n", ans1); } }
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define INF INT_MAX >> 1 //要climits#includ typedef long long ll; using namespace std; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; long double ans1 = w * h / 2.0; if (h / 2 == y && w / 2 == x && h % 2 == 0 && w % 2 == 0) { cout << ans1 << " " << 1 << endl; // printf("%.12lf 1\n", ans1); } else { cout << ans1 << " " << 0 << endl; // printf("%.12lf 0\n", ans1); } }
[ "expression.operation.binary.remove" ]
817,685
817,686
u117734686
cpp
p03001
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define INF INT_MAX >> 1 //要climits#includ typedef long long ll; using namespace std; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; double ans1 = (w * h) / 2; if (h / 2 == y && w / 2 == x && h % 2 == 0 && w % 2 == 0) { cout << ans1 << " " << 1 << endl; // printf("%.10lf 1\n", ans1); } else { cout << ans1 << " " << 0 << endl; // printf("%.10lf 0\n", ans1); } } /* int main(void){ ll n, k; cin >> n >> k; ll a[100001]; for(int i=0; i<n; i++){ cin >> a[i]; } ll ans = 0; ll left = 0, right = 0; ll sum = a[right]; while(1){ if(sum < k){ right++; if(right == n) break; sum += a[right]; }else{ ans += n-right; sum -= a[left]; left++; } } cout << ans << endl; } */ /* int main(void){ int n, x; cin >> n >> x; int l[100001]; int ans = 1; int now = 0; for(int i=0; i<n; i++){ cin >> l[i]; now += l[i]; if(now <= x) ans++; else break; } cout << ans << endl; return 0; } */ /* int main(void){ int x, a; cin >> x >> a; if(x < a) cout << 0 << endl; else cout << 10 << endl; return 0; } */
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define INF INT_MAX >> 1 //要climits#includ typedef long long ll; using namespace std; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; long double ans1 = w * h / 2.0; if (h / 2 == y && w / 2 == x && h % 2 == 0 && w % 2 == 0) { cout << ans1 << " " << 1 << endl; // printf("%.12lf 1\n", ans1); } else { cout << ans1 << " " << 0 << endl; // printf("%.12lf 0\n", ans1); } }
[ "variable_declaration.type.widen.change", "literal.number.change", "expression.operation.binary.change" ]
817,687
817,686
u117734686
cpp
p03001
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define INF INT_MAX >> 1 //要climits#includ typedef long long ll; using namespace std; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; long double ans1 = w / 2 * h; if (h / 2 == y && w / 2 == x && h % 2 == 0 && w % 2 == 0) { cout << ans1 << " " << 1 << endl; // printf("%.12lf 1\n", ans1); } else { cout << ans1 << " " << 0 << endl; // printf("%.12lf 0\n", ans1); } }
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define INF INT_MAX >> 1 //要climits#includ typedef long long ll; using namespace std; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; long double ans1 = w / 2.0 * h; if (h / 2 == y && w / 2 == x && h % 2 == 0 && w % 2 == 0) { cout << ans1 << " " << 1 << endl; // printf("%.12lf 1\n", ans1); } else { cout << ans1 << " " << 0 << endl; // printf("%.12lf 0\n", ans1); } }
[ "literal.number.change", "expression.operation.binary.change" ]
817,685
817,688
u117734686
cpp
p03001
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; int main() { ll n, m, x, y; while (cin >> n >> m >> x >> y) { ld ans = 0; ans = n * m; ans /= 2.0; cout << fixed << setprecision(12) << ans << " "; if (x == n / 2 && y == m / 2 && n % 2 == 0 && m % 2 == 0) { cout << 1 << endl; } else { cout << 2 << endl; } } return 0; }
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; int main() { ll n, m, x, y; while (cin >> n >> m >> x >> y) { ld ans = 0; ans = n * m; ans /= 2.0; cout << fixed << setprecision(12) << ans << " "; if (x == n / 2 && y == m / 2 && n % 2 == 0 && m % 2 == 0) { cout << 1 << endl; } else { cout << 0 << endl; } } return 0; }
[ "literal.number.change", "io.output.change" ]
817,694
817,695
u535523790
cpp
p03001
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; int main() { int n, m, x, y; while (cin >> n >> m >> x >> y) { double ans = 0; ans = n * m; ans /= 2.0; cout << fixed << setprecision(12) << ans << " "; if (x == n / 2 && y == m / 2 && n % 2 == 0 && m % 2 == 0) { cout << 1 << endl; } else { cout << 2 << endl; } } return 0; }
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; int main() { ll n, m, x, y; while (cin >> n >> m >> x >> y) { ld ans = 0; ans = n * m; ans /= 2.0; cout << fixed << setprecision(12) << ans << " "; if (x == n / 2 && y == m / 2 && n % 2 == 0 && m % 2 == 0) { cout << 1 << endl; } else { cout << 0 << endl; } } return 0; }
[ "variable_declaration.type.change", "literal.number.change", "io.output.change" ]
817,696
817,695
u535523790
cpp
p03001
#include <iostream> #include <stdint.h> #include <utility> using namespace std; int main() { int 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; }
#include <iostream> #include <stdint.h> #include <utility> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; cout << W * H / 2.0 << ' ' << ((W / 2.0 == x && H / 2.0 == y) ? 1 : 0) << endl; return 0; }
[ "variable_declaration.type.primitive.change", "literal.number.change", "control_flow.loop.for.condition.change", "io.output.change" ]
817,701
817,702
u843070415
cpp
p03001
#include <iostream> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; float ans; ans = (w * h) / 2; cout << (float)ans << " "; if (((w % 2) == 0) && ((h % 2) == 0) && (x == (w / 2)) && (y == (h / 2))) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
#include <iostream> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; float ans; ans = ((float)w * (float)h) / 2; cout << (float)ans << " "; if (((w % 2) == 0) && ((h % 2) == 0) && (x == (w / 2)) && (y == (h / 2))) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
[ "type_conversion.add" ]
817,714
817,715
u296155726
cpp
p03001
#include <iomanip> #include <iostream> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; double res; int res_b; res = w * h / 2; if (x * 2 == w && y * 2 == h) { res_b = 1; } else { res_b = 0; } cout << res << " " << res_b; }
#include <iomanip> #include <iostream> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; double res; int res_b; res = (double)w * (double)h / 2; if (x * 2 == w && y * 2 == h) { res_b = 1; } else { res_b = 0; } cout << res << " " << res_b; }
[ "type_conversion.add" ]
817,724
817,725
u301870186
cpp
p03001
#include <algorithm> #include <cmath> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> typedef long double ld; typedef long long ll; const ll INF = (ll)1e18 + 1; const ll MOD = 1e9 + 7; // Split namespace util { std::vector<std::string> split(std::string s, char delimiter) { std::vector<std::string> vs; std::string sub; for (auto c : s) { if (c == delimiter) vs.push_back(sub), sub.clear(); else sub += c; } vs.push_back(sub); return vs; } } // namespace util // Minimum, Maximum template <class T> T minimum(T head, T tail) { return std::min(head, tail); } template <class H, class... T> H minimum(H head, T... tail) { return std::min(head, minimum(tail...)); } template <class T> T maximum(T head, T tail) { return std::max(head, tail); } template <class H, class... T> H maximum(H head, T... tail) { return std::max(head, maximum(tail...)); } // Output template <class T, class S> std::ostream &operator<<(std::ostream &os, std::pair<T, S> p) { return os << "(" << p.first << " " << p.second << ")"; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> v) { for (ll i = 0; i < (ll)v.size(); i++) { os << " [" << i << "]" << v[i]; if (i % 10 == 9) os << std::endl; } // os << v[0]; for (ll i = 1; i < (ll)v.size(); i++){ os << " " << v[i]; } return os; } template <class T, class S> std::ostream &operator<<(std::ostream &os, std::map<T, S> m) { ll i = 0; for (auto p : m) { os << " [" << i << "]" << p.first << "->" << p.second; i++; } return os; } void print() { std::cout << std::endl; } template <typename H> void print(H head) { std::cout << head << std::endl; } template <typename H, typename... T> void print(H head, T... tail) { std::cout << head << " ", print(tail...); } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); ll W, H, x, y; std::cin >> W >> H >> x >> y; std::cout << std::fixed << std::setprecision(9); if (x * 2 == W && y * 2 == H) { print((ld)(W * H) / 2.0, (ll)1); return 0; } print((ld)(W * H) / 2.0, (ll)1); return 0; }
#include <algorithm> #include <cmath> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> typedef long double ld; typedef long long ll; const ll INF = (ll)1e18 + 1; const ll MOD = 1e9 + 7; // Split namespace util { std::vector<std::string> split(std::string s, char delimiter) { std::vector<std::string> vs; std::string sub; for (auto c : s) { if (c == delimiter) vs.push_back(sub), sub.clear(); else sub += c; } vs.push_back(sub); return vs; } } // namespace util // Minimum, Maximum template <class T> T minimum(T head, T tail) { return std::min(head, tail); } template <class H, class... T> H minimum(H head, T... tail) { return std::min(head, minimum(tail...)); } template <class T> T maximum(T head, T tail) { return std::max(head, tail); } template <class H, class... T> H maximum(H head, T... tail) { return std::max(head, maximum(tail...)); } // Output template <class T, class S> std::ostream &operator<<(std::ostream &os, std::pair<T, S> p) { return os << "(" << p.first << " " << p.second << ")"; } template <class T> std::ostream &operator<<(std::ostream &os, std::vector<T> v) { for (ll i = 0; i < (ll)v.size(); i++) { os << " [" << i << "]" << v[i]; if (i % 10 == 9) os << std::endl; } // os << v[0]; for (ll i = 1; i < (ll)v.size(); i++){ os << " " << v[i]; } return os; } template <class T, class S> std::ostream &operator<<(std::ostream &os, std::map<T, S> m) { ll i = 0; for (auto p : m) { os << " [" << i << "]" << p.first << "->" << p.second; i++; } return os; } void print() { std::cout << std::endl; } template <typename H> void print(H head) { std::cout << head << std::endl; } template <typename H, typename... T> void print(H head, T... tail) { std::cout << head << " ", print(tail...); } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); ll W, H, x, y; std::cin >> W >> H >> x >> y; std::cout << std::fixed << std::setprecision(9); if (x * 2 == W && y * 2 == H) { print((ld)(W * H) / 2.0, (ll)1); return 0; } print((ld)(W * H) / 2.0, (ll)0); return 0; }
[ "literal.number.change", "call.arguments.change", "io.output.change" ]
817,738
817,739
u343930666
cpp
p03001
#include <bits/stdc++.h> using namespace std; int n, m, x, y; int main() { cin >> n >> m >> x >> y; if (x == n / 2 && y == m / 2) printf("%.12f 1", n * m / 2.0); else printf("%.12f 0", n * m / 2.0); return 0; }
#include <bits/stdc++.h> using namespace std; double n, m, x, y; int main() { cin >> n >> m >> x >> y; if (x == n / 2 && y == m / 2) printf("%.12f 1", n * m / 2.0); else printf("%.12f 0", n * m / 2.0); return 0; }
[ "variable_declaration.type.primitive.change" ]
817,753
817,754
u051670389
cpp
p03001
#include <bits/stdc++.h> using namespace std; int n, m, x, y; int main() { cin >> n >> m >> x >> y; if (x == n / 2 && y == m / 2) printf("%.6f 1", n * m / 2.0); else printf("%.6f 0", n * m / 2.0); return 0; }
#include <bits/stdc++.h> using namespace std; double n, m, x, y; int main() { cin >> n >> m >> x >> y; if (x == n / 2 && y == m / 2) printf("%.12f 1", n * m / 2.0); else printf("%.12f 0", n * m / 2.0); return 0; }
[ "variable_declaration.type.primitive.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
817,755
817,754
u051670389
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { long long int W, H; int x, y; cin >> W >> H >> x >> y; cout << W * H / 2.f << " "; if (W / 2 == x && H / 2 == y) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int W, H; int x, y; cin >> W >> H >> x >> y; cout << W * H / 2.f << " "; if (W / 2.0 == x && H / 2.0 == y) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
817,756
817,757
u412989489
cpp
p03001
#include <bits/stdc++.h> #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ll long long #define lld long double #define ALL(x) x.begin(), x.end() #ifdef DEBUG #define line() cerr << "[" << __LINE__ << "] "; #define dump(i) cerr << #i ": " << i << " "; #define dumpl(i) cerr << #i ": " << i << endl; #else #define line(i) #define dump(i) #define dumpl(i) #endif using namespace std; int main() { long long h, w, x, y; cin >> w >> h >> x >> y; long double ans = (h * w) / 2; if ((w % 2 == 0) && (h % 2 == 0) && (x == w / 2) && (y == h / 2)) { cout << setprecision(20) << ans << " " << 1 << endl; } else { cout << setprecision(20) << ans << " " << 0 << endl; } return 0; }
#include <bits/stdc++.h> #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ll long long #define lld long double #define ALL(x) x.begin(), x.end() #ifdef DEBUG #define line() cerr << "[" << __LINE__ << "] "; #define dump(i) cerr << #i ": " << i << " "; #define dumpl(i) cerr << #i ": " << i << endl; #else #define line(i) #define dump(i) #define dumpl(i) #endif using namespace std; int main() { long long h, w, x, y; cin >> w >> h >> x >> y; long double ans = (h * w) / 2.0; if ((w % 2 == 0) && (h % 2 == 0) && (x == w / 2) && (y == h / 2)) { cout << setprecision(17) << ans << " " << 1 << endl; } else { cout << setprecision(17) << ans << " " << 0 << endl; } return 0; }
[ "literal.number.change", "expression.operation.binary.change", "io.output.change" ]
817,783
817,784
u174404613
cpp
p03001
#include <bits/stdc++.h> #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ll long long #define lld long double #define ALL(x) x.begin(), x.end() #ifdef DEBUG #define line() cerr << "[" << __LINE__ << "] "; #define dump(i) cerr << #i ": " << i << " "; #define dumpl(i) cerr << #i ": " << i << endl; #else #define line(i) #define dump(i) #define dumpl(i) #endif using namespace std; int main() { long long h, w, x, y; cin >> w >> h >> x >> y; long double ans = (h * w) / 2; if ((w % 2 == 0) && (h % 2 == 0) && (x == w / 2) && (y = h / 2)) { cout << setprecision(20) << ans << " " << 1 << endl; } else { cout << setprecision(20) << ans << " " << 0 << endl; } return 0; }
#include <bits/stdc++.h> #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ll long long #define lld long double #define ALL(x) x.begin(), x.end() #ifdef DEBUG #define line() cerr << "[" << __LINE__ << "] "; #define dump(i) cerr << #i ": " << i << " "; #define dumpl(i) cerr << #i ": " << i << endl; #else #define line(i) #define dump(i) #define dumpl(i) #endif using namespace std; int main() { long long h, w, x, y; cin >> w >> h >> x >> y; long double ans = (h * w) / 2.0; if ((w % 2 == 0) && (h % 2 == 0) && (x == w / 2) && (y == h / 2)) { cout << setprecision(17) << ans << " " << 1 << endl; } else { cout << setprecision(17) << ans << " " << 0 << endl; } return 0; }
[ "literal.number.change", "expression.operation.binary.change", "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo", "io.output.change" ]
817,785
817,784
u174404613
cpp
p03001
#include <algorithm> #include <bitset> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string.h> #include <string> #include <type_traits> #include <vector> using namespace std; #define ll long long int #define all(v) begin(v), end(v) #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++) // typedef vector<int> V; // typedef vector<V> VV; // typedef vector<VV> VVV; using namespace std; int l[10000]; long double w, h, x, y; int main() { cin >> w >> h >> x >> y; long double a = w * h / 2.0; if (w == 2.0 * x && h == 2.0 * y) { std::cout << std::fixed; cout << setprecision(6) << a << " " << 0 << endl; } else { std::cout << std::fixed; cout << setprecision(6) << a << " " << 1 << endl; } }
#include <algorithm> #include <bitset> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string.h> #include <string> #include <type_traits> #include <vector> using namespace std; #define ll long long int #define all(v) begin(v), end(v) #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++) // typedef vector<int> V; // typedef vector<V> VV; // typedef vector<VV> VVV; using namespace std; int l[10000]; long double w, h, x, y; int main() { cin >> w >> h >> x >> y; long double a = w * h / 2.0; if (w == 2.0 * x && h == 2.0 * y) { std::cout << std::fixed; cout << setprecision(9) << a << " " << 1 << endl; } else { std::cout << std::fixed; cout << setprecision(9) << a << " " << 0 << endl; } }
[ "literal.number.change", "io.output.change" ]
817,788
817,789
u065923107
cpp
p03001
#include <algorithm> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; double cx, cy; cx = W / 2; cy = H / 2; double M = (H * W) / 2; int ans = 0; if (cx == x && cy == y) { ans = 1; } cout << M << " " << ans << endl; return 0; }
#include <algorithm> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { double W, H; double x, y; cin >> W >> H >> x >> y; double cx, cy; cx = W / 2; cy = H / 2; double M = (H * W) / 2; int ans = 0; if (cx == x && cy == y) { ans = 1; } cout << M << " " << ans << endl; return 0; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.narrow.change" ]
817,798
817,799
u120564432
cpp
p03001
#include <algorithm> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; long long cx, cy; cx = W / 2; cy = H / 2; double M = (H * W) / 2; int ans = 0; if (cx == x && cy == y) { ans = 1; } cout << M << " " << ans << endl; return 0; }
#include <algorithm> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { double W, H; double x, y; cin >> W >> H >> x >> y; double cx, cy; cx = W / 2; cy = H / 2; double M = (H * W) / 2; int ans = 0; if (cx == x && cy == y) { ans = 1; } cout << M << " " << ans << endl; return 0; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.narrow.change" ]
817,800
817,799
u120564432
cpp
p03001
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <ccomplex> #include <cctype> #include <cerrno> #include <cfenv> #include <cfloat> #include <chrono> #include <cinttypes> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <complex> #include <condition_variable> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstdbool> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctgmath> #include <ctime> #include <cwchar> #include <cwctype> #include <deque> #include <exception> #include <forward_list> #include <fstream> #include <functional> #include <initializer_list> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <mutex> #include <new> #include <numeric> #include <ostream> #include <queue> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <typeinfo> #include <unordered_map> #include <unordered_set> #include <utility> #include <valarray> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; #ifndef __MACRO_H__ #define __MACRO_H__ #define all(collection) (collection).begin(), (collection).end() // begin to end #define rep(i, begin, end) for (ll i = begin; i < end; i++) // repeat #define repr(i, begin, end) \ for (ll i = begin - 1; end <= i; i--) // repeat reverse #endif int main(void) { double w, h, x, y; cin >> w >> h >> x >> y; ll ans = 0; if (x * 2 == w || y * 2 == h) ans = 1; cout << w * h / 2.0 << " " << ans; return 0; }
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <ccomplex> #include <cctype> #include <cerrno> #include <cfenv> #include <cfloat> #include <chrono> #include <cinttypes> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <complex> #include <condition_variable> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstdbool> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctgmath> #include <ctime> #include <cwchar> #include <cwctype> #include <deque> #include <exception> #include <forward_list> #include <fstream> #include <functional> #include <initializer_list> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <mutex> #include <new> #include <numeric> #include <ostream> #include <queue> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <typeinfo> #include <unordered_map> #include <unordered_set> #include <utility> #include <valarray> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; #ifndef __MACRO_H__ #define __MACRO_H__ #define all(collection) (collection).begin(), (collection).end() // begin to end #define rep(i, begin, end) for (ll i = begin; i < end; i++) // repeat #define repr(i, begin, end) \ for (ll i = begin - 1; end <= i; i--) // repeat reverse #endif int main(void) { double w, h, x, y; cin >> w >> h >> x >> y; ll ans = 0; if (x * 2 == w && y * 2 == h) ans = 1; cout << w * h / 2.0 << " " << ans; return 0; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
817,803
817,804
u153390822
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; cout << W * H / 2; if (x == W / 2 && y == H / 2) { cout << " 1"; } else { cout << " 0"; } }
#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 == W / 2 && y == H / 2) { cout << " 1"; } else { cout << " 0"; } }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.narrow.change" ]
817,813
817,812
u431475157
cpp
p03001
#include <iostream> using namespace std; int main(void) { double 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; }
#include <iostream> using namespace std; int main(void) { double 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; }
[ "io.output.change" ]
817,820
817,821
u361872898
cpp
p03001
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; const static int INT_INF = 2147483647; const static int MOD_NUM = 1000000007; static string S[2005] = {""}; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; double square = W * H / 2; int check = 0; if (x == W / 2.0 && y == H / 2.0) check = 1; cout << square << " " << check << endl; }
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; const static int INT_INF = 2147483647; const static int MOD_NUM = 1000000007; static string S[2005] = {""}; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; double square = W * H / 2.0; int check = 0; if (x == W / 2.0 && y == H / 2.0) check = 1; cout << square << " " << check << endl; }
[ "literal.number.change", "expression.operation.binary.change" ]
817,824
817,825
u588399226
cpp
p03001
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; const static int INT_INF = 2147483647; const static int MOD_NUM = 1000000007; static string S[2005] = {""}; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; long long square = W * H / 2; int check = 0; if (x == W / 2.0 && y == H / 2.0) check = 1; cout << square << " " << check << endl; }
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; const static int INT_INF = 2147483647; const static int MOD_NUM = 1000000007; static string S[2005] = {""}; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; double square = W * H / 2.0; int check = 0; if (x == W / 2.0 && y == H / 2.0) check = 1; cout << square << " " << check << endl; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.narrow.change", "literal.number.change", "expression.operation.binary.change" ]
817,826
817,825
u588399226
cpp
p03001
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; const static int INT_INF = 2147483647; const static int MOD_NUM = 1000000007; static string S[2005] = {""}; int main() { int W, H, x, y; cin >> W >> H >> x >> y; long long square = W * H / 2; int check = 0; if (x == W / 2.0 && y == H / 2.0) check = 1; cout << square << " " << check << endl; }
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; const static int INT_INF = 2147483647; const static int MOD_NUM = 1000000007; static string S[2005] = {""}; int main() { long long W, H, x, y; cin >> W >> H >> x >> y; double square = W * H / 2.0; int check = 0; if (x == W / 2.0 && y == H / 2.0) check = 1; cout << square << " " << check << endl; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change", "variable_declaration.type.narrow.change", "literal.number.change", "expression.operation.binary.change" ]
817,827
817,825
u588399226
cpp
p03001
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define repp(i, m, n) for (int i = m, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() #define clr(ar, val) memset(ar, val, sizeof(ar)) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> P; typedef long double ld; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; double ans = w * h / 2; bool eq = (x * 2 == w) && (y * 2 == h); printf("%.16f ", ans); cout << eq << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define repp(i, m, n) for (int i = m, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() #define clr(ar, val) memset(ar, val, sizeof(ar)) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> P; typedef long double ld; int main(void) { ll w, h, x, y; cin >> w >> h >> x >> y; double ans = w * h / 2.0; bool eq = (x * 2 == w) & (y * 2 == h); printf("%.16f ", ans); cout << eq << endl; return 0; }
[ "literal.number.change", "expression.operation.binary.change" ]
817,834
817,835
u617380180
cpp
p03001
#include <iomanip> #include <iostream> using namespace std; int main() { int64_t w, h, x, y; cin >> w >> h >> x >> y; double max_s; int way = 0; max_s = (double)(w) * (double)(h) / 2.0; if ((2 * x == w) || (2 * y == h)) { way = 1; } cout << fixed << setprecision(15) << max_s << " " << way << endl; return 0; }
#include <iomanip> #include <iostream> using namespace std; int main() { int64_t w, h, x, y; cin >> w >> h >> x >> y; double max_s; int way = 0; max_s = (double)(w) * (double)(h) / 2.0; if ((2 * x == w) && (2 * y == h)) { way = 1; } cout << fixed << setprecision(10) << max_s << " " << way << endl; return 0; }
[ "misc.opposites", "control_flow.branch.if.condition.change", "literal.number.change", "io.output.change" ]
817,838
817,837
u478018523
cpp
p03001
#include <iomanip> #include <iostream> using namespace std; int main() { int64_t w, h, x, y; cin >> w >> h >> x >> y; double max_s; int way = 0; max_s = (double)(w) * (double)(h) / 2.0; if ((2 * x == w) || (2 * y == h)) { way = 1; } cout << setprecision(20) << max_s << " " << way << endl; return 0; }
#include <iomanip> #include <iostream> using namespace std; int main() { int64_t w, h, x, y; cin >> w >> h >> x >> y; double max_s; int way = 0; max_s = (double)(w) * (double)(h) / 2.0; if ((2 * x == w) && (2 * y == h)) { way = 1; } cout << fixed << setprecision(10) << max_s << " " << way << endl; return 0; }
[ "misc.opposites", "control_flow.branch.if.condition.change", "io.output.change", "literal.number.change" ]
817,839
817,837
u478018523
cpp
p03001
/*coderanant*/ #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define f1(i, a, b) for (i = a; i < b; i++) #define f2(i, a, b) for (i = a; i >= b; i--) #define endl '\n' #define pb push_back #define gp " " #define ff first #define ss second #define mp make_pair const int mod = 1000000007; int i, j; ll temp; #define ld long double int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // #ifndef ONLINE_JUDGE // freopen("/home/akmittal/Desktop/Competitive // Programming/in.txt","r",stdin); freopen("/home/akmittal/Desktop/Competitive // Programming/out.txt","w",stdout); #endif int w, h, x, y; cin >> w >> h >> x >> y; long double ans = ((long double)w * h) / 2.0000; // cout<<ans; int ans2 = 0; if (x == w / 2 && y == h / 2) ans2 = 1; // printf("%.15llf %lld",ans,ans2); cout << fixed << setprecision(19) << ans << gp << ans2; return 0; }
/*coderanant*/ #include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define f1(i, a, b) for (i = a; i < b; i++) #define f2(i, a, b) for (i = a; i >= b; i--) #define endl '\n' #define pb push_back #define gp " " #define ff first #define ss second #define mp make_pair const int mod = 1000000007; int i, j; ll temp; #define ld long double int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // #ifndef ONLINE_JUDGE // freopen("/home/akmittal/Desktop/Competitive // Programming/in.txt","r",stdin); freopen("/home/akmittal/Desktop/Competitive // Programming/out.txt","w",stdout); #endif ld w, h, x, y; cin >> w >> h >> x >> y; long double ans = ((long double)w * h) / 2.0000; // cout<<ans; int ans2 = 0; if (x == w / 2 && y == h / 2) ans2 = 1; // printf("%.15llf %lld",ans,ans2); cout << fixed << setprecision(19) << ans << gp << ans2; return 0; }
[ "variable_declaration.type.change" ]
817,840
817,841
u087436629
cpp
p03001
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll W, H, x, y, mul; double ans; int main() { scanf("%lld %lld %lld %lld", &W, &H, &x, &y); double ans = (W * H) / 2; if (W == x * 2 && H == y * 2) { mul = 1; } printf("%.6lf %d\n", ans, mul); }
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll W, H, x, y, mul; double ans; int main() { scanf("%lld %lld %lld %lld", &W, &H, &x, &y); double ans = (double)(W * H) / 2; if (W == x * 2 && H == y * 2) { mul = 1; } printf("%.6lf %d\n", ans, mul); }
[ "type_conversion.add" ]
817,862
817,863
u548877759
cpp
p03001
/*********************** * Author: xuziyuan * ***********************/ #include <bits/stdc++.h> #define rt0 return 0 #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define replet(c) for (char c = 'a'; c <= 'z'; c++) #define LL long long #define pii pair<int, int> #define pb push_back #define fi first #define se second #define mpr make_pair #define sqr(a) ((a) * (a)) using namespace std; const LL MOD = 1e9 + 7; double n, m, x, y; int main() { cin >> n >> m >> x >> y; cout << n * m / 2 << ' ' << (x * 2 == n || y * 2 == m ? 1 : 0) << endl; rt0; }
/*********************** * Author: xuziyuan * ***********************/ #include <bits/stdc++.h> #define rt0 return 0 #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define replet(c) for (char c = 'a'; c <= 'z'; c++) #define LL long long #define pii pair<int, int> #define pb push_back #define fi first #define se second #define mpr make_pair #define sqr(a) ((a) * (a)) using namespace std; const LL MOD = 1e9 + 7; double n, m, x, y; int main() { cin >> n >> m >> x >> y; cout << n * m / 2 << ' ' << (x * 2 == n && y * 2 == m ? 1 : 0) << endl; rt0; }
[ "misc.opposites", "control_flow.loop.for.condition.change", "io.output.change" ]
817,868
817,869
u977365687
cpp
p03001
#include <algorithm> #include <cstring> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <math.h> #include <queue> #include <string> #include <tuple> #include <vector> using namespace std; #define MOD (long long int)(1e9 + 7) #define ll long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, n) for (int i = 1; i <= (int)(n); i++) #define REP(i, n) for (int i = n - 1; i >= 0; i--) #define REPS(i, n) for (int i = n; i > 0; i--) #define INF (int)(1123456789) #define LINF (long long int)(112345678901234567) #define chmax(a, b) a = (((a) < (b)) ? (b) : (a)) #define chmin(a, b) a = (((a) > (b)) ? (b) : (a)) #define all(v) v.begin(), v.end() template <typename T> void remove(std::vector<T> &vector, unsigned int index) { vector.erase(vector.begin() + index); } int main() { std::cout << std::fixed << std::setprecision(9); int W, H, x, y; cin >> W >> H >> x >> y; double ans; ans = (1.0 * W * H) / 2.0; if ((x == W / 2) && (y == H / 2)) { cout << ans << ' ' << 1 << endl; } else if ((x == W / 2) || (y == H / 2)) { cout << ans << ' ' << 0 << endl; } else { cout << ans << ' ' << 0 << endl; } return 0; }
#include <algorithm> #include <cstring> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <math.h> #include <queue> #include <string> #include <tuple> #include <vector> using namespace std; #define MOD (long long int)(1e9 + 7) #define ll long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, n) for (int i = 1; i <= (int)(n); i++) #define REP(i, n) for (int i = n - 1; i >= 0; i--) #define REPS(i, n) for (int i = n; i > 0; i--) #define INF (int)(1123456789) #define LINF (long long int)(112345678901234567) #define chmax(a, b) a = (((a) < (b)) ? (b) : (a)) #define chmin(a, b) a = (((a) > (b)) ? (b) : (a)) #define all(v) v.begin(), v.end() template <typename T> void remove(std::vector<T> &vector, unsigned int index) { vector.erase(vector.begin() + index); } int main() { std::cout << std::fixed << std::setprecision(9); double W, H, x, y; cin >> W >> H >> x >> y; double ans; ans = (1.0 * W * H) / 2.0; if ((x == W / 2) && (y == H / 2)) { cout << ans << ' ' << 1 << endl; } else if ((x == W / 2) || (y == H / 2)) { cout << ans << ' ' << 0 << endl; } else { cout << ans << ' ' << 0 << endl; } return 0; }
[ "variable_declaration.type.primitive.change" ]
817,883
817,884
u050698451
cpp
p03001
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { long long w, h, x, y; cin >> w >> h >> x >> y; cout << (double)(w * h) / 2 << ' '; if (x * 2 == w && y * w == h) { cout << 1; } else { cout << 0; } return 0; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { long long w, h, x, y; cin >> w >> h >> x >> y; cout << (double)(w * h) / 2 << ' '; if (x * 2 == w && y * 2 == h) { cout << 1; } else { cout << 0; } return 0; }
[ "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change" ]
817,889
817,890
u678631835
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; if (x * 2 == w && y * 2 == h) { printf("%.6lf 1", ans); } else { printf("%.6lf 0", ans); } return 0; }
#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; if (x * 2 == w && y * 2 == h) { printf("%.6lf 1", ans); } else { printf("%.6lf 0", ans); } return 0; }
[ "type_conversion.add" ]
817,897
817,898
u973152737
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { int W, H, x, y, sc, A; cin >> W >> H >> x >> y; sc = W * H / 2; if (x == W / 2 && y == H / 2) { A = 1; } else { A = 0; } cout << sc << " " << A << endl; }
#include <bits/stdc++.h> using namespace std; int main() { double W, H, x, y, A, sc; cin >> W >> H >> x >> y; sc = W * H / 2; if (x == W / 2 && y == H / 2) { A = 1; } else { A = 0; } cout << sc << " " << A << endl; }
[ "variable_declaration.type.primitive.change", "variable_declaration.remove", "variable_declaration.add" ]
817,899
817,900
u158628538
cpp
p03001
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; using ll = long long; const ll INF = pow(10, 18) + 1; #define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i) #define REP(i, n) FOR(i, 0, n) #define pb(a) push_back(a) #define all(x) (x).begin(), (x).end() template <typename T> bool chmin(T &a, T b) { return a > b ? a = b, true : false; } template <typename T> bool chmax(T &a, T b) { return a < b ? a = b, true : false; } int main() { ll W, H, x, y; cin >> W >> H >> x >> y; ll res1 = W * H / 2.0; int res2; if (W / 2.0 == x && H / 2.0 == y) res2 = 1; else res2 = 0; cout << res1 << " " << res2 << endl; return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; using ll = long long; const ll INF = pow(10, 18) + 1; #define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i) #define REP(i, n) FOR(i, 0, n) #define pb(a) push_back(a) #define all(x) (x).begin(), (x).end() template <typename T> bool chmin(T &a, T b) { return a > b ? a = b, true : false; } template <typename T> bool chmax(T &a, T b) { return a < b ? a = b, true : false; } int main() { ll W, H, x, y; cin >> W >> H >> x >> y; double res1 = W * H / 2.0; int res2; if (W / 2.0 == x && H / 2.0 == y) res2 = 1; else res2 = 0; cout << res1 << " " << res2 << endl; return 0; }
[ "variable_declaration.type.change" ]
817,901
817,902
u155088988
cpp
p03001
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; using ll = long long; const ll INF = pow(10, 18) + 1; #define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i) #define REP(i, n) FOR(i, 0, n) #define pb(a) push_back(a) #define all(x) (x).begin(), (x).end() template <typename T> bool chmin(T &a, T b) { return a > b ? a = b, true : false; } template <typename T> bool chmax(T &a, T b) { return a < b ? a = b, true : false; } int main() { ll W, H, x, y; cin >> W >> H >> x >> y; ll res1 = W * H / 2.0; int res2; if (W / 2 == x && H / 2 == y) res2 = 1; else res2 = 0; cout << res1 << " " << res2 << endl; return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; using ll = long long; const ll INF = pow(10, 18) + 1; #define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i) #define REP(i, n) FOR(i, 0, n) #define pb(a) push_back(a) #define all(x) (x).begin(), (x).end() template <typename T> bool chmin(T &a, T b) { return a > b ? a = b, true : false; } template <typename T> bool chmax(T &a, T b) { return a < b ? a = b, true : false; } int main() { ll W, H, x, y; cin >> W >> H >> x >> y; double res1 = W * H / 2.0; int res2; if (W / 2.0 == x && H / 2.0 == y) res2 = 1; else res2 = 0; cout << res1 << " " << res2 << endl; return 0; }
[ "variable_declaration.type.change", "literal.number.change", "control_flow.branch.if.condition.change" ]
817,903
817,902
u155088988
cpp
p03001
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { ll W, H, x, y; cin >> W >> H >> x >> y; cout << setprecision(10) << W * H / 2.0 << " "; if (W % 2 == 0 && H % 2 == 0 && W / 2 == x && H % 2 == y) cout << '1' << endl; else cout << '0' << endl; }
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { ll W, H, x, y; cin >> W >> H >> x >> y; cout << setprecision(10) << W * H / 2.0 << " "; if (W % 2 == 0 && H % 2 == 0 && W / 2 == x && H / 2 == y) cout << '1' << endl; else cout << '0' << endl; }
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
817,920
817,921
u991846372
cpp
p03001
#include <iostream> using namespace std; int main(void) { // Your code here! int w, h, x, y; cin >> w >> h >> x >> y; int f = 0; if (x == w / 2 && y == h / 2) f = 1; cout << (w * h) / 2 << f; }
#include <iostream> using namespace std; int main(void) { // Your code here! double w, h, x, y; cin >> w >> h >> x >> y; int f = 0; if (x == w / 2 && y == h / 2) f = 1; cout << (w * h) / 2 << " " << f; }
[ "variable_declaration.type.primitive.change", "io.output.change" ]
817,924
817,925
u675509234
cpp
p03001
#include <bits/stdc++.h> using namespace std; void file(bool opt) { if (opt && fopen("in.txt", "r")) { freopen("in.txt", "r", stdin); // freopen("out.txt", "w", stdout); } } int main() { long long w, h, x, y; cin >> w >> h >> x >> y; double ans = w * h / 2; int flag = 0; if (x * 2 == w && y * 2 == h) flag = 1; printf("%.5lf %d", ans, flag); return 0; }
#include <bits/stdc++.h> using namespace std; void file(bool opt) { if (opt && fopen("in.txt", "r")) { freopen("in.txt", "r", stdin); // freopen("out.txt", "w", stdout); } } int main() { long long w, h, x, y; cin >> w >> h >> x >> y; double ans = 1.0 * w / 2 * h; int flag = 0; if (x * 2 == w && y * 2 == h) flag = 1; printf("%.5lf %d", ans, flag); return 0; }
[ "identifier.replace.remove", "literal.replace.add", "expression.operation.binary.change", "identifier.change" ]
817,929
817,930
u066917439
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double ans; if (x2 == x1 / 2 && y2 == y1 / 2) { ans = x1 * y1 / 2; cout << fixed << setprecision(6) << ans << ' ' << 1; return 0; } else { ans = x1 * y1 / 2; cout << fixed << setprecision(6) << ans << ' ' << 0; return 0; } }
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double ans; if (x2 == x1 / 2 && y2 == y1 / 2) { ans = x1 * y1 / 2; cout << fixed << setprecision(6) << ans << ' ' << 1; return 0; } else { ans = x1 * y1 / 2; cout << fixed << setprecision(6) << ans << ' ' << 0; return 0; } }
[ "variable_declaration.type.primitive.change" ]
817,940
817,941
u429536817
cpp
p03001
#include <bits/stdc++.h> #define ll long long #define inf 0x3f3f3f3f using namespace std; const int maxn = 100005; double w, h, x, y; int main() { cin >> w >> h >> x >> y; double s = w * h / 2; int flag; if (x == w / 2 || y == h / 2) flag = 1; else flag = 0; cout << s << " " << flag << endl; // printf("%f %d",s,flag); }
#include <bits/stdc++.h> #define ll long long #define inf 0x3f3f3f3f using namespace std; const int maxn = 100005; double w, h, x, y; int main() { cin >> w >> h >> x >> y; double s = w * h / 2; int flag; if (x == w / 2 && y == h / 2) flag = 1; else flag = 0; cout << s << " " << flag << endl; // printf("%f %d",s,flag); }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
817,942
817,943
u058946652
cpp
p03001
#include <algorithm> #include <cassert> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unistd.h> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<vvl> vvvl; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; typedef vector<vvb> vvvb; typedef vector<vvvb> vvvvb; typedef vector<string> vs; typedef vector<vs> vvs; typedef vector<vvs> vvvs; typedef vector<char> vc; typedef vector<vector<char>> vvc; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<vvd> vvvd; typedef pair<int, int> P; typedef pair<ll, ll> PL; typedef vector<P> vp; typedef vector<PL> vpl; typedef vector<vector<P>> vvp; typedef vector<vector<PL>> vvpl; const int INF = 1001001001; const ll LINF = 1e17; const double pi = 3.1415926535897932; const string endstr = "\n"; #define FOR(i, a, b) for (ll i = (a); i < b; i++) #define RFOR(i, a, b) for (ll i = (a); i > b; i--) #define REP(i, n) for (ll i = 0; i < n; i++) #define RREP(i, n) for (ll i = n - 1; i > -1; i--) #define FORMAP(it, m) for (auto it = m.begin(); it != m.end(); it++) #define ff first #define ss second #define pb push_back #define epb emplace_back template <typename T> T gcd(T a, T b) { return (a == 0) ? b : gcd(b % a, a); } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } bool p_comp_fs(const PL p1, const PL p2) { return p1.first < p2.first; }; bool p_comp_fg(const PL p1, const PL p2) { return p1.first > p2.first; }; bool p_comp_ss(const PL p1, const PL p2) { return p1.second < p2.second; }; bool p_comp_sg(const PL p1, const PL p2) { return p1.second > p2.second; }; template <typename T> vector<T> uniquen(vector<T> vec) { vec.erase(unique(vec.begin(), vec.end()), vec.end()); return vec; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ll W, H, x, y; cin >> W >> H >> x >> y; double ans = (double)(W * H) / 2.0; bool cent = (x % 2 == 0 && x == W / 2) && (y % 2 == 0 && y == H / 2); cout << fixed << setprecision(20) << ans << " " << (cent ? "1" : "0") << endl; return 0; }
#include <algorithm> #include <cassert> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unistd.h> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<vvl> vvvl; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; typedef vector<vvb> vvvb; typedef vector<vvvb> vvvvb; typedef vector<string> vs; typedef vector<vs> vvs; typedef vector<vvs> vvvs; typedef vector<char> vc; typedef vector<vector<char>> vvc; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<vvd> vvvd; typedef pair<int, int> P; typedef pair<ll, ll> PL; typedef vector<P> vp; typedef vector<PL> vpl; typedef vector<vector<P>> vvp; typedef vector<vector<PL>> vvpl; const int INF = 1001001001; const ll LINF = 1e17; const double pi = 3.1415926535897932; const string endstr = "\n"; #define FOR(i, a, b) for (ll i = (a); i < b; i++) #define RFOR(i, a, b) for (ll i = (a); i > b; i--) #define REP(i, n) for (ll i = 0; i < n; i++) #define RREP(i, n) for (ll i = n - 1; i > -1; i--) #define FORMAP(it, m) for (auto it = m.begin(); it != m.end(); it++) #define ff first #define ss second #define pb push_back #define epb emplace_back template <typename T> T gcd(T a, T b) { return (a == 0) ? b : gcd(b % a, a); } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } bool p_comp_fs(const PL p1, const PL p2) { return p1.first < p2.first; }; bool p_comp_fg(const PL p1, const PL p2) { return p1.first > p2.first; }; bool p_comp_ss(const PL p1, const PL p2) { return p1.second < p2.second; }; bool p_comp_sg(const PL p1, const PL p2) { return p1.second > p2.second; }; template <typename T> vector<T> uniquen(vector<T> vec) { vec.erase(unique(vec.begin(), vec.end()), vec.end()); return vec; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ll W, H, x, y; cin >> W >> H >> x >> y; double ans = (double)(W * H) / 2.0; bool cent = (W % 2 == 0 && x == W / 2) && (H % 2 == 0 && y == H / 2); cout << fixed << setprecision(20) << ans << " " << (cent ? "1" : "0") << endl; return 0; return 0; }
[ "identifier.change", "expression.operation.binary.change", "control_flow.return.add", "control_flow.return.0.add" ]
817,946
817,947
u159208574
cpp
p03001
#include <algorithm> #include <chrono> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <set> #include <stdio.h> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; cout << setprecision(10) << (W * H) << " "; if (x == W / 2 && y == H / 2) { cout << '1' << endl; } else { cout << '0' << endl; } return 0; }
#include <algorithm> #include <chrono> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <set> #include <stdio.h> #include <stdlib.h> #include <string> #include <vector> using namespace std; int main() { double W, H, x, y; cin >> W >> H >> x >> y; cout << setprecision(10) << (W * H) / 2.0 << " "; if (x == W / 2 && y == H / 2) { cout << '1' << endl; } else { cout << '0' << endl; } return 0; }
[ "expression.operation.binary.add" ]
817,983
817,984
u766009355
cpp
p03001
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define x first #define y second #define pii pair<int, int> #define pb push_back #define eb emplace_back using namespace std; using namespace __gnu_pbds; typedef long long int ll; typedef unsigned long long int ull; int MOD = 1000000007; int MOD2 = 998244353; vector<int> bases; const ll LLINF = 1ll << 60; const char en = '\n'; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); void yes() { cout << "YES" << en; exit(0); } void no() { cout << "NO" << en; exit(0); } inline int rund() { int x576363482791fuweh = rng(); return abs(x576363482791fuweh) % RAND_MAX; } template <class T> void prVec(vector<T> w) { cout << w.size() << endl; for (int i = 0; i < int(w.size()) - 1; ++i) cout << w[i] << ' '; if (w.size()) cout << w[w.size() - 1] << endl; } void M998() { swap(MOD, MOD2); } ll raand() { ll a = rund(); a *= RAND_MAX; a += rund(); return a; } #define rand raand ll raaand() { return raand() * (MOD - 7) + raand(); } string to_upper(string a) { for (int i = 0; i < (int)a.size(); ++i) if (a[i] >= 'a' && a[i] <= 'z') a[i] -= 'a' - 'A'; return a; } string to_lower(string a) { for (int i = 0; i < (int)a.size(); ++i) if (a[i] >= 'A' && a[i] <= 'Z') a[i] += 'a' - 'A'; return a; } ll sti(string a) { ll k = 0; for (int i = 0; i < (int)a.size(); ++i) { k *= 10; k += a[i] - '0'; } return k; } string its(ll k) { if (k == 0) return "0"; string a; while (k) { a.push_back((k % 10) + '0'); k /= 10; } reverse(a.begin(), a.end()); return a; } ll min(ll a, int b) { if (a < b) return a; return b; } ll min(int a, ll b) { if (a < b) return a; return b; } ll max(ll a, int b) { if (a > b) return a; return b; } ll max(int a, ll b) { if (a > b) return a; return b; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class T, class K> pair<T, K> mp(T a, K b) { return make_pair(a, b); } inline int mult(ll a, ll b) { return (a * b) % MOD; } inline int pot(int n, int k) { if (k == 0) return 1; ll a = pot(n, k / 2); a = mult(a, a); if (k % 2) return mult(a, n); else return a; } int divide(int a, int b) { return mult(a, pot(b, MOD - 2)); } inline int sub(int a, int b) { if (a - b >= 0) return a - b; return a - b + MOD; } inline int add(int a, int b) { if (a + b >= MOD) return a + b - MOD; return a + b; } bool prime(ll a) { if (a == 1) return 0; for (int i = 2; i <= round(sqrt(a)); ++i) { if (a % i == 0) return 0; } return 1; } ll has(string x) { ll h1 = 0, h2 = 0; x = to_lower(x); for (char a : x) { h1 *= bases[0]; h1 += a - 'a'; h1 %= bases[3]; h2 *= bases[1]; h2 += a - 'a'; h2 %= bases[4]; } return h1 * (MOD + 13893829) + h2; } const int N = 300010; ll n, m, a, x, r; int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; int main() { ios_base::sync_with_stdio(false); cin.tie(0); for (int i = 0; i < 10; ++i) bases.push_back(rand() % (MOD - 13893829) + 13893829); cin >> n >> m >> a >> x; cout << n * m / 2.L << ' '; if (a == n / 2 && x == m / 2) cout << 1; else cout << 0; }
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define x first #define y second #define pii pair<int, int> #define pb push_back #define eb emplace_back using namespace std; using namespace __gnu_pbds; typedef long long int ll; typedef unsigned long long int ull; int MOD = 1000000007; int MOD2 = 998244353; vector<int> bases; const ll LLINF = 1ll << 60; const char en = '\n'; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); void yes() { cout << "YES" << en; exit(0); } void no() { cout << "NO" << en; exit(0); } inline int rund() { int x576363482791fuweh = rng(); return abs(x576363482791fuweh) % RAND_MAX; } template <class T> void prVec(vector<T> w) { cout << w.size() << endl; for (int i = 0; i < int(w.size()) - 1; ++i) cout << w[i] << ' '; if (w.size()) cout << w[w.size() - 1] << endl; } void M998() { swap(MOD, MOD2); } ll raand() { ll a = rund(); a *= RAND_MAX; a += rund(); return a; } #define rand raand ll raaand() { return raand() * (MOD - 7) + raand(); } string to_upper(string a) { for (int i = 0; i < (int)a.size(); ++i) if (a[i] >= 'a' && a[i] <= 'z') a[i] -= 'a' - 'A'; return a; } string to_lower(string a) { for (int i = 0; i < (int)a.size(); ++i) if (a[i] >= 'A' && a[i] <= 'Z') a[i] += 'a' - 'A'; return a; } ll sti(string a) { ll k = 0; for (int i = 0; i < (int)a.size(); ++i) { k *= 10; k += a[i] - '0'; } return k; } string its(ll k) { if (k == 0) return "0"; string a; while (k) { a.push_back((k % 10) + '0'); k /= 10; } reverse(a.begin(), a.end()); return a; } ll min(ll a, int b) { if (a < b) return a; return b; } ll min(int a, ll b) { if (a < b) return a; return b; } ll max(ll a, int b) { if (a > b) return a; return b; } ll max(int a, ll b) { if (a > b) return a; return b; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class T, class K> pair<T, K> mp(T a, K b) { return make_pair(a, b); } inline int mult(ll a, ll b) { return (a * b) % MOD; } inline int pot(int n, int k) { if (k == 0) return 1; ll a = pot(n, k / 2); a = mult(a, a); if (k % 2) return mult(a, n); else return a; } int divide(int a, int b) { return mult(a, pot(b, MOD - 2)); } inline int sub(int a, int b) { if (a - b >= 0) return a - b; return a - b + MOD; } inline int add(int a, int b) { if (a + b >= MOD) return a + b - MOD; return a + b; } bool prime(ll a) { if (a == 1) return 0; for (int i = 2; i <= round(sqrt(a)); ++i) { if (a % i == 0) return 0; } return 1; } ll has(string x) { ll h1 = 0, h2 = 0; x = to_lower(x); for (char a : x) { h1 *= bases[0]; h1 += a - 'a'; h1 %= bases[3]; h2 *= bases[1]; h2 += a - 'a'; h2 %= bases[4]; } return h1 * (MOD + 13893829) + h2; } const int N = 300010; ll n, m, a, x, r; int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; int main() { ios_base::sync_with_stdio(false); cin.tie(0); for (int i = 0; i < 10; ++i) bases.push_back(rand() % (MOD - 13893829) + 13893829); cin >> n >> m >> a >> x; cout << n * m / 2.L << ' '; if (a == n / 2.L && x == m / 2.L) cout << 1; else cout << 0; }
[ "control_flow.branch.if.condition.change" ]
817,997
817,998
u928041186
cpp
p03001
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INTEG = pow(10, 9) + 7; int main() { double W, H, x, y; cin >> W >> H >> x >> y; cout << fixed << W * H / 2 << setprecision(10) << " "; if (2 * x == W && 2 * y == H) { cout << 0 << endl; } else { cout << 1 << endl; } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INTEG = pow(10, 9) + 7; int main() { double W, H, x, y; cin >> W >> H >> x >> y; cout << fixed << W * H / 2 << setprecision(10) << " "; if (2 * x == W && 2 * y == H) { cout << 1 << endl; } else { cout << 0 << endl; } }
[ "literal.number.change", "io.output.change" ]
818,003
818,004
u826764011
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define ALL(obj) obj.begin(), obj.end() #define pb(obj) push_back(obj) #define REP(i, N) for (int i = 0; i < N; i++) typedef long long ll; const ll MOD = 1000000007; int main() { cin.tie(0); ios::sync_with_stdio(false); ll W, H, x, y; cin >> W >> H >> x >> y; double sub = W * H / 2; cout << sub << " "; if (x == W / 2.0 && y == H / 2.0) { cout << 1 << endl; } else cout << 0 << endl; }
#include <bits/stdc++.h> using namespace std; #define ALL(obj) obj.begin(), obj.end() #define pb(obj) push_back(obj) #define REP(i, N) for (int i = 0; i < N; i++) typedef long long ll; const ll MOD = 1000000007; int main() { cin.tie(0); ios::sync_with_stdio(false); ll W, H, x, y; cin >> W >> H >> x >> y; double sub = W * H / 2.0; cout << sub << " "; if (x == W / 2.0 && y == H / 2.0) { cout << 1 << endl; } else cout << 0 << endl; }
[ "literal.number.change", "expression.operation.binary.change" ]
818,005
818,006
u892438699
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; cout << 1LL * w * h / 2 << ' ' << (x * 2 == w && y * 2 == h) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; cout << 0.5 * w * h << ' ' << (x * 2 == w && y * 2 == h) << endl; }
[ "literal.number.change", "io.output.change", "expression.operation.binary.remove" ]
818,021
818,022
u410358766
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define LL long long #define FOR(INDEX, START, END) for (LL INDEX = (START); INDEX < (END); ++INDEX) #define REP(INDEX, COUNT) for (LL INDEX = 0; INDEX < (COUNT); ++INDEX) int main() { LL W, H, x, y; cin >> W >> H >> x >> y; LL area = W * H / 2.0; bool centerX = false; if (W % 2 == 0 && W / 2 == x) { centerX = true; } bool centerY = false; if (H % 2 == 0 && H / 2 == y) { centerY = true; } bool multi = false; if (centerX && centerY) { multi = true; } cout << setprecision(20) << area << " " << (multi ? 1 : 0) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define LL long long #define FOR(INDEX, START, END) for (LL INDEX = (START); INDEX < (END); ++INDEX) #define REP(INDEX, COUNT) for (LL INDEX = 0; INDEX < (COUNT); ++INDEX) int main() { LL W, H, x, y; cin >> W >> H >> x >> y; double area = W * H / 2.0; bool centerX = false; if (W % 2 == 0 && W / 2 == x) { centerX = true; } bool centerY = false; if (H % 2 == 0 && H / 2 == y) { centerY = true; } bool multi = false; if (centerX && centerY) { multi = true; } cout << setprecision(20) << area << " " << (multi ? 1 : 0) << endl; return 0; }
[ "variable_declaration.type.change" ]
818,027
818,028
u658243311
cpp
p03001
#include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> // c++11 #include <array> #include <tuple> #include <unordered_map> #include <unordered_set> #define mp make_pair #define mt make_tuple #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; template <class T> using max_priority_queue = priority_queue<T>; template <class T> using min_priority_queue = priority_queue<T, std::vector<T>, std::greater<T>>; const int INF = 1 << 29; const ll LL_INF = 1LL << 60; const double EPS = 1e-9; const ll MOD = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; int W, H; int x, y; int main() { cin >> W >> H; cin >> x >> y; double result = W * H / 2; int ans = 0; if (2 * x == W && 2 * y == H) { ans = 1; } printf("%.12f %d", result, ans); return 0; }
#include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> // c++11 #include <array> #include <tuple> #include <unordered_map> #include <unordered_set> #define mp make_pair #define mt make_tuple #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; template <class T> using max_priority_queue = priority_queue<T>; template <class T> using min_priority_queue = priority_queue<T, std::vector<T>, std::greater<T>>; const int INF = 1 << 29; const ll LL_INF = 1LL << 60; const double EPS = 1e-9; const ll MOD = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; int W, H; int x, y; int main() { cin >> W >> H; cin >> x >> y; double result = (double)W * H / 2; int ans = 0; if (2 * x == W && 2 * y == H) { ans = 1; } printf("%.12f %d", result, ans); return 0; }
[ "type_conversion.add" ]
818,037
818,038
u976162616
cpp
p03001
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <vector> typedef long long ll; using namespace std; int main(void) { int w, h, x, y; cin >> w >> h >> x >> y; cout << w * h / 2 << " "; if (w / 2 == x && h / 2 == y) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <vector> typedef long long ll; using namespace std; int main(void) { double w, h, x, y; cin >> w >> h >> x >> y; cout << w * h / 2 << " "; if (w / 2 == x && h / 2 == y) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
[ "variable_declaration.type.primitive.change" ]
818,048
818,049
u516922881
cpp
p03001
#define _USE_MATH_DEFINES #include "bits/stdc++.h" #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) using namespace std; typedef long long int ll; typedef pair<ll, ll> P; typedef complex<double> com; const int mod = 1e9 + 7; const int MOD = 998244353; const int inf = 2e9; ll mpow(ll a, ll b) { ll r = 1; a %= mod; while (b) { r = r * ((b % 2) ? a : 1) % mod, a = a * a % mod, b >>= 1; } return r; } int main() { int h, w, x, y; cin >> h >> w >> x >> y; long double s = 1LL * h * w / 2.0; printf("%.12lf ", s); if (h == 2LL * x && w == 2LL * y) printf("1"); else printf("0"); return 0; }
#define _USE_MATH_DEFINES #include "bits/stdc++.h" #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) using namespace std; typedef long long int ll; typedef pair<ll, ll> P; typedef complex<double> com; const int mod = 1e9 + 7; const int MOD = 998244353; const int inf = 2e9; ll mpow(ll a, ll b) { ll r = 1; a %= mod; while (b) { r = r * ((b % 2) ? a : 1) % mod, a = a * a % mod, b >>= 1; } return r; } int main() { int h, w, x, y; cin >> h >> w >> x >> y; long double s = 1LL * h * w / 2.0; printf("%.12Lf ", s); if (h == 2LL * x && w == 2LL * y) printf("1"); else printf("0"); return 0; }
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
818,054
818,055
u407614884
cpp
p03001
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define endl "\n" const long long INF = (long long)1e18; const long long MOD = (long long)1e9 + 7; string yn(bool f) { return f ? "Yes" : "No"; } string YN(bool f) { return f ? "YES" : "NO"; } #define MAX signed main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(11); int W, H, x, y; cin >> W >> H >> x >> y; cout << ((long double)(W * H / 2)) << " "; if (H - y == y && W - x == x) cout << 1; else cout << 0; cout << endl; return 0; }
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define endl "\n" const long long INF = (long long)1e18; const long long MOD = (long long)1e9 + 7; string yn(bool f) { return f ? "Yes" : "No"; } string YN(bool f) { return f ? "YES" : "NO"; } #define MAX signed main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12); int W, H, x, y; cin >> W >> H >> x >> y; cout << (((long double)W * H / 2)) << " "; if (H - y == y && W - x == x) cout << 1; else cout << 0; cout << endl; return 0; }
[ "literal.number.change", "io.output.change" ]
818,060
818,061
u233393801
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; int A = 1; int B = (w % 2 == 0 && w / 2 == x); int C = (h % 2 == 0 && h / 2 == y); if (B && C) A = 0; printf("%.10f %d\n", (double)h * w / 2, A); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int w, h, x, y; cin >> w >> h >> x >> y; int A = 0; int B = (w % 2 == 0 && w / 2 == x); int C = (h % 2 == 0 && h / 2 == y); if (B && C) A = 1; printf("%.10f %d\n", (double)h * w / 2, A); return 0; }
[ "literal.number.change", "variable_declaration.value.change", "assignment.value.change" ]
818,068
818,069
u680625190
cpp
p03001
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define FOR_LT(i, beg, end) for (int i = beg; i < end; i++) #define FOR_LE(i, beg, end) for (int i = beg; i <= end; i++) #define FOR_DW(i, beg, end) for (int i = beg; end <= i; i--) using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int w, h, x, y; cin >> w >> h >> x >> y; double ans = w * h / 2; if (x * 2 == w && y * 2 == h) { cout << setprecision(10) << ans << " " << 1 << endl; } else { cout << setprecision(10) << ans << " " << 0 << endl; } return 0; }
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define FOR_LT(i, beg, end) for (int i = beg; i < end; i++) #define FOR_LE(i, beg, end) for (int i = beg; i <= end; i++) #define FOR_DW(i, beg, end) for (int i = beg; end <= i; i--) using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int w, h, x, y; cin >> w >> h >> x >> y; double ans = (double)w * h / 2; if (x * 2 == w && y * 2 == h) { cout << setprecision(10) << ans << " " << 1 << endl; } else { cout << setprecision(10) << ans << " " << 0 << endl; } return 0; }
[ "type_conversion.add" ]
818,070
818,071
u862095327
cpp
p03001
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define ld long double #define ll long long int #define ull unsigned long long int #define rep(i, n) for (i = 0; i < n; i++) #define fin(ans) cout << (ans) << endl #define INF INT_MAX #define vi vector<int> #define vc vector<char> #define vs vector<string> #define vpii vector<pair<int, int>> #define vvi vector<vector<int>> #define vvc vector<vector<char>> #define vvs vector<vector<string>> #define P 1000000007 #define STI(s) atoi(s.c_str()) // string to int #define mp(p, q) make_pair(p, q) #define Sort(a) sort(a.begin(), a.end()) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const long long LLINF = 1LL << 60; // set<int>::iterator it; //|\_ // g++ -std=c++1z temp.cpp //./a.out int main(void) { ios::sync_with_stdio(false); cin.tie(0); ////////////////////////////////////////////////////// int W, H, x, y, i, j; cin >> W >> H >> x >> y; cout << W * H / 2 << " "; if ((double)x == (double)W / 2 && (double)y == (double)H / 2) cout << 1 << endl; else cout << 0 << endl; ////////////////////////////////////////////////////// return 0; }
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define ld long double #define ll long long int #define ull unsigned long long int #define rep(i, n) for (i = 0; i < n; i++) #define fin(ans) cout << (ans) << endl #define INF INT_MAX #define vi vector<int> #define vc vector<char> #define vs vector<string> #define vpii vector<pair<int, int>> #define vvi vector<vector<int>> #define vvc vector<vector<char>> #define vvs vector<vector<string>> #define P 1000000007 #define STI(s) atoi(s.c_str()) // string to int #define mp(p, q) make_pair(p, q) #define Sort(a) sort(a.begin(), a.end()) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const long long LLINF = 1LL << 60; // set<int>::iterator it; //|\_ // g++ -std=c++1z temp.cpp //./a.out int main(void) { ios::sync_with_stdio(false); cin.tie(0); ////////////////////////////////////////////////////// int W, H, x, y, i, j; cin >> W >> H >> x >> y; cout << (double)W * H / 2 << " "; if ((double)x == (double)W / 2 && (double)y == (double)H / 2) cout << 1 << endl; else cout << 0 << endl; ////////////////////////////////////////////////////// return 0; }
[ "type_conversion.add" ]
818,087
818,088
u903311413
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define mod 1000000007LL #define eps 1e-13 // #define PI 3.141592653589793238L #define INF 1000000011 #define INFLL 1000000000000000011LL #define vi vector<int> #define vll vector<long long> #define pii pair<int, int> #define pll pair<long long, long long> #define pil pair<int, long long> #define pli pair<long long, int> #define mp make_pair #define F first #define S second #define pb push_back #define fo(i, a, n) for (i = (a); i < (n); i++) #define gtl(x) getline(cin, (x)) #define flsh fflush(stdout) #define sws \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0) #define gcd __gcd #define all(a) (a).begin(), (a).end() #define sz(a) (int)((a).size()) #define io_file \ freopen("D:/Coding Problems/Contest/input_file.in", "r", stdin); \ freopen("D:/Coding Problems/Contest/output_file.out", "w", stdout) ll modx(ll Base, ll exponent) { ll ans = 1; if (Base == 1) return Base; while (exponent) { if (exponent & 1) ans = (ans * Base) % mod; Base = (Base * Base) % mod; exponent = exponent >> 1; } return ans; } ll inmodx(ll num) { return (modx(num, mod - 2LL)); } bool cmp(pair<pll, int> a, pair<pll, int> b) // true for a before b { if (a.F.F * b.F.S <= b.F.F * a.F.S) return 1; return 0; } const int N = (1e2) + 9; const int M = (N << 2) + 9; const int LOGN = ((int)log2(N)) + 3; const int LOGM = ((int)log2(M)) + 3; const int BUCK = 2 * 550; const int SQRT = BUCK + 9; void solve() { ll w, h, x, y; double a; int b = 0; cin >> w >> h >> x >> y; a = 0.5 * w * h; if (x + x == w && y + y == h) b = 1; cout << a << " " << b << '\n'; return; } int main() { sws; clock_t clk; clk = clock(); io_file; // srand (time(NULL)); // Code here int t = 1, cs; cout << fixed << setprecision(10); // cin >> t; fo(cs, 1, t + 1) { // cout << "Case #" << cs << ": "; solve(); } // Code ends here clk = clock() - clk; cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define mod 1000000007LL #define eps 1e-13 // #define PI 3.141592653589793238L #define INF 1000000011 #define INFLL 1000000000000000011LL #define vi vector<int> #define vll vector<long long> #define pii pair<int, int> #define pll pair<long long, long long> #define pil pair<int, long long> #define pli pair<long long, int> #define mp make_pair #define F first #define S second #define pb push_back #define fo(i, a, n) for (i = (a); i < (n); i++) #define gtl(x) getline(cin, (x)) #define flsh fflush(stdout) #define sws \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0) #define gcd __gcd #define all(a) (a).begin(), (a).end() #define sz(a) (int)((a).size()) #define io_file \ freopen("D:/Coding Problems/Contest/input_file.in", "r", stdin); \ freopen("D:/Coding Problems/Contest/output_file.out", "w", stdout) ll modx(ll Base, ll exponent) { ll ans = 1; if (Base == 1) return Base; while (exponent) { if (exponent & 1) ans = (ans * Base) % mod; Base = (Base * Base) % mod; exponent = exponent >> 1; } return ans; } ll inmodx(ll num) { return (modx(num, mod - 2LL)); } bool cmp(pair<pll, int> a, pair<pll, int> b) // true for a before b { if (a.F.F * b.F.S <= b.F.F * a.F.S) return 1; return 0; } const int N = (1e2) + 9; const int M = (N << 2) + 9; const int LOGN = ((int)log2(N)) + 3; const int LOGM = ((int)log2(M)) + 3; const int BUCK = 2 * 550; const int SQRT = BUCK + 9; void solve() { ll w, h, x, y; double a; int b = 0; cin >> w >> h >> x >> y; a = 0.5 * w * h; if (x + x == w && y + y == h) b = 1; cout << a << " " << b << '\n'; return; } int main() { sws; clock_t clk; clk = clock(); // io_file; // srand (time(NULL)); // Code here int t = 1, cs; cout << fixed << setprecision(2); // cin >> t; fo(cs, 1, t + 1) { // cout << "Case #" << cs << ": "; solve(); } // Code ends here clk = clock() - clk; cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC << "\n"; return 0; }
[ "literal.number.change", "io.output.change" ]
818,091
818,092
u567672339
cpp
p03001
// // Created by keane on 19-6-16. // #include <bits/stdc++.h> using namespace std; double w, h, x, y; int main(void) { scanf("%lf%lf%lf%lf", &w, &h, &x, &y); double a = w * h / 2; int d = 0; if (x == w / 2 && y == h / 2) { d = 1; } printf("%.6lf%d\n", a, d); return 0; }
// // Created by keane on 19-6-16. // #include <bits/stdc++.h> using namespace std; double w, h, x, y; int main(void) { scanf("%lf%lf%lf%lf", &w, &h, &x, &y); double a = w * h / 2; int d = 0; if (x == w / 2 && y == h / 2) { d = 1; } printf("%.6lf %d\n", a, d); return 0; }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
818,097
818,098
u978172081
cpp
p03001
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long int lli; const lli mod = 1e9 + 7; int main() { lli h, w, x, y; cin >> h >> w >> x >> y; cout << h * w / 2 << " "; if (2 * x == h and 2 * y == w) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long int lli; const lli mod = 1e9 + 7; int main() { lli h, w, x, y; cin >> h >> w >> x >> y; cout << (long double)h * w / 2 << " "; if (2 * x == h and 2 * y == w) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
[ "type_conversion.add" ]
818,103
818,104
u489536233
cpp
p03001
#include <bits/stdc++.h> using namespace std; using ll = long long; using Edge = pair<int, int>; using Graph = vector<vector<Edge>>; #define REP(i, n) for (int i = 0; i < (n); ++i) #define SORT(v) sort((v).begin(), (v).end()) #define RSORT(v) sort((v).rbegin(), (v).rend()) const ll MOD = 1000000007; const ll nmax = 8; const ll INF = 1e9; bool graph[nmax][nmax]; vector<vector<ll>> dist = vector<vector<ll>>(nmax, vector<ll>(nmax, INF)); void warshall_floyd(ll n) { for (size_t i = 0; i < n; i++) { for (size_t j = 0; j < n; j++) { for (size_t k = 0; k < n; k++) { dist[j][k] = min(dist[j][k], dist[j][i] + dist[i][k]); } } } } class UnionFind { public: vector<ll> Parent; UnionFind(ll N) { Parent = vector<ll>(N, -1); } ll find(ll A) { if (Parent[A] < 0) return A; return Parent[A] = find(Parent[A]); } ll size(ll A) { return -Parent[find(A)]; } bool Union(ll A, ll B) { A = find(A); B = find(B); if (A == B) { return false; } if (size(A) < size(B)) swap(A, B); Parent[A] += Parent[B]; Parent[B] = A; return true; } }; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; } ll mulMod(ll a, ll b) { return (((a % MOD) * (b % MOD)) % MOD); } ll powMod(ll a, ll p) { if (p == 0) { return 1; } else if (p % 2 == 0) { ll half = powMod(a, p / 2); return mulMod(half, half); } else { return mulMod(powMod(a, p - 1), a); } } ll ceil(ll a, ll b) { return (a + b - 1) / b; } void solve(long long W, long long H, long long x, long long y) { cout << fixed << setprecision(10) << W * H / 2 << " "; if (x * 2 == W && y * 2 == H) { cout << 1 << endl; } else { cout << 0 << endl; } } // Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You // use the default template now. You can remove this line by using your custom // template) int main() { long long W; scanf("%lld", &W); long long H; scanf("%lld", &H); long long x; scanf("%lld", &x); long long y; scanf("%lld", &y); solve(W, H, x, y); return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using Edge = pair<int, int>; using Graph = vector<vector<Edge>>; #define REP(i, n) for (int i = 0; i < (n); ++i) #define SORT(v) sort((v).begin(), (v).end()) #define RSORT(v) sort((v).rbegin(), (v).rend()) const ll MOD = 1000000007; const ll nmax = 8; const ll INF = 1e9; bool graph[nmax][nmax]; vector<vector<ll>> dist = vector<vector<ll>>(nmax, vector<ll>(nmax, INF)); void warshall_floyd(ll n) { for (size_t i = 0; i < n; i++) { for (size_t j = 0; j < n; j++) { for (size_t k = 0; k < n; k++) { dist[j][k] = min(dist[j][k], dist[j][i] + dist[i][k]); } } } } class UnionFind { public: vector<ll> Parent; UnionFind(ll N) { Parent = vector<ll>(N, -1); } ll find(ll A) { if (Parent[A] < 0) return A; return Parent[A] = find(Parent[A]); } ll size(ll A) { return -Parent[find(A)]; } bool Union(ll A, ll B) { A = find(A); B = find(B); if (A == B) { return false; } if (size(A) < size(B)) swap(A, B); Parent[A] += Parent[B]; Parent[B] = A; return true; } }; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; } ll mulMod(ll a, ll b) { return (((a % MOD) * (b % MOD)) % MOD); } ll powMod(ll a, ll p) { if (p == 0) { return 1; } else if (p % 2 == 0) { ll half = powMod(a, p / 2); return mulMod(half, half); } else { return mulMod(powMod(a, p - 1), a); } } ll ceil(ll a, ll b) { return (a + b - 1) / b; } void solve(long long W, long long H, long long x, long long y) { cout << fixed << setprecision(10) << (double)W * H / 2 << " "; if (x * 2 == W && y * 2 == H) { cout << 1 << endl; } else { cout << 0 << endl; } } // Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You // use the default template now. You can remove this line by using your custom // template) int main() { long long W; scanf("%lld", &W); long long H; scanf("%lld", &H); long long x; scanf("%lld", &x); long long y; scanf("%lld", &y); solve(W, H, x, y); return 0; }
[ "type_conversion.add" ]
818,107
818,108
u228295160
cpp
p03001
#include <bits/stdc++.h> using namespace std; int main() { long long W, H, 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> using namespace std; int main() { long double W, H, 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.narrow.change", "variable_declaration.type.widen.change" ]
818,115
818,116
u024867942
cpp
p03001
#include <bits/stdc++.h> #ifdef NON_SUBMIT #define TEST(n) (n) #define tout cerr #else #define TEST(n) ((void)0) #define tout cin #endif using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); TEST(freopen("input.txt", "r", stdin)); TEST(freopen("output.txt", "w", stdout)); TEST(freopen("debug.txt", "w", stderr)); long long a, b, c, d; cin >> a >> b >> c >> d; cout.precision(9); cout << fixed << 1LL * a * b / 2 << ' ' << (a % 2 == 0 && b % 2 == 0 && a / 2 == c && b / 2 == d) << '\n'; return 0; }
#include <bits/stdc++.h> #ifdef NON_SUBMIT #define TEST(n) (n) #define tout cerr #else #define TEST(n) ((void)0) #define tout cin #endif using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); TEST(freopen("input.txt", "r", stdin)); TEST(freopen("output.txt", "w", stdout)); TEST(freopen("debug.txt", "w", stderr)); long long a, b, c, d; cin >> a >> b >> c >> d; cout.precision(9); cout << fixed << a * b / 2. << ' ' << (a % 2 == 0 && b % 2 == 0 && a / 2 == c && b / 2 == d) << '\n'; return 0; }
[ "expression.operation.binary.remove" ]
818,119
818,120
u548859367
cpp
p03001
#ifdef DEBUG_IS_VALID #define DEB 1 #define _LIBCPP_DEBUG 0 #else #define DEB 0 #define NDEBUG #endif #include <bits/stdc++.h> using namespace std; #define ALL(g) (g).begin(), (g).end() #define REP(i, x, n) for (int i = x; i < n; i++) #define rep(i, n) REP(i, 0, n) #define RREP(i, x, n) for (int i = x; i >= n; i--) #define rrep(i, n) RREP(i, n, 0) #define pb push_back #pragma GCC optimize("-O3") using namespace std; #define DUMPOUT cout #define dump(...) \ if (DEB) \ DUMPOUT << " " << #__VA_ARGS__ << " :[" << __LINE__ << ":" \ << __FUNCTION__ << "]" << endl \ << " "; \ if (DEB) \ dump_func(__VA_ARGS__) template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { cout << "(" << p.first << ", " << p.second << ")"; return os; } template <typename T> ostream &operator<<(ostream &os, vector<T> &vec) { os << "{"; for (int i = 0; i < vec.size(); i++) os << vec[i] << (i + 1 == vec.size() ? "" : ", "); os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, set<T> &st) { cout << "{"; for (auto itr = st.begin(); itr != st.end(); itr++) cout << *itr << (next(itr) != st.end() ? ", " : ""); cout << "}"; return os; } template <typename T1, typename T2> ostream &operator<<(ostream &os, map<T1, T2> mp) { cout << "{"; for (auto itr = mp.begin(); itr != mp.end(); itr++) cout << "(" << (itr->first) << ", " << (itr->second) << ")" << (next(itr) != mp.end() ? "," : ""); cout << "}"; return os; } void dump_func() { DUMPOUT << endl; } template <class Head, class... Tail> void dump_func(Head &&head, Tail &&...tail) { DUMPOUT << head; if (sizeof...(Tail) == 0) { DUMPOUT << " "; } else { DUMPOUT << ", "; } dump_func(std::move(tail)...); } template <class T> inline bool chmax(T &a, T const &b) { if (a >= b) return false; a = b; return true; } template <class T> inline bool chmin(T &a, T const &b) { if (a <= b) return false; a = b; return true; } using ll = long long; using P = pair<int, int>; using Pl = pair<ll, ll>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vp = vector<Pl>; using vvp = vector<vp>; const int INF = 1 << 29; const long long LINF = 1LL << 59; void solve(long long W, long long H, long long x, long long y) { cout << double(H * W / 2LL) << " " << (2 * x == W && 2 * y == H ? 1 : 0) << endl; } int main() { long long W; scanf("%lld", &W); long long H; scanf("%lld", &H); long long x; scanf("%lld", &x); long long y; scanf("%lld", &y); solve(W, H, x, y); return 0; }
#ifdef DEBUG_IS_VALID #define DEB 1 #define _LIBCPP_DEBUG 0 #else #define DEB 0 #define NDEBUG #endif #include <bits/stdc++.h> using namespace std; #define ALL(g) (g).begin(), (g).end() #define REP(i, x, n) for (int i = x; i < n; i++) #define rep(i, n) REP(i, 0, n) #define RREP(i, x, n) for (int i = x; i >= n; i--) #define rrep(i, n) RREP(i, n, 0) #define pb push_back #pragma GCC optimize("-O3") using namespace std; #define DUMPOUT cout #define dump(...) \ if (DEB) \ DUMPOUT << " " << #__VA_ARGS__ << " :[" << __LINE__ << ":" \ << __FUNCTION__ << "]" << endl \ << " "; \ if (DEB) \ dump_func(__VA_ARGS__) template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { cout << "(" << p.first << ", " << p.second << ")"; return os; } template <typename T> ostream &operator<<(ostream &os, vector<T> &vec) { os << "{"; for (int i = 0; i < vec.size(); i++) os << vec[i] << (i + 1 == vec.size() ? "" : ", "); os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, set<T> &st) { cout << "{"; for (auto itr = st.begin(); itr != st.end(); itr++) cout << *itr << (next(itr) != st.end() ? ", " : ""); cout << "}"; return os; } template <typename T1, typename T2> ostream &operator<<(ostream &os, map<T1, T2> mp) { cout << "{"; for (auto itr = mp.begin(); itr != mp.end(); itr++) cout << "(" << (itr->first) << ", " << (itr->second) << ")" << (next(itr) != mp.end() ? "," : ""); cout << "}"; return os; } void dump_func() { DUMPOUT << endl; } template <class Head, class... Tail> void dump_func(Head &&head, Tail &&...tail) { DUMPOUT << head; if (sizeof...(Tail) == 0) { DUMPOUT << " "; } else { DUMPOUT << ", "; } dump_func(std::move(tail)...); } template <class T> inline bool chmax(T &a, T const &b) { if (a >= b) return false; a = b; return true; } template <class T> inline bool chmin(T &a, T const &b) { if (a <= b) return false; a = b; return true; } using ll = long long; using P = pair<int, int>; using Pl = pair<ll, ll>; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vp = vector<Pl>; using vvp = vector<vp>; const int INF = 1 << 29; const long long LINF = 1LL << 59; void solve(long long W, long long H, long long x, long long y) { cout << double(H * W) / double(2) << " " << (2 * x == W && 2 * y == H ? 1 : 0) << endl; } int main() { long long W; scanf("%lld", &W); long long H; scanf("%lld", &H); long long x; scanf("%lld", &x); long long y; scanf("%lld", &y); solve(W, H, x, y); return 0; }
[ "call.arguments.change", "call.add" ]
818,121
818,122
u584355711
cpp
p03001
#include <bits/stdc++.h> using namespace std; #define int long long #define For(i, a, b) for (int i = (a); i <= static_cast<int>(b); i++) #define Forr(i, a, b) for (int i = (a); i >= static_cast<int>(b); i--) #define rep(i, n) For(i, 0, n - 1) #define repall(i, arr) for (auto &i : (arr)) #define all(x) (x).begin(), (x).end() #define pb push_back #define dump(x) cerr << #x << " = " << (x) << '\n' #define dump2(x, y) \ cerr << #x << " = " << (x) << " " << #y << " = " << (y) << '\n' template <typename T> using pq = priority_queue<T>; template <typename T> using pqr = priority_queue<T, vector<T>, greater<T>>; const int INF = LLONG_MAX / 2; constexpr int MOD = 1e9 + 7; using P = pair<int, int>; using vec = vector<int>; using mat = vector<vec>; template <typename T1, typename T2> ostream &operator<<(ostream &stream, const pair<T1, T2> &p) { return stream << p.first << " " << p.second; } template <typename T> void print(const vector<vector<T>> matrix) { repall(vec, matrix) print(vec); } template <typename T> void print(const vector<T> vec) { unsigned int len = vec.size(); rep(i, len - 1) cout << vec[i] << ' '; cout << vec[len - 1] << '\n'; } template <typename Arg> void print(const Arg arg) { cout << arg << '\n'; } template <typename Head, typename... Args> void print(const Head head, const Args... args) { cout << head << " "; print(args...); } template <typename T> T sum_(vector<T> vec, T init = 0) { return std::accumulate(all(vec), T(init)); } void yn(bool tf) { print(tf ? "Yes" : "No"); } void YN(bool tf) { print(tf ? "YES" : "NO"); } template <typename T> void init(vector<T> &v) { rep(i, v.size()) cin >> v[i]; } template <typename T, typename U> void init(vector<T> &v, vector<U> &w) { assert(v.size() == w.size()); rep(i, v.size()) cin >> v[i] >> w[i]; } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } // ------------------------------------------------------------------- // sort 1 2 3 4 // pqr 1 2 3 must impl > signed main() { cin.tie(0), cout.tie(0), ios::sync_with_stdio(false); double w, h, x, y; cin >> w >> h >> x >> y; double area = w * h / 2; int yn; if (abs(w - x) < 1e-6 and abs(h - y) < 1e-6) yn = 1; else yn = 0; cout << setprecision(10) << area << " " << yn << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define int long long #define For(i, a, b) for (int i = (a); i <= static_cast<int>(b); i++) #define Forr(i, a, b) for (int i = (a); i >= static_cast<int>(b); i--) #define rep(i, n) For(i, 0, n - 1) #define repall(i, arr) for (auto &i : (arr)) #define all(x) (x).begin(), (x).end() #define pb push_back #define dump(x) cerr << #x << " = " << (x) << '\n' #define dump2(x, y) \ cerr << #x << " = " << (x) << " " << #y << " = " << (y) << '\n' template <typename T> using pq = priority_queue<T>; template <typename T> using pqr = priority_queue<T, vector<T>, greater<T>>; const int INF = LLONG_MAX / 2; constexpr int MOD = 1e9 + 7; using P = pair<int, int>; using vec = vector<int>; using mat = vector<vec>; template <typename T1, typename T2> ostream &operator<<(ostream &stream, const pair<T1, T2> &p) { return stream << p.first << " " << p.second; } template <typename T> void print(const vector<vector<T>> matrix) { repall(vec, matrix) print(vec); } template <typename T> void print(const vector<T> vec) { unsigned int len = vec.size(); rep(i, len - 1) cout << vec[i] << ' '; cout << vec[len - 1] << '\n'; } template <typename Arg> void print(const Arg arg) { cout << arg << '\n'; } template <typename Head, typename... Args> void print(const Head head, const Args... args) { cout << head << " "; print(args...); } template <typename T> T sum_(vector<T> vec, T init = 0) { return std::accumulate(all(vec), T(init)); } void yn(bool tf) { print(tf ? "Yes" : "No"); } void YN(bool tf) { print(tf ? "YES" : "NO"); } template <typename T> void init(vector<T> &v) { rep(i, v.size()) cin >> v[i]; } template <typename T, typename U> void init(vector<T> &v, vector<U> &w) { assert(v.size() == w.size()); rep(i, v.size()) cin >> v[i] >> w[i]; } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } // ------------------------------------------------------------------- // sort 1 2 3 4 // pqr 1 2 3 must impl > signed main() { cin.tie(0), cout.tie(0), ios::sync_with_stdio(false); double w, h, x, y; cin >> w >> h >> x >> y; double area = w * h / 2; int yn; if (abs(w / 2 - x) < 1e-6 and abs(h / 2 - y) < 1e-6) yn = 1; else yn = 0; cout << setprecision(10) << area << " " << yn << endl; return 0; }
[ "control_flow.branch.if.condition.change" ]
818,135
818,136
u771524928
cpp
p03001
#include <algorithm> #include <cfloat> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stack> #include <string.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) #define int long long #define ll long long #define eps LDBL_EPSILON #define mod 1000000007 #define int long long #define double long double #define INF INT_MAX #define P pair<int, int> #define prique priority_queue using namespace std; int w, h, x, y; signed main() { cin >> w >> h >> x >> y; cout << w * h / 2 << " " << (x == w / 2.0 && y == h / 2.0 ? 1 : 0) << endl; }
#include <algorithm> #include <cfloat> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stack> #include <string.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) #define int long long #define ll long long #define eps LDBL_EPSILON #define mod 1000000007 #define int long long #define double long double #define INF INT_MAX #define P pair<int, int> #define prique priority_queue using namespace std; int w, h, x, y; signed main() { cin >> w >> h >> x >> y; cout << w * h / 2.0 << " " << (x == w / 2.0 && y == h / 2.0 ? 1 : 0) << endl; }
[ "literal.number.change", "io.output.change" ]
818,137
818,138
u379822620
cpp
p03003
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(var) cerr << (#var) << " = " << (var) << endl; #else #define debug(var) #endif void init() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } const int N = 2e3 + 23; const int S = 1e5 + 23; const int mod = 1e9 + 7; int n, m; int a[N], b[N]; long long dp[N][N], sum[N][N]; void solve() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; ++i) scanf("%d", a + i); for (int j = 1; j <= m; ++j) scanf("%d", b + j); sum[0][0] = dp[0][0] = 1; for (int i = 0; i <= n; ++i) sum[i][0] = 1; for (int i = 0; i <= m; ++i) sum[0][i] = 1; for (int i = 1; i <= n; ++i) { for (int j = 1; j <= m; ++j) { if (a[i] == b[j]) dp[i][j] = (sum[i - 1][j - 1] + 1) % mod; sum[i][j] = (sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1] + dp[i][j]) % mod; } } printf("%lld", (sum[n][m] * 500000004 + 1) % mod); } int main() { // init(); int t = 1; // scanf("%d", &t); while (t--) { solve(); } return 0; }
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(var) cerr << (#var) << " = " << (var) << endl; #else #define debug(var) #endif void init() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } const int N = 2e3 + 23; const int S = 1e5 + 23; const int mod = 1e9 + 7; int n, m; int a[N], b[N]; long long dp[N][N], sum[N][N]; void solve() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; ++i) scanf("%d", a + i); for (int j = 1; j <= m; ++j) scanf("%d", b + j); sum[0][0] = dp[0][0] = 1; for (int i = 0; i <= n; ++i) sum[i][0] = 1; for (int i = 0; i <= m; ++i) sum[0][i] = 1; for (int i = 1; i <= n; ++i) { for (int j = 1; j <= m; ++j) { if (a[i] == b[j]) dp[i][j] = (sum[i - 1][j - 1] + 1) % mod; sum[i][j] = (sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1] + dp[i][j] + mod) % mod; } } printf("%lld", (sum[n][m] + 1) * 500000004 % mod); } int main() { // init(); int t = 1; // scanf("%d", &t); while (t--) { solve(); } return 0; }
[ "assignment.change", "expression.operation.binary.remove" ]
818,145
818,146
u953463534
cpp
p03003
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(var) cerr << (#var) << " = " << (var) << endl; #else #define debug(var) #endif void init() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } const int N = 2e3 + 23; const int S = 1e5 + 23; const int mod = 1e9 + 7; int n, m; int a[N], b[N]; long long dp[N][N], sum[N][N]; void solve() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; ++i) scanf("%d", a + i); for (int j = 1; j <= m; ++j) scanf("%d", b + j); sum[0][0] = dp[0][0] = 1; for (int i = 0; i <= n; ++i) sum[i][0] = 1; for (int i = 0; i <= m; ++i) sum[0][i] = 1; for (int i = 1; i <= n; ++i) { for (int j = 1; j <= m; ++j) { if (a[i] == b[j]) dp[i][j] = (sum[i - 1][j - 1] + 1) % mod; sum[i][j] = (sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1] + dp[i][j]) % mod; } } printf("%lld", (sum[n][m] + 1) * 500000004 % mod); } int main() { // init(); int t = 1; // scanf("%d", &t); while (t--) { solve(); } return 0; }
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(var) cerr << (#var) << " = " << (var) << endl; #else #define debug(var) #endif void init() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } const int N = 2e3 + 23; const int S = 1e5 + 23; const int mod = 1e9 + 7; int n, m; int a[N], b[N]; long long dp[N][N], sum[N][N]; void solve() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; ++i) scanf("%d", a + i); for (int j = 1; j <= m; ++j) scanf("%d", b + j); sum[0][0] = dp[0][0] = 1; for (int i = 0; i <= n; ++i) sum[i][0] = 1; for (int i = 0; i <= m; ++i) sum[0][i] = 1; for (int i = 1; i <= n; ++i) { for (int j = 1; j <= m; ++j) { if (a[i] == b[j]) dp[i][j] = (sum[i - 1][j - 1] + 1) % mod; sum[i][j] = (sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1] + dp[i][j] + mod) % mod; } } printf("%lld", (sum[n][m] + 1) * 500000004 % mod); } int main() { // init(); int t = 1; // scanf("%d", &t); while (t--) { solve(); } return 0; }
[ "assignment.change" ]
818,147
818,146
u953463534
cpp
p03003
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i) #define FOR(e, c) for (auto &e : c) #define SORT(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define rvisort(v) sort(v.begin(), v.end(), greater<int>()); #define all(v) v.begin(), v.end() #define mp(n, m) make_pair(n, m); #define cout(d) cout << d << endl; #define coutd(d) cout << std::setprecision(10) << d << endl; #define cinline(n) getline(cin, n); #define replace_all(s, b, a) replace(s.begin(), s.end(), b, a); // #define int long long #define PI (acos(-1)) #define FILL(v, n, x) fill(v, v + n, x); #define sz(x) int(x.size()) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using pii = pair<int, int>; using ul = unsigned long; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } int GCD(int a, int b) { return b ? GCD(b, a % b) : a; } int LCM(int a, int b) { return a * b / GCD(a, b); } const int dy[] = {0, 1, 0, -1, -1, 1, 1, -1}; const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; inline bool inside(int y, int x, int H, int W) { return (y >= 0 && x >= 0 && y < H && x < W); } const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; ll dp0[2005][2005]; ll dp1[2005][2005]; signed main() { cin.tie(0); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector<ll> s(n), t(m); rep(i, n) cin >> s[i]; rep(i, m) cin >> t[i]; dp0[0][0] = 1; rep(i, n + 1) rep(j, m + 1) { (dp0[i + 1][j] += dp0[i][j]) %= MOD; (dp1[i][j] += dp0[i][j]) %= MOD; (dp1[i][j + 1] += dp1[i][j]) %= MOD; if (s[i] == t[j]) (dp0[i + j][j + 1] += dp1[i][j]) %= MOD; } ll ans = dp1[n][m] % MOD; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i) #define FOR(e, c) for (auto &e : c) #define SORT(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define rvisort(v) sort(v.begin(), v.end(), greater<int>()); #define all(v) v.begin(), v.end() #define mp(n, m) make_pair(n, m); #define cout(d) cout << d << endl; #define coutd(d) cout << std::setprecision(10) << d << endl; #define cinline(n) getline(cin, n); #define replace_all(s, b, a) replace(s.begin(), s.end(), b, a); // #define int long long #define PI (acos(-1)) #define FILL(v, n, x) fill(v, v + n, x); #define sz(x) int(x.size()) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using pii = pair<int, int>; using ul = unsigned long; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } int GCD(int a, int b) { return b ? GCD(b, a % b) : a; } int LCM(int a, int b) { return a * b / GCD(a, b); } const int dy[] = {0, 1, 0, -1, -1, 1, 1, -1}; const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; inline bool inside(int y, int x, int H, int W) { return (y >= 0 && x >= 0 && y < H && x < W); } const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; ll dp0[2005][2005]; ll dp1[2005][2005]; signed main() { cin.tie(0); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector<ll> s(n), t(m); rep(i, n) cin >> s[i]; rep(i, m) cin >> t[i]; dp0[0][0] = 1; rep(i, n + 1) rep(j, m + 1) { (dp0[i + 1][j] += dp0[i][j]) %= MOD; (dp1[i][j] += dp0[i][j]) %= MOD; (dp1[i][j + 1] += dp1[i][j]) %= MOD; if (s[i] == t[j]) (dp0[i + 1][j + 1] += dp1[i][j]) %= MOD; } ll ans = dp1[n][m] % MOD; cout << ans << endl; }
[ "assignment.variable.change", "identifier.replace.remove", "literal.replace.add", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
818,186
818,187
u530107518
cpp
p03003
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define rep(index, num) for (int index = 0; index < num; index++) #define rep1(index, num) for (int index = 1; index <= num; index++) #define scan(argument) cin >> argument #define prin(argument) cout << argument << endl #define kaigyo cout << endl #define eps 1e-7 #define mp(a1, a2) make_pair(a1, a2) typedef long long ll; typedef long double ld; using namespace std; typedef pair<ll, ll> pll; typedef pair<int, int> pint; typedef vector<int> vint; typedef vector<ll> vll; typedef vector<pint> vpint; typedef vector<pll> vpll; ll INFl = 1e+18 + 1; int INF = 1e+9 + 1; ll dp[2001][2001]; ll MOD = 1e+9 + 7; int main() { int N, M; int S[10001], T[10001]; scan(N >> M); rep(i, N) { scan(S[i]); } rep(i, M) { scan(T[i]); } // rep(x,N+1) dp[x][0]=1; // rep(y,M+1) dp[0][y]=1; rep1(x, N) { rep1(y, M) { if (S[x - 1] == T[y - 1]) { dp[x][y] = dp[x - 1][y - 1] + 1; } else dp[x][y] = 0; dp[x][y] += (dp[x - 1][y] + dp[x][y - 1] - dp[x - 1][y - 1] + MOD) % MOD; dp[x][y] %= MOD; // printf("x:%d y:%d dp:%lld\n",x,y,dp[x][y]); } } prin(dp[N][M]); return 0; }
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define rep(index, num) for (int index = 0; index < num; index++) #define rep1(index, num) for (int index = 1; index <= num; index++) #define scan(argument) cin >> argument #define prin(argument) cout << argument << endl #define kaigyo cout << endl #define eps 1e-7 #define mp(a1, a2) make_pair(a1, a2) typedef long long ll; typedef long double ld; using namespace std; typedef pair<ll, ll> pll; typedef pair<int, int> pint; typedef vector<int> vint; typedef vector<ll> vll; typedef vector<pint> vpint; typedef vector<pll> vpll; ll INFl = 1e+18 + 1; int INF = 1e+9 + 1; ll dp[2001][2001]; ll MOD = 1e+9 + 7; int main() { int N, M; int S[10001], T[10001]; scan(N >> M); rep(i, N) { scan(S[i]); } rep(i, M) { scan(T[i]); } rep1(x, N) { rep1(y, M) { if (S[x - 1] == T[y - 1]) { dp[x][y] += dp[x - 1][y - 1] + 1; } else dp[x][y] = 0; dp[x][y] += (dp[x - 1][y] + dp[x][y - 1] - dp[x - 1][y - 1] + MOD) % MOD; dp[x][y] %= MOD; // printf("x:%d y:%d dp:%lld\n",x,y,dp[x][y]); } } prin(dp[N][M] + 1); return 0; }
[ "assignment.value.change" ]
818,206
818,207
u222030240
cpp
p03003
#include <bits/stdc++.h> using namespace std; using ll = long long; #define forx(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(10); int n, m; cin >> n >> m; vector<int> s(n), t(m); rep(i, n) cin >> s[i]; rep(i, m) cin >> t[i]; ll mod = 1e9 + 7; vector<vector<ll>> dp(n + 1, vector<ll>(m + 1)), u(n + 1, vector<ll>(m + 1)); forx(i, 1, n + 1) forx(j, 1, m + 1) { if (s[i - 1] == t[j - 1]) dp[i][j] = u[i - 1][j - 1] + 1; u[i][j] = (u[i - 1][j] + u[i][j - 1] - u[i - 1][j - 1] + dp[i][j] + mod) % mod; } cout << u[n][m] << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define forx(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(10); int n, m; cin >> n >> m; vector<int> s(n), t(m); rep(i, n) cin >> s[i]; rep(i, m) cin >> t[i]; ll mod = 1e9 + 7; vector<vector<ll>> dp(n + 1, vector<ll>(m + 1)), u(n + 1, vector<ll>(m + 1)); forx(i, 1, n + 1) forx(j, 1, m + 1) { if (s[i - 1] == t[j - 1]) dp[i][j] = u[i - 1][j - 1] + 1; u[i][j] = (u[i - 1][j] + u[i][j - 1] - u[i - 1][j - 1] + dp[i][j] + mod) % mod; } cout << u[n][m] + 1LL << endl; return 0; }
[ "expression.operation.binary.add" ]
818,208
818,209
u604231488
cpp