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 <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#define mst(a, b) memset(a, b, sizeof(a))
#define repi(a, b) for (int i = a; i < b; i++)
#define repj(a, b) for (int j = a; j < b; j++)
#define pii pair<int, int>
#ifdef LOCAL
#define fre() freopen("in.txt", "r", stdin)
#endif
#ifndef LOCAL
#define fre()
#endif
// static int x = []() {
// std::ios::sync_with_stdio(false);
// std::cin.tie(NULL);
// return 0;
//}();
#define FASTIO
#ifdef FASTIO
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
//#define scanf abcabc
//#define printf abcabc
#endif
//#ifndef FASTIO
//#define cin abcabc
//#define cout abcabc
//#endif
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double mw = w / 2, mh = h / 2, f = 0, ans = w * h / 2.0;
if (x == mw && y == mh)
f = 1;
cout << ans << " " << f << endl;
return 0;
} | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#define mst(a, b) memset(a, b, sizeof(a))
#define repi(a, b) for (int i = a; i < b; i++)
#define repj(a, b) for (int j = a; j < b; j++)
#define pii pair<int, int>
#ifdef LOCAL
#define fre() freopen("in.txt", "r", stdin)
#endif
#ifndef LOCAL
#define fre()
#endif
// static int x = []() {
// std::ios::sync_with_stdio(false);
// std::cin.tie(NULL);
// return 0;
//}();
#define FASTIO
#ifdef FASTIO
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
//#define scanf abcabc
//#define printf abcabc
#endif
//#ifndef FASTIO
//#define cin abcabc
//#define cout abcabc
//#endif
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double mw = w / 2.0, mh = h / 2.0, f = 0, ans = w * h / 2.0;
if (x == mw && y == mh)
f = 1;
cout << ans << " " << f << endl;
return 0;
} | [
"variable_declaration.type.primitive.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,915 | 816,916 | u401146093 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
int ishalf = (x * 2 == w & y * 2 == h) ? 1 : 0;
double ret = w * h / 2;
cout << ret << " " << ishalf << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
int ishalf = (x * 2 == w && y * 2 == h) ? 1 : 0;
double ret = w * h / 2.0;
cout << ret << " " << ishalf << endl;
return 0;
} | [
"variable_declaration.type.primitive.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"literal.number.change"
] | 816,925 | 816,924 | u343441882 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
int a;
if (2 * x == w && 2 * y == h)
a = 1;
else
a = 0;
cout << ((double)(w * h)) / 2.0 << " " << 0 << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
int a;
if (2 * x == w && 2 * y == h)
a = 1;
else
a = 0;
cout << ((double)(w) * (double(h))) / 2.0 << " " << a << endl;
return 0;
}
| [
"call.arguments.change",
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 816,928 | 816,929 | u054798759 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
int a;
if (2 * x == w && 2 * y == h)
a = 1;
else
a = 0;
cout << ((double)(w * h)) / 2.0 << " " << 1 << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
int a;
if (2 * x == w && 2 * y == h)
a = 1;
else
a = 0;
cout << ((double)(w) * (double(h))) / 2.0 << " " << a << endl;
return 0;
}
| [
"call.arguments.change",
"identifier.replace.add",
"literal.replace.remove",
"io.output.change"
] | 816,930 | 816,929 | u054798759 | cpp |
p03001 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int W, H, x, y;
cin >> W >> H >> x >> y;
if (W / 2.0 == x && H / 2.0 == y) {
printf("%f", W * H / 2.0);
printf(" 0\n");
} else {
printf("%f", W * H / 2.0);
printf(" 1\n");
}
} | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
double W, H, x, y;
cin >> W >> H >> x >> y;
if (W / 2.0 == x && H / 2.0 == y) {
printf("%f", W * H / 2.0);
printf(" 1\r");
} else {
printf("%f", W * H / 2.0);
printf(" 0\r");
}
} | [
"variable_declaration.type.primitive.change",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.remove"
] | 816,934 | 816,935 | u065375429 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
ll W, H;
cin >> W >> H;
ll x, y;
cin >> x >> y;
double half = (W * H) / 2;
double half_x = W / 2;
double half_y = H / 2;
bool flag = false;
if (x == half_x && y == half_y)
flag = true;
cout << half << " " << flag << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
double W, H;
cin >> W >> H;
ll x, y;
cin >> x >> y;
double half = (W * H) / 2;
double half_x = W / 2;
double half_y = H / 2;
bool flag = false;
if (x == half_x && y == half_y)
flag = true;
cout << half << " " << flag << endl;
}
| [
"variable_declaration.type.change"
] | 816,938 | 816,939 | u747087681 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
ll W, H;
cin >> W >> H;
ll x, y;
cin >> x >> y;
double half = (W * H) / 2;
double half_x = W / 2;
double half_y = H / 2;
bool flag = false;
if (x == half_x && y == half_y)
flag = true;
cout << half << " " << flag << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
int main() {
double W, H;
cin >> W >> H;
ll x, y;
cin >> x >> y;
double half = (W * H) / 2.00000;
double half_x = W / 2;
double half_y = H / 2;
bool flag = false;
if (x == half_x && y == half_y)
flag = true;
cout << half << " " << flag << endl;
}
| [
"variable_declaration.type.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,938 | 816,940 | u747087681 | cpp |
p03001 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
typedef long long LL;
typedef unsigned long long ULL;
using namespace std;
#define rep(i, n, x) for (int i = n; i < x; i++)
#define SORT(x) sort(x.begin(), x.end())
#define pb push_back
#define mp make_pair
int main() {
LL w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = w * h / 2.0;
int ans2 = 0;
if (x == w / 2 && y == h / 2) {
ans2 = 1;
}
cout << ans1 << " " << ans2 << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
typedef long long LL;
typedef unsigned long long ULL;
using namespace std;
#define rep(i, n, x) for (int i = n; i < x; i++)
#define SORT(x) sort(x.begin(), x.end())
#define pb push_back
#define mp make_pair
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = w * h / 2.0;
int ans2 = 0;
if (x == w / 2 && y == h / 2) {
ans2 = 1;
}
cout << ans1 << " " << ans2 << endl;
return 0;
}
| [
"variable_declaration.type.change"
] | 816,941 | 816,942 | u526854325 | cpp |
p03001 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
typedef long long LL;
typedef unsigned long long ULL;
using namespace std;
#define rep(i, n, x) for (int i = n; i < x; i++)
#define SORT(x) sort(x.begin(), x.end())
#define pb push_back
#define mp make_pair
int main() {
LL w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = w * h / 2;
int ans2 = 0;
if (x == w / 2 && y == h / 2) {
ans2 = 1;
}
cout << ans1 << " " << ans2 << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
typedef long long LL;
typedef unsigned long long ULL;
using namespace std;
#define rep(i, n, x) for (int i = n; i < x; i++)
#define SORT(x) sort(x.begin(), x.end())
#define pb push_back
#define mp make_pair
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = w * h / 2.0;
int ans2 = 0;
if (x == w / 2 && y == h / 2) {
ans2 = 1;
}
cout << ans1 << " " << ans2 << endl;
return 0;
}
| [
"variable_declaration.type.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,943 | 816,942 | u526854325 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h;
int x, y, c;
cin >> w >> h >> x >> y;
double area = (w * h) / 2.00000;
if (x == w / 2 & y == h / 2) {
c = 1;
} else {
c = 0;
}
cout << area << " " << c << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h;
int x, y, c;
cin >> w >> h >> x >> y;
double area = (w * h) / 2.00000;
if (x == w / 2 & y == h / 2) {
c = 1;
} else {
c = 0;
}
cout << area << " " << c << endl;
}
| [
"variable_declaration.type.primitive.change"
] | 816,944 | 816,945 | u072080927 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
#define ll long long
ll w, h, x, y, ret = 0;
long double ans;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> w >> h >> x >> y;
if (w == x * 2 && h == y * 2)
ret = 1;
ans = w * h / 2;
cout << fixed << setprecision(6) << ans << ' ' << ret;
return 0;
}
| #include "bits/stdc++.h"
using namespace std;
#define ll long long
ll w, h, x, y, ret = 0;
long double ans;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> w >> h >> x >> y;
if (w == x * 2 && h == y * 2)
ret = 1;
ans = double(w * h) / 2.0;
cout << fixed << setprecision(6) << ans << ' ' << ret;
return 0;
}
| [
"call.add",
"call.arguments.change",
"literal.number.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 816,950 | 816,951 | u870610226 | cpp |
p03001 | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (long(i) = 0; (i) < (long)(n); (i)++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep(i, a, b) for (long i = (a); i < (b); i++)
#define rrep1(i, a, b) for (long i = (a); i <= (b); i++)
#define rrrep(i, a, b) for (long i = (a); i >= (b); i--)
#define define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define X first
#define Y second
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vector<int>>
#define vpl vector<pair<long, long>>
#define vppl vector<pair<long, pair<long, long>>>
const int INF = 100100100;
const long LONG_INF = 2147483647;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const ll LINF = 1e18;
int pow(int x) {
if (x == 0) {
return 1;
} else {
return pow(x - 1) * 2;
}
}
int main(int argc, char const *argv[]) {
cin.tie(0);
ios::sync_with_stdio(false);
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;
}
| #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (long(i) = 0; (i) < (long)(n); (i)++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep(i, a, b) for (long i = (a); i < (b); i++)
#define rrep1(i, a, b) for (long i = (a); i <= (b); i++)
#define rrrep(i, a, b) for (long i = (a); i >= (b); i--)
#define define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define X first
#define Y second
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vector<int>>
#define vpl vector<pair<long, long>>
#define vppl vector<pair<long, pair<long, long>>>
const int INF = 100100100;
const long LONG_INF = 2147483647;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const ll LINF = 1e18;
int pow(int x) {
if (x == 0) {
return 1;
} else {
return pow(x - 1) * 2;
}
}
int main(int argc, char const *argv[]) {
cin.tie(0);
ios::sync_with_stdio(false);
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;
}
| [
"io.output.change"
] | 816,958 | 816,959 | u060896757 | cpp |
p03001 | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (long(i) = 0; (i) < (long)(n); (i)++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep(i, a, b) for (long i = (a); i < (b); i++)
#define rrep1(i, a, b) for (long i = (a); i <= (b); i++)
#define rrrep(i, a, b) for (long i = (a); i >= (b); i--)
#define define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define X first
#define Y second
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vector<int>>
#define vpl vector<pair<long, long>>
#define vppl vector<pair<long, pair<long, long>>>
const int INF = 100100100;
const long LONG_INF = 2147483647;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const ll LINF = 1e18;
int pow(int x) {
if (x == 0) {
return 1;
} else {
return pow(x - 1) * 2;
}
}
int main(int argc, char const *argv[]) {
cin.tie(0);
ios::sync_with_stdio(false);
ll 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 <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (long(i) = 0; (i) < (long)(n); (i)++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep(i, a, b) for (long i = (a); i < (b); i++)
#define rrep1(i, a, b) for (long i = (a); i <= (b); i++)
#define rrrep(i, a, b) for (long i = (a); i >= (b); i--)
#define define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define X first
#define Y second
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vector<int>>
#define vpl vector<pair<long, long>>
#define vppl vector<pair<long, pair<long, long>>>
const int INF = 100100100;
const long LONG_INF = 2147483647;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const ll LINF = 1e18;
int pow(int x) {
if (x == 0) {
return 1;
} else {
return pow(x - 1) * 2;
}
}
int main(int argc, char const *argv[]) {
cin.tie(0);
ios::sync_with_stdio(false);
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.change"
] | 816,960 | 816,959 | u060896757 | cpp |
p03001 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
#define ll long long
typedef pair<int, int> P;
int main(void) {
ll w, h, x, y;
cin >> w >> h >> x >> y;
printf("%.9f ", double(w * h / 2));
if (w == 2 * x and h == 2 * y) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
#define ll long long
typedef pair<int, int> P;
int main(void) {
ll w, h, x, y;
cin >> w >> h >> x >> y;
printf("%.10f ", double(w * h / 2.0));
if (w == 2 * x and h == 2 * y) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,961 | 816,962 | u030848580 | cpp |
p03001 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
#define ll long long
typedef pair<int, int> P;
int main(void) {
int w, h, x, y;
cin >> w >> h >> x >> y;
printf("%.9f ", double(w * h / 2));
if (w == 2 * x and h == 2 * y) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
#define ll long long
typedef pair<int, int> P;
int main(void) {
ll w, h, x, y;
cin >> w >> h >> x >> y;
printf("%.10f ", double(w * h / 2.0));
if (w == 2 * x and h == 2 * y) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.change",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"literal.number.change",
"expression.operation.binary.change"
] | 816,963 | 816,962 | u030848580 | cpp |
p03001 | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int out = 0;
double S;
S = (double)((W * H) / 2);
if ((W % 2) == 0) {
if ((H % 2) == 0) {
if ((W / 2) == x) {
if ((H / 2) == y) {
out = 1;
}
}
}
}
cout << std::setprecision(10) << S << " " << out;
} | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int out = 0;
double S;
S = ((double)(W)*H) / 2;
if ((W % 2) == 0) {
if ((H % 2) == 0) {
if ((W / 2) == x) {
if ((H / 2) == y) {
out = 1;
}
}
}
}
cout << std::setprecision(10) << S << " " << out;
}
| [] | 816,966 | 816,967 | u431602218 | cpp |
p03001 | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int out = 0;
double S;
S = (W * H) / 2;
if ((W % 2) == 0) {
if ((H % 2) == 0) {
if ((W / 2) == x) {
if ((H / 2) == y) {
out = 1;
}
}
}
}
cout << std::setprecision(10) << S << " " << out;
} | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int out = 0;
double S;
S = ((double)(W)*H) / 2;
if ((W % 2) == 0) {
if ((H % 2) == 0) {
if ((W / 2) == x) {
if ((H / 2) == y) {
out = 1;
}
}
}
}
cout << std::setprecision(10) << S << " " << out;
}
| [
"type_conversion.add"
] | 816,968 | 816,967 | u431602218 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double S = W * H / 2;
if (x == W / 2 && y == H / 2)
cout << S << " " << 1 << endl;
else
cout << S << " " << 0 << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double S = (W * H) / 2;
if (x == W / 2 && y == H / 2)
cout << S << " " << 1 << endl;
else
cout << S << " " << 0 << endl;
} | [
"variable_declaration.type.primitive.change"
] | 816,969 | 816,970 | u717501752 | cpp |
p03001 | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
#define all(x) x.begin(), x.end()
#define ff first
#define ss second
#define ll long long
#define MOD 1000000007
#define INF 1000000000000000000
#define rnd mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define FIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
using namespace std;
// Read the question carefully and see all the given sample tests
// Think about the correctness before implementing
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double ans = (W * H) / 2.0;
printf("%.10lf %d", ans, (x == W / 2 && y == H / 2));
}
| #include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
#define all(x) x.begin(), x.end()
#define ff first
#define ss second
#define ll long long
#define MOD 1000000007
#define INF 1000000000000000000
#define rnd mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define FIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
using namespace std;
// Read the question carefully and see all the given sample tests
// Think about the correctness before implementing
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = (W * H) / 2.0;
printf("%.10lf %d", ans, (x == W / 2 && y == H / 2));
}
| [
"variable_declaration.type.change"
] | 816,973 | 816,974 | u702496216 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
const ll LINF = 1ll << 55;
const ll INF = 0x3f3f3f3f;
const ll MOD = 1e9 + 7;
const int MAXN = 1e5 + 10;
const ll dx[] = {1, 0, -1, 0};
const ll dy[] = {0, 1, 0, -1};
/// cin/cout overloading
template <typename T> ostream &operator<<(ostream &out, vector<T> &vec) {
for (auto it = vec.begin(); it != vec.end(); ++it) {
out << *it << " ";
}
return out;
}
template <typename T> ostream &operator<<(ostream &out, pair<T, T> &P) {
out << P.first << " " << P.second;
return out;
}
template <typename T> istream &operator>>(istream &in, vector<T> &vec) {
for (auto it = vec.begin(); it != vec.end(); ++it) {
in >> *it;
}
return in;
}
template <typename T> istream &operator>>(istream &in, pair<T, T> &P) {
in >> P.first >> P.second;
return in;
}
/// 图相关
ll N, M;
//
// struct Edge {
// ll to;
// ll weight;
// ll next;
// bool operator<(const Edge& rhs) {
// return weight < rhs.weight;
// }
// };
struct Edge2 {
ll u, v, w;
Edge2(ll u_, ll v_, ll w_) : u(u_), v(v_), w(w_) {}
Edge2() : u(0ll), v(0ll), w(0ll) {}
bool operator<(const Edge2 &rhs) { return w < rhs.w; }
};
// vector<Edge> edges(MAXN);
// vector<ll> head(MAXN, -1);
// vector<int> matchingx(MAXN, -1);
// vector<int> matchingy(MAXN, -1);
// vector<bool> check(MAXN);
// vector<ll> dis(MAXN);
// vector<bool> vis(MAXN, false);
//
// ll cnt = 1;
//
// void addEdge(ll from, ll to, ll weight) {
// edges[cnt].to = to;
// edges[cnt].weight = weight;
// edges[cnt].next = head[from];
// head[from] = cnt++;
//}
//
// bool dfs(int u) {
// for (int i = head[u]; i != -1; i = edges[i].next) {
// int v = edges[i].to;
// if (!check[v]) {
// check[v] = true;
// if (matchingy[v] == -1 || dfs(matchingy[v])) {
// matchingy[v] = u;
// matchingx[u] = v;
// return true;
// }
// }
// }
// return false;
//}
//
// int hungarian() {
// int ans = 0;
// fill(matchingx.begin(), matchingx.end(), -1);
// fill(matchingy.begin(), matchingy.end(), -1);
// for (int u = 1; u <= N; ++u) {
//// if (matchingx[u] == -1) {
// {
// fill(check.begin(), check.end(), false);
// if (dfs(u)) {
// ++ans;
// }
// }
// }
// return ans;
//}
//
// void dijkstra(const ll s) {
// priority_queue<P, vector<P>, greater<P>> que;
// fill(dis.begin(), dis.end(), INF);
// dis[s] = 0;
// que.push(P(0, s));
//////multiple sources
//// for (auto& x : shops) {
//// dis[x] = 0;
//// que.push(P(0, x));
//// }
// while (!que.empty()) {
// P p = que.top();
// que.pop();
//// cout << "pop " << p.second << endl;
// int u = p.second;
// if (dis[u] < p.first) continue;
// for (int i = head[u]; i != -1; i = edges[i].next) {
// int v = edges[i].to;
// if (dis[v] > dis[u] + edges[i].weight) {
// dis[v] = dis[u] + edges[i].weight;
//// cout << "push " << v << endl;
// que.push(P(dis[v], v));
// }
// }
// }
//}
// void zeroOneBFS(const int s) {
// deque<P> que;
// fill(dis.begin(), dis.end(), INF);
// dis[s] = 0;
// que.push_front(P(0, s));
// while (!que.empty()) {
// P p = que.front();
// que.pop_front();
// int u = p.second;
// if (dis[u] < p.first) continue;
// for (int i = head[u]; i != -1; i = edges[i].next) {
// int v = edges[i].to;
// if (dis[v] > dis[u] + edges[i].weight) {
// dis[v] = dis[u] + edges[i].weight;
// if (edges[i].weight) {
// que.push_back(P(dis[v], v));
// } else {
// que.push_front(P(dis[v], v));
// }
// }
// }
// }
//}
// Union-Find 并查集
class UnionFind {
vector<ll> par;
public:
explicit UnionFind(ll n) : par(n, -1) {}
ll root(ll a) {
if (par[a] < 0) {
return a;
}
return par[a] = root(par[a]);
}
ll size(ll a) { return -par[root(a)]; }
void unite(ll a, ll b) {
a = root(a);
b = root(b);
if (a != b) {
if (size(a) < size(b)) {
swap(a, b);
}
par[a] += par[b];
par[b] = a;
}
}
};
ll kruskal(vector<Edge2> &edges2, const ll V) {
sort(edges2.begin(), edges2.end());
UnionFind uf(V + 10);
ll res = 0;
Edge2 e;
for (int i = 0; i < edges2.size(); ++i) {
e = edges2[i];
if (uf.root(e.u) != uf.root(e.v)) {
uf.unite(e.u, e.v);
res += e.w;
}
}
return res;
}
/// 线段树
// struct SegmentTreeNode {
// ll maxVal;
// ll minVal;
// ll sum;
// ll len;
// ll lazy;
// ll left, right;
// SegmentTreeNode() {}
//};
//
// class SegmentTree {
// public:
// explicit SegmentTree(size_t size, const vll& nums) : tree(size << 2),
// nums(nums) {
//
// }
// void build(ll root, ll left, ll right) {
// tree[root].lazy = 0;
// tree[root].left = left;
// tree[root].right = right;
// tree[root].len = right - left + 1;
// if (left == right) {
// tree[root].maxVal = nums[left];
// tree[root].minVal = nums[left];
// tree[root].sum = nums[left];
// } else {
// ll mid = (right - left) / 2 + left;
// build(root * 2, left, mid);
// build(root * 2 + 1, mid + 1, right);
// tree[root].minVal = min(tree[root * 2].minVal, tree[root * 2 +
// 1].minVal); tree[root].maxVal = max(tree[root * 2].maxVal,
// tree[root * 2 + 1].maxVal); tree[root].sum = tree[root * 2].sum +
// tree[root * 2 + 1].sum;
// }
// }
//
// void pushup(ll root) {
// tree[root].minVal = min(tree[root * 2].minVal, tree[root * 2 +
// 1].minVal); tree[root].maxVal = max(tree[root * 2].maxVal, tree[root *
// 2 + 1].maxVal); tree[root].sum = tree[root * 2].sum + tree[root * 2 +
// 1].sum;
// }
////// add single node val
// void add(ll root, ll id, ll addVal) {
// if (tree[root].left == tree[root].right) {
// tree[root].maxVal += addVal;
// tree[root].minVal += addVal;
// tree[root].sum += addVal;
// return;
// }
// ll mid = (tree[root].right - tree[root].left) / 2 + tree[root].left;
// if (id <= mid) {
// add(root * 2, id, addVal);
// } else {
// add(root * 2 + 1, id, addVal);
// }
// pushup(root);
// }
//
// void pushdown(ll root) {
// if (tree[root].lazy) {
// tree[root * 2].lazy += tree[root].lazy;
// tree[root * 2 + 1].lazy += tree[root].lazy;
// tree[root * 2].sum += tree[root * 2].len * tree[root].lazy;
// tree[root * 2 + 1].sum += tree[root * 2 + 1].len *
// tree[root].lazy; tree[root * 2].maxVal += tree[root].lazy;
// tree[root * 2 + 1].maxVal += tree[root].lazy;
// tree[root * 2].minVal += tree[root].lazy;
// tree[root * 2 + 1].minVal += tree[root].lazy;
// tree[root].lazy = 0;
// }
// }
// //// query range sum
// ll querySum(ll root, ll left, ll right) {
// if (tree[root].left >= left && tree[root].right <= right) {
// return tree[root].sum;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return 0;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// return querySum(root * 2, left, right) + querySum(root * 2 + 1, left,
// right);
// }
// //// query range max/min
// ll queryMax(ll root, ll left, ll right) {
// if (tree[root].left >= left && tree[root].right <= right) {
// return tree[root].maxVal;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return -INF;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// return max(queryMax(root * 2, left, right), queryMax(root * 2 + 1,
// left, right));
// }
//
// ll queryMin(ll root, ll left, ll right) {
// if (tree[root].left >= left && tree[root].right <= right) {
// return tree[root].minVal;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return INF;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// return min(queryMin(root * 2, left, right), queryMin(root * 2 + 1,
// left, right));
// }
// //// add range val
// void update(ll root, ll left, ll right, ll addVal) {
// if (tree[root].left >= left && tree[root].right <= right) {
// tree[root].lazy += addVal;
// tree[root].sum += tree[root].len * addVal;
// tree[root].maxVal += addVal;
// tree[root].minVal += addVal;
// return;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// update(root * 2, left, right, addVal);
// update(root * 2 + 1, left, right, addVal);
// pushup(root);
// }
//
//
// private:
// vector<SegmentTreeNode> tree;
// const vll &nums;
//};
/// 组合数
////約数求める //約数
// void divisor(ll n, vector<ll> &ret) {
// for (ll i = 1; i * i <= n; i++) {
// if (n % i == 0) {
// ret.push_back(i);
// if (i * i != n) ret.push_back(n / i);
// }
// }
// sort(ret.begin(), ret.end());
//}
////階乗
// ll factorial(ll n, ll mod) {
// ll ret = 1;
// for (ll i = 1; i <= n; i++) {
// ret = (ret * i) % mod;
// }
// return ret;
//}
////モジュラ逆数
// ll inv_mod(ll n, ll mod) {
// ll a = n % mod, b = mod - 2, ret = 1;
// while (b > 0) {
// if (b & 1) ret = (ret * a) % mod;
// a = (a * a) % mod;
// b >>= 1;
// }
// return ret;
//}
//
// ll nPr(ll n, ll r, ll mod) {
// ll ret = 1;
// for (ll i = n; i >= n - r + 1; i--) {
// ret = ret * (i % mod) % mod;
// }
// return ret;
//}
//
// ll nCr(ll n, ll r, ll mod) {
// return nPr(n, r, mod) * inv_mod(factorial(r, mod), mod) % mod;
//}
//
// vll F(MAXN), Finv(MAXN), inv(MAXN);
//
// ll pow_mod(ll a, ll b, ll p) {
// ll ret = 1;
// while (b) {
// if (b & 1) ret = (ret * a) % p;
// a = (a * a) % p;
// b >>= 1;
// }
// return ret;
//}
//
// void comb_init() {
// inv[1] = 1;
// for (int i = 2; i < MAXN; ++i) {
// inv[i] = (MOD - MOD / i) * 1ll * inv[MOD % i] % MOD;
// }
// F[0] = Finv[0] = 1;
// for (int i = 1; i < MAXN; ++i) {
// F[i] = F[i-1] * 1ll * i % MOD;
// Finv[i] = Finv[i-1] * 1ll * inv[i] % MOD;
// }
//}
//
// inline ll comb(ll n, ll m) {
// if (m < 0 || m > n) return 0;
// return F[n] * 1ll * Finv[n - m] % MOD * Finv[m] % MOD;
//}
//
inline ll add_mod(ll a, ll b) { return (a + b) % MOD; }
inline ll mul_mod(ll a, ll b) { return a * b % MOD; }
inline ll sub_mod(ll a, ll b) { return (a + MOD - b) % MOD; }
/// main函数
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double area = floor(W * H / 2.0);
int flag = 0;
if (W % 2 == 0 && x == W / 2 && H % 2 == 0 && y == H / 2) {
flag = 1;
}
printf("%.10lf %d\n", area, flag);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
const ll LINF = 1ll << 55;
const ll INF = 0x3f3f3f3f;
const ll MOD = 1e9 + 7;
const int MAXN = 1e5 + 10;
const ll dx[] = {1, 0, -1, 0};
const ll dy[] = {0, 1, 0, -1};
/// cin/cout overloading
template <typename T> ostream &operator<<(ostream &out, vector<T> &vec) {
for (auto it = vec.begin(); it != vec.end(); ++it) {
out << *it << " ";
}
return out;
}
template <typename T> ostream &operator<<(ostream &out, pair<T, T> &P) {
out << P.first << " " << P.second;
return out;
}
template <typename T> istream &operator>>(istream &in, vector<T> &vec) {
for (auto it = vec.begin(); it != vec.end(); ++it) {
in >> *it;
}
return in;
}
template <typename T> istream &operator>>(istream &in, pair<T, T> &P) {
in >> P.first >> P.second;
return in;
}
/// 图相关
ll N, M;
//
// struct Edge {
// ll to;
// ll weight;
// ll next;
// bool operator<(const Edge& rhs) {
// return weight < rhs.weight;
// }
// };
struct Edge2 {
ll u, v, w;
Edge2(ll u_, ll v_, ll w_) : u(u_), v(v_), w(w_) {}
Edge2() : u(0ll), v(0ll), w(0ll) {}
bool operator<(const Edge2 &rhs) { return w < rhs.w; }
};
// vector<Edge> edges(MAXN);
// vector<ll> head(MAXN, -1);
// vector<int> matchingx(MAXN, -1);
// vector<int> matchingy(MAXN, -1);
// vector<bool> check(MAXN);
// vector<ll> dis(MAXN);
// vector<bool> vis(MAXN, false);
//
// ll cnt = 1;
//
// void addEdge(ll from, ll to, ll weight) {
// edges[cnt].to = to;
// edges[cnt].weight = weight;
// edges[cnt].next = head[from];
// head[from] = cnt++;
//}
//
// bool dfs(int u) {
// for (int i = head[u]; i != -1; i = edges[i].next) {
// int v = edges[i].to;
// if (!check[v]) {
// check[v] = true;
// if (matchingy[v] == -1 || dfs(matchingy[v])) {
// matchingy[v] = u;
// matchingx[u] = v;
// return true;
// }
// }
// }
// return false;
//}
//
// int hungarian() {
// int ans = 0;
// fill(matchingx.begin(), matchingx.end(), -1);
// fill(matchingy.begin(), matchingy.end(), -1);
// for (int u = 1; u <= N; ++u) {
//// if (matchingx[u] == -1) {
// {
// fill(check.begin(), check.end(), false);
// if (dfs(u)) {
// ++ans;
// }
// }
// }
// return ans;
//}
//
// void dijkstra(const ll s) {
// priority_queue<P, vector<P>, greater<P>> que;
// fill(dis.begin(), dis.end(), INF);
// dis[s] = 0;
// que.push(P(0, s));
//////multiple sources
//// for (auto& x : shops) {
//// dis[x] = 0;
//// que.push(P(0, x));
//// }
// while (!que.empty()) {
// P p = que.top();
// que.pop();
//// cout << "pop " << p.second << endl;
// int u = p.second;
// if (dis[u] < p.first) continue;
// for (int i = head[u]; i != -1; i = edges[i].next) {
// int v = edges[i].to;
// if (dis[v] > dis[u] + edges[i].weight) {
// dis[v] = dis[u] + edges[i].weight;
//// cout << "push " << v << endl;
// que.push(P(dis[v], v));
// }
// }
// }
//}
// void zeroOneBFS(const int s) {
// deque<P> que;
// fill(dis.begin(), dis.end(), INF);
// dis[s] = 0;
// que.push_front(P(0, s));
// while (!que.empty()) {
// P p = que.front();
// que.pop_front();
// int u = p.second;
// if (dis[u] < p.first) continue;
// for (int i = head[u]; i != -1; i = edges[i].next) {
// int v = edges[i].to;
// if (dis[v] > dis[u] + edges[i].weight) {
// dis[v] = dis[u] + edges[i].weight;
// if (edges[i].weight) {
// que.push_back(P(dis[v], v));
// } else {
// que.push_front(P(dis[v], v));
// }
// }
// }
// }
//}
// Union-Find 并查集
class UnionFind {
vector<ll> par;
public:
explicit UnionFind(ll n) : par(n, -1) {}
ll root(ll a) {
if (par[a] < 0) {
return a;
}
return par[a] = root(par[a]);
}
ll size(ll a) { return -par[root(a)]; }
void unite(ll a, ll b) {
a = root(a);
b = root(b);
if (a != b) {
if (size(a) < size(b)) {
swap(a, b);
}
par[a] += par[b];
par[b] = a;
}
}
};
ll kruskal(vector<Edge2> &edges2, const ll V) {
sort(edges2.begin(), edges2.end());
UnionFind uf(V + 10);
ll res = 0;
Edge2 e;
for (int i = 0; i < edges2.size(); ++i) {
e = edges2[i];
if (uf.root(e.u) != uf.root(e.v)) {
uf.unite(e.u, e.v);
res += e.w;
}
}
return res;
}
/// 线段树
// struct SegmentTreeNode {
// ll maxVal;
// ll minVal;
// ll sum;
// ll len;
// ll lazy;
// ll left, right;
// SegmentTreeNode() {}
//};
//
// class SegmentTree {
// public:
// explicit SegmentTree(size_t size, const vll& nums) : tree(size << 2),
// nums(nums) {
//
// }
// void build(ll root, ll left, ll right) {
// tree[root].lazy = 0;
// tree[root].left = left;
// tree[root].right = right;
// tree[root].len = right - left + 1;
// if (left == right) {
// tree[root].maxVal = nums[left];
// tree[root].minVal = nums[left];
// tree[root].sum = nums[left];
// } else {
// ll mid = (right - left) / 2 + left;
// build(root * 2, left, mid);
// build(root * 2 + 1, mid + 1, right);
// tree[root].minVal = min(tree[root * 2].minVal, tree[root * 2 +
// 1].minVal); tree[root].maxVal = max(tree[root * 2].maxVal,
// tree[root * 2 + 1].maxVal); tree[root].sum = tree[root * 2].sum +
// tree[root * 2 + 1].sum;
// }
// }
//
// void pushup(ll root) {
// tree[root].minVal = min(tree[root * 2].minVal, tree[root * 2 +
// 1].minVal); tree[root].maxVal = max(tree[root * 2].maxVal, tree[root *
// 2 + 1].maxVal); tree[root].sum = tree[root * 2].sum + tree[root * 2 +
// 1].sum;
// }
////// add single node val
// void add(ll root, ll id, ll addVal) {
// if (tree[root].left == tree[root].right) {
// tree[root].maxVal += addVal;
// tree[root].minVal += addVal;
// tree[root].sum += addVal;
// return;
// }
// ll mid = (tree[root].right - tree[root].left) / 2 + tree[root].left;
// if (id <= mid) {
// add(root * 2, id, addVal);
// } else {
// add(root * 2 + 1, id, addVal);
// }
// pushup(root);
// }
//
// void pushdown(ll root) {
// if (tree[root].lazy) {
// tree[root * 2].lazy += tree[root].lazy;
// tree[root * 2 + 1].lazy += tree[root].lazy;
// tree[root * 2].sum += tree[root * 2].len * tree[root].lazy;
// tree[root * 2 + 1].sum += tree[root * 2 + 1].len *
// tree[root].lazy; tree[root * 2].maxVal += tree[root].lazy;
// tree[root * 2 + 1].maxVal += tree[root].lazy;
// tree[root * 2].minVal += tree[root].lazy;
// tree[root * 2 + 1].minVal += tree[root].lazy;
// tree[root].lazy = 0;
// }
// }
// //// query range sum
// ll querySum(ll root, ll left, ll right) {
// if (tree[root].left >= left && tree[root].right <= right) {
// return tree[root].sum;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return 0;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// return querySum(root * 2, left, right) + querySum(root * 2 + 1, left,
// right);
// }
// //// query range max/min
// ll queryMax(ll root, ll left, ll right) {
// if (tree[root].left >= left && tree[root].right <= right) {
// return tree[root].maxVal;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return -INF;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// return max(queryMax(root * 2, left, right), queryMax(root * 2 + 1,
// left, right));
// }
//
// ll queryMin(ll root, ll left, ll right) {
// if (tree[root].left >= left && tree[root].right <= right) {
// return tree[root].minVal;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return INF;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// return min(queryMin(root * 2, left, right), queryMin(root * 2 + 1,
// left, right));
// }
// //// add range val
// void update(ll root, ll left, ll right, ll addVal) {
// if (tree[root].left >= left && tree[root].right <= right) {
// tree[root].lazy += addVal;
// tree[root].sum += tree[root].len * addVal;
// tree[root].maxVal += addVal;
// tree[root].minVal += addVal;
// return;
// }
// if (tree[root].left > right || tree[root].right < left) {
// return;
// }
// if (tree[root].lazy) {
// pushdown(root);
// }
// update(root * 2, left, right, addVal);
// update(root * 2 + 1, left, right, addVal);
// pushup(root);
// }
//
//
// private:
// vector<SegmentTreeNode> tree;
// const vll &nums;
//};
/// 组合数
////約数求める //約数
// void divisor(ll n, vector<ll> &ret) {
// for (ll i = 1; i * i <= n; i++) {
// if (n % i == 0) {
// ret.push_back(i);
// if (i * i != n) ret.push_back(n / i);
// }
// }
// sort(ret.begin(), ret.end());
//}
////階乗
// ll factorial(ll n, ll mod) {
// ll ret = 1;
// for (ll i = 1; i <= n; i++) {
// ret = (ret * i) % mod;
// }
// return ret;
//}
////モジュラ逆数
// ll inv_mod(ll n, ll mod) {
// ll a = n % mod, b = mod - 2, ret = 1;
// while (b > 0) {
// if (b & 1) ret = (ret * a) % mod;
// a = (a * a) % mod;
// b >>= 1;
// }
// return ret;
//}
//
// ll nPr(ll n, ll r, ll mod) {
// ll ret = 1;
// for (ll i = n; i >= n - r + 1; i--) {
// ret = ret * (i % mod) % mod;
// }
// return ret;
//}
//
// ll nCr(ll n, ll r, ll mod) {
// return nPr(n, r, mod) * inv_mod(factorial(r, mod), mod) % mod;
//}
//
// vll F(MAXN), Finv(MAXN), inv(MAXN);
//
// ll pow_mod(ll a, ll b, ll p) {
// ll ret = 1;
// while (b) {
// if (b & 1) ret = (ret * a) % p;
// a = (a * a) % p;
// b >>= 1;
// }
// return ret;
//}
//
// void comb_init() {
// inv[1] = 1;
// for (int i = 2; i < MAXN; ++i) {
// inv[i] = (MOD - MOD / i) * 1ll * inv[MOD % i] % MOD;
// }
// F[0] = Finv[0] = 1;
// for (int i = 1; i < MAXN; ++i) {
// F[i] = F[i-1] * 1ll * i % MOD;
// Finv[i] = Finv[i-1] * 1ll * inv[i] % MOD;
// }
//}
//
// inline ll comb(ll n, ll m) {
// if (m < 0 || m > n) return 0;
// return F[n] * 1ll * Finv[n - m] % MOD * Finv[m] % MOD;
//}
//
inline ll add_mod(ll a, ll b) { return (a + b) % MOD; }
inline ll mul_mod(ll a, ll b) { return a * b % MOD; }
inline ll sub_mod(ll a, ll b) { return (a + MOD - b) % MOD; }
/// main函数
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double area = W * H / 2.0;
int flag = 0;
if (W % 2 == 0 && x == W / 2 && H % 2 == 0 && y == H / 2) {
flag = 1;
}
printf("%.10lf %d\n", area, flag);
return 0;
} | [
"call.remove",
"call.arguments.change"
] | 816,975 | 816,976 | u666721654 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 200;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
const int INF = 0x3f3f3f;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double sum = w * h / 2;
printf("%.6lf ", sum);
if (w % 2 == 0 && h % 2 == 0) {
if (x == w / 2 && y == h / 2) {
cout << 1 << endl;
return 0;
}
}
cout << 0 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 200;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
const int INF = 0x3f3f3f;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double sum = 1.0 * w * h / 2;
printf("%.6lf ", sum);
if (w % 2 == 0 && h % 2 == 0) {
if (x == w / 2 && y == h / 2) {
cout << 1 << endl;
return 0;
}
}
cout << 0 << endl;
}
| [
"assignment.change"
] | 816,991 | 816,989 | u624688258 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 200;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
const int INF = 0x3f3f3f;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double sum = w * h / 2;
printf("%.6lf ", sum);
if (w % 2 == 0 && h % 2 == 0) {
if (x == w / 2 && y == h / 2) {
cout << 1 << endl;
return 0;
}
}
cout << 0 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 200;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
const int INF = 0x3f3f3f;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double sum = w / 2.0 * h;
printf("%.6lf ", sum);
if (w % 2 == 0 && h % 2 == 0) {
if (x == w / 2 && y == h / 2) {
cout << 1 << endl;
return 0;
}
}
cout << 0 << endl;
}
| [
"expression.operation.binary.remove"
] | 816,991 | 816,993 | u624688258 | cpp |
p03001 |
#include <algorithm>
#include <iostream>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#ifndef ULLONG
typedef unsigned long long ULLONG;
#endif
#ifndef LLONG
typedef long long LLONG;
#endif
static void C_task();
int main() {
C_task();
fflush(stdout);
return 0;
}
static void C_task() {
LLONG W, H, x, y;
scanf(" %lld %lld %lld %lld", &W, &H, &x, &y);
int pattern = 0;
double sq = (H * W) / 2.0;
if (((x == W / 2) && ((W % 2) == 0)) && ((y == H / 2) && ((H % 2) == 0)) &&
(H != 1) && (W != 1)) {
pattern = 1;
}
printf("%.6f, %d", sq, pattern);
}
| #include <algorithm>
#include <iostream>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#ifndef ULLONG
typedef unsigned long long ULLONG;
#endif
#ifndef LLONG
typedef long long LLONG;
#endif
static void C_task();
int main() {
C_task();
fflush(stdout);
return 0;
}
static void C_task() {
LLONG W, H, x, y;
scanf(" %lld %lld %lld %lld", &W, &H, &x, &y);
int pattern = 0;
double sq = (H * W) / 2.0;
if (((x == W / 2) && ((W % 2) == 0)) && ((y == H / 2) && ((H % 2) == 0)) &&
(H != 1) && (W != 1)) {
pattern = 1;
}
printf("%.6f %d", sq, pattern);
}
| [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,009 | 817,010 | u887675488 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
cout << W * H / 2 << " ";
if (x == W / 2 && y == H / 2)
cout << 0;
else
cout << 1;
} | #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",
"literal.number.change",
"io.output.change"
] | 817,026 | 817,027 | u314816992 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int 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"
] | 817,028 | 817,027 | u314816992 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int 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",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 817,029 | 817,027 | u314816992 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main() {
cin >> a >> b >> c >> d;
cout << (double)(a * b) / 2 << " " << ((a / 2 == c) && (b / 2 == d));
}
| #include <bits/stdc++.h>
using namespace std;
long double a, b, c, d;
int main() {
cin >> a >> b >> c >> d;
cout << (a * b) / 2 << " " << ((a / 2 == c) && (b / 2 == d));
}
| [
"variable_declaration.type.narrow.change",
"variable_declaration.type.widen.change"
] | 817,041 | 817,042 | u998677610 | cpp |
p03001 |
#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main() {
cin >> a >> b >> c >> d;
cout << (a * b) / 2 << " " << ((a / 2 == c) && (b / 2 == d));
}
| #include <bits/stdc++.h>
using namespace std;
long double a, b, c, d;
int main() {
cin >> a >> b >> c >> d;
cout << (a * b) / 2 << " " << ((a / 2 == c) && (b / 2 == d));
}
| [
"variable_declaration.type.narrow.change",
"variable_declaration.type.widen.change"
] | 817,043 | 817,042 | u998677610 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
double s;
cin >> W >> H >> x >> y;
s = W * H / 2;
cout << s << " ";
if (x == W / 2 && y == H / 2) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
double s;
// float s;
cin >> W >> H >> x >> y;
s = (W * H) / 2;
cout << s << " ";
if (x == W / 2 && y == H / 2) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 817,044 | 817,045 | u031598803 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
#define LL long long
LL N, M, K, r, t, a[100000], aa[100000];
LL W, H, x, y;
double ans;
string s, f;
int main() {
cin >> W >> H >> x >> y;
ans = W * H / 2;
if (x == W / 2 && y == H / 2) {
cout << fixed << setprecision(10) << ans << " " << 1 << endl;
} else {
cout << fixed << setprecision(10) << ans << " " << 0 << endl;
}
return 0;
}
| #include "bits/stdc++.h"
using namespace std;
#define LL long long
LL N, M, K, r, t, a[100000], aa[100000];
double W, H, x, y;
double ans;
string s, f;
int main() {
cin >> W >> H >> x >> y;
ans = W * H / 2;
if (x == W / 2 && y == H / 2) {
cout << fixed << setprecision(10) << ans << " " << 1 << endl;
} else {
cout << fixed << setprecision(10) << ans << " " << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.change"
] | 817,051 | 817,052 | u568682546 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
#define LL long long
LL N, M, K, r, t, a[100000], aa[100000];
LL W, H, x, y;
double ans;
string s, f;
int main() {
cin >> W >> H >> x >> y;
ans = float(W * H / 2);
if (x == W / 2 && y == H / 2) {
cout << fixed << setprecision(10) << ans << " " << 1 << endl;
} else {
cout << fixed << setprecision(10) << ans << " " << 0 << endl;
}
return 0;
}
| #include "bits/stdc++.h"
using namespace std;
#define LL long long
LL N, M, K, r, t, a[100000], aa[100000];
double W, H, x, y;
double ans;
string s, f;
int main() {
cin >> W >> H >> x >> y;
ans = W * H / 2;
if (x == W / 2 && y == H / 2) {
cout << fixed << setprecision(10) << ans << " " << 1 << endl;
} else {
cout << fixed << setprecision(10) << ans << " " << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.change",
"call.remove",
"call.arguments.change"
] | 817,053 | 817,052 | u568682546 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
#define LL long long
LL N, M, K, r, t, a[100000], aa[100000];
LL W, H, x, y;
float ans;
string s, f;
int main() {
cin >> W >> H >> x >> y;
ans = float(W * H / 2);
if (x == W / 2 && y == H / 2) {
cout << fixed << setprecision(10) << ans << " " << 1 << endl;
} else {
cout << fixed << setprecision(10) << ans << " " << 0 << endl;
}
return 0;
}
| #include "bits/stdc++.h"
using namespace std;
#define LL long long
LL N, M, K, r, t, a[100000], aa[100000];
double W, H, x, y;
double ans;
string s, f;
int main() {
cin >> W >> H >> x >> y;
ans = W * H / 2;
if (x == W / 2 && y == H / 2) {
cout << fixed << setprecision(10) << ans << " " << 1 << endl;
} else {
cout << fixed << setprecision(10) << ans << " " << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.change",
"variable_declaration.type.primitive.change",
"call.remove",
"call.arguments.change"
] | 817,054 | 817,052 | u568682546 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
float ans;
int a = 0;
if (x * 2 == W && y * 2 == H)
a = 1;
ans = W * H / 2;
cout << ans << ' ' << a << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans;
int a = 0;
if (x * 2 == W && y * 2 == H)
a = 1;
ans = W * H / 2;
cout << ans << ' ' << a << endl;
} | [
"variable_declaration.type.primitive.change"
] | 817,057 | 817,056 | u288905450 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
double s;
cin >> W >> H >> x >> y;
s = (double)W * (double)H / 2.0;
if (W % 2 == 0 && H % 2 == 0) {
if (W / 2 == x && H / 2 == y) {
cout << s << 1 << endl;
} else {
cout << s << " " << 0 << endl;
}
} else {
cout << s << " " << 0 << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, x, y;
double s;
cin >> W >> H >> x >> y;
s = (double)W * (double)H / 2.0;
if (W % 2 == 0 && H % 2 == 0) {
if (W / 2 == x && H / 2 == y) {
cout << s << " " << 1 << endl;
} else {
cout << s << " " << 0 << endl;
}
} else {
cout << s << " " << 0 << endl;
}
} | [
"io.output.change"
] | 817,058 | 817,059 | u507414360 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long W = 0, H = 0, x = 0, y = 0;
cin >> W >> H >> x >> y;
cout << W / 2 * H << " ";
if (x <= W / 2 && y <= H / 2) {
if (2 * x == W && 2 * y == H) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
} else {
cout << 0 << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long W = 0, H = 0, x = 0, y = 0;
cin >> W >> H >> x >> y;
cout << W / 2.0 * H << " ";
if (x <= W / 2 && y <= H / 2) {
if (2 * x == W && 2 * y == H) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
} else {
cout << 0 << endl;
}
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 817,062 | 817,063 | u883817875 | cpp |
p03001 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <climits>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> p;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
vector<long long> divisor(long long n) {
vector<long long> ret;
for (long long i = 1; i * i <= n; i++) {
if (n % i == 0) {
ret.push_back(i);
if (i * i != n)
ret.push_back(n / i);
}
}
sort(begin(ret), end(ret));
return (ret);
}
struct LazySegmentTree {
private:
int n;
vector<int> node, lazy;
vector<bool> lazyFlag;
public:
LazySegmentTree(vector<int> v) {
int sz = (int)v.size();
n = 1;
while (n < sz)
n *= 2;
node.resize(2 * n - 1);
lazy.resize(2 * n - 1, INT_MAX);
lazyFlag.resize(2 * n - 1, false);
for (int i = 0; i < sz; i++)
node[i + n - 1] = v[i];
for (int i = n - 2; i >= 0; i--)
node[i] = min(node[i * 2 + 1], node[i * 2 + 2]);
}
void lazyEvaluate(int k, int l, int r) {
if (lazyFlag[k]) {
node[k] = lazy[k];
if (r - l > 1) {
lazy[k * 2 + 1] = lazy[k * 2 + 2] = lazy[k];
lazyFlag[k * 2 + 1] = lazyFlag[k * 2 + 2] = true;
}
lazyFlag[k] = false;
}
}
void update(int a, int b, int x, int k = 0, int l = 0, int r = -1) {
if (r < 0)
r = n;
lazyEvaluate(k, l, r);
if (b <= l || r <= a)
return;
if (a <= l && r <= b) {
lazy[k] = x;
lazyFlag[k] = true;
lazyEvaluate(k, l, r);
} else {
update(a, b, x, 2 * k + 1, l, (l + r) / 2);
update(a, b, x, 2 * k + 2, (l + r) / 2, r);
node[k] = min(node[2 * k + 1], node[2 * k + 2]);
}
}
int find(int a, int b, int k = 0, int l = 0, int r = -1) {
if (r < 0)
r = n;
lazyEvaluate(k, l, r);
if (b <= l || r <= a)
return INT_MAX;
if (a <= l && r <= b)
return node[k];
int vl = find(a, b, 2 * k + 1, l, (l + r) / 2);
int vr = find(a, b, 2 * k + 2, (l + r) / 2, r);
return min(vl, vr);
}
};
long long mod = 1000000007;
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(16);
long long w, h, x, y;
cin >> w >> h >> x >> y;
int cnt;
if ((w % 2 == 0) && (h % 2 == 0) && w / 2 == x && h / 2 == y)
cnt = 1;
else
cnt = 0;
cout << (double)w * h / 2 << cnt;
} | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <climits>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> p;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
vector<long long> divisor(long long n) {
vector<long long> ret;
for (long long i = 1; i * i <= n; i++) {
if (n % i == 0) {
ret.push_back(i);
if (i * i != n)
ret.push_back(n / i);
}
}
sort(begin(ret), end(ret));
return (ret);
}
struct LazySegmentTree {
private:
int n;
vector<int> node, lazy;
vector<bool> lazyFlag;
public:
LazySegmentTree(vector<int> v) {
int sz = (int)v.size();
n = 1;
while (n < sz)
n *= 2;
node.resize(2 * n - 1);
lazy.resize(2 * n - 1, INT_MAX);
lazyFlag.resize(2 * n - 1, false);
for (int i = 0; i < sz; i++)
node[i + n - 1] = v[i];
for (int i = n - 2; i >= 0; i--)
node[i] = min(node[i * 2 + 1], node[i * 2 + 2]);
}
void lazyEvaluate(int k, int l, int r) {
if (lazyFlag[k]) {
node[k] = lazy[k];
if (r - l > 1) {
lazy[k * 2 + 1] = lazy[k * 2 + 2] = lazy[k];
lazyFlag[k * 2 + 1] = lazyFlag[k * 2 + 2] = true;
}
lazyFlag[k] = false;
}
}
void update(int a, int b, int x, int k = 0, int l = 0, int r = -1) {
if (r < 0)
r = n;
lazyEvaluate(k, l, r);
if (b <= l || r <= a)
return;
if (a <= l && r <= b) {
lazy[k] = x;
lazyFlag[k] = true;
lazyEvaluate(k, l, r);
} else {
update(a, b, x, 2 * k + 1, l, (l + r) / 2);
update(a, b, x, 2 * k + 2, (l + r) / 2, r);
node[k] = min(node[2 * k + 1], node[2 * k + 2]);
}
}
int find(int a, int b, int k = 0, int l = 0, int r = -1) {
if (r < 0)
r = n;
lazyEvaluate(k, l, r);
if (b <= l || r <= a)
return INT_MAX;
if (a <= l && r <= b)
return node[k];
int vl = find(a, b, 2 * k + 1, l, (l + r) / 2);
int vr = find(a, b, 2 * k + 2, (l + r) / 2, r);
return min(vl, vr);
}
};
long long mod = 1000000007;
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(16);
long long w, h, x, y;
cin >> w >> h >> x >> y;
int cnt;
if ((w % 2 == 0) && (h % 2 == 0) && w / 2 == x && h / 2 == y)
cnt = 1;
else
cnt = 0;
cout << (double)w * h / 2 << " " << cnt;
} | [
"io.output.change"
] | 817,073 | 817,074 | u313288017 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y;
while (cin >> w >> h >> x >> y) {
printf("%f ", w * h / 2.0);
if (x == w / 2 && y == h / 2)
puts("1");
else
puts("0");
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
while (cin >> w >> h >> x >> y) {
printf("%lf ", w * h / 2.0);
if (x == w / 2 && y == h / 2)
puts("1");
else
puts("0");
}
return 0;
}
| [
"variable_declaration.type.primitive.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,077 | 817,078 | u485837651 | cpp |
p03001 | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
long W, H, x, y;
cin >> W >> H >> x >> y;
long double Area = W * H / 2.0;
cout << std::setprecision(20) << Area << " ";
vector<int> center(2);
center.at(0) = W / 2.0;
center.at(1) = H / 2.0;
if (x == center.at(0) && y == center.at(1))
cout << 1 << endl;
else
cout << 0 << endl;
} | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
long W, H, x, y;
cin >> W >> H >> x >> y;
long double Area = W * H / 2.0;
cout << fixed;
cout << std::setprecision(20) << Area << " ";
vector<double> center(2);
center.at(0) = W / 2.0;
center.at(1) = H / 2.0;
if (x == center.at(0) && y == center.at(1))
cout << 1 << endl;
else
cout << 0 << endl;
} | [
"variable_declaration.type.primitive.change"
] | 817,079 | 817,080 | u075250977 | cpp |
p03001 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> V;
const long long MOD = 1000000007LL;
const long long INFL = 1LL << 60;
const int INF = 1 << 29;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
if (W % 2 == 0 && H % 2 == 0 && W / 2 == x && H / 2 == y)
cout << W * H / 2 << ' ' << 1 << endl;
else
cout << W * H / 2 << ' ' << 0 << endl;
return 0;
} |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> V;
const long long MOD = 1000000007LL;
const long long INFL = 1LL << 60;
const int INF = 1 << 29;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
if (W % 2 == 0 && H % 2 == 0 && W / 2 == x && H / 2 == y)
cout << W * H / 2.0 << ' ' << 1 << endl;
else
cout << W * H / 2.0 << ' ' << 0 << endl;
return 0;
} | [
"literal.number.change",
"io.output.change"
] | 817,083 | 817,084 | u703669948 | cpp |
p03001 | #include <bits/stdc++.h>
#define LL long long
#define P 1000000007
#define M 1000005
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
printf("%lf ", 1.0 * w * h / 2);
if (x * 2 == w || 2 * y == h)
puts("1");
else
puts("0");
return 0;
} | #include <bits/stdc++.h>
#define LL long long
#define P 1000000007
#define M 1000005
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
printf("%lf ", 1.0 * w * h / 2);
if (x * 2 == w && 2 * y == h)
puts("1");
else
puts("0");
return 0;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 817,090 | 817,091 | u837479063 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
typedef long long ll;
#define INF 1e9
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / 2;
if ((x * 2 == W) && (y * 2 == H)) {
// printf("%.11f 1\n", ans);
cout << ans << " " << 1 << endl;
} else {
// printf("%.11f 0\n", ans);
cout << ans << " " << 0 << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
typedef long long ll;
#define INF 1e9
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / 2;
if ((x * 2 == W) && (y * 2 == H)) {
// printf("%.11f 1\n", ans);
cout << ans << " " << 1 << endl;
} else {
// printf("%.11f 0\n", ans);
cout << ans << " " << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.change"
] | 817,094 | 817,095 | u174434198 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
typedef long long ll;
#define INF 1e9
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / 2;
if ((x * 2 == W) && (y * 2 == H)) {
// printf("%.11f 1\n", ans);
cout << ans << " " << 1 << endl;
} else {
// printf("%.11f 0\n", ans);
cout << ans << " " << 0 << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
typedef long long ll;
#define INF 1e9
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = W * H / 2;
if ((x * 2 == W) && (y * 2 == H)) {
// printf("%.11f 1\n", ans);
cout << ans << " " << 1 << endl;
} else {
// printf("%.11f 0\n", ans);
cout << ans << " " << 0 << endl;
}
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 817,096 | 817,095 | u174434198 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, s, d, f;
cin >> a >> s >> d >> f;
double asd = a * s / 2;
cout << fixed << setprecision(6) << asd;
if (d == a / 2 && f == s / 2)
cout << 1;
else
cout << 0;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double a, s, d, f;
cin >> a >> s >> d >> f;
double asd = a * s / 2;
cout << fixed << setprecision(6) << asd << ' ';
if (d == a / 2 && f == s / 2)
cout << 1;
else
cout << 0;
return 0;
}
| [
"io.output.change"
] | 817,099 | 817,100 | u487510898 | cpp |
p03001 | #include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
int main() {
int W, H, x, y, chec = 0;
cin >> W >> H >> x >> y;
if (W == 2 * x && H == 2 * y) {
chec = 1;
}
printf("%.10lf", (double)(W * H / 2));
cout << " " << chec << endl;
return 0;
} | #include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
int main() {
int W, H, x, y, chec = 0;
cin >> W >> H >> x >> y;
if (W == 2 * x && H == 2 * y) {
chec = 1;
}
printf("%.9lf", (double)W * H / 2);
cout << " " << chec << endl;
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,101 | 817,102 | u149526875 | cpp |
p03001 | #include <algorithm>
#include <climits>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
ll INF = LLONG_MAX;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll w, h, x, y;
cin >> w >> h >> x >> y;
long double t = 2.0;
long double ans = w * h / t;
if (w % 2 == 0 && h & 2 == 0) {
if (x == w / 2 && y == h / 2) {
cout << ans << " " << 1 << endl;
} else {
cout << ans << " " << 0 << endl;
}
} else {
cout << ans << " " << 0 << endl;
}
return 0;
}
| #include <algorithm>
#include <climits>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
ll INF = LLONG_MAX;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll w, h, x, y;
cin >> w >> h >> x >> y;
long double t = 2.0;
long double ans = w * h / t;
if (w % 2 == 0 && h % 2 == 0) {
if (x == w / 2 && y == h / 2) {
cout << ans << " " << 1 << endl;
} else {
cout << ans << " " << 0 << endl;
}
} else {
cout << ans << " " << 0 << endl;
}
return 0;
}
| [
"control_flow.branch.if.condition.change"
] | 817,114 | 817,115 | u019356802 | cpp |
p03001 | #include <bits/stdc++.h>
using ll = long long;
using itn = int;
using namespace std;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
// sort(a, a + N, greater<int>()) // descend
// sort(a, a+N) // ascend
using ll = long long;
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = 0;
if (x == w / 2 && y == h / 2)
ans1 = 2;
else if (x == w / 2 && y != h / 2)
ans1 = 1;
else if (x != w / 2 && y == h / 2)
ans1 = 1;
else
ans1 = 0;
printf("%.12lf ", (double)w * h / 2);
cout << ans1;
}
| #include <bits/stdc++.h>
using ll = long long;
using itn = int;
using namespace std;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
// sort(a, a + N, greater<int>()) // descend
// sort(a, a+N) // ascend
using ll = long long;
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = 0;
if (x == w / 2 && y == h / 2)
ans1 = 1;
else if (x == w / 2 && y != h / 2)
ans1 = 0;
else if (x != w / 2 && y == h / 2)
ans1 = 0;
else
ans1 = 0;
printf("%.12lf ", (double)w * h / 2);
cout << ans1;
}
| [
"literal.number.change",
"assignment.value.change"
] | 817,123 | 817,124 | u499009346 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
int m = 0;
if (x == w / 2 && y == h / 2) {
m = 1;
}
cout << w * h / 2 << m << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
int m = 0;
if (x == w / 2 && y == h / 2) {
m = 1;
}
cout << w * h / 2 << ' ' << m << endl;
} | [
"io.output.change"
] | 817,129 | 817,130 | u277253335 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << fixed << setprecision(10) << (double)a * b / 2 << ' ';
if (c == a / 2 && d == b / 2) {
cout << 1;
} else {
cout << 0;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, d;
cin >> a >> b >> c >> d;
cout << fixed << setprecision(10) << (double)a * b / 2 << ' ';
if (c == a / 2 && d == b / 2) {
cout << 1;
} else {
cout << 0;
}
} | [
"variable_declaration.type.primitive.change"
] | 817,131 | 817,132 | u845851868 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
cout << fixed << setprecision(7) << (double)a * b / 2 << ' ';
if (c == a / 2 && d == b / 2) {
cout << 1;
} else {
cout << 0;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, d;
cin >> a >> b >> c >> d;
cout << fixed << setprecision(10) << (double)a * b / 2 << ' ';
if (c == a / 2 && d == b / 2) {
cout << 1;
} else {
cout << 0;
}
} | [
"variable_declaration.type.primitive.change",
"literal.number.change",
"io.output.change"
] | 817,133 | 817,132 | u845851868 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, x, y, t;
double s;
while (cin >> w >> h >> x >> y) {
s = w * h / 2;
if (w == x * 2 && h == y * 2)
t = 1;
else
t = 0;
printf("%.6lf ", s);
cout << t << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y, t;
double s;
while (cin >> w >> h >> x >> y) {
s = w * h / 2;
if (w == x * 2 && h == y * 2)
t = 1;
else
t = 0;
printf("%.6lf ", s);
cout << t << endl;
}
return 0;
} | [
"variable_declaration.type.primitive.change"
] | 817,138 | 817,139 | u852978989 | cpp |
p03001 | #include <iomanip>
#include <iostream>
using namespace std;
long long W, H, x, y;
int main() {
cin >> W >> H >> x >> y;
double s = W * H / 2.0;
cout << setprecision(20) << s << ' ';
double gx = W / 2, gy = H / 2;
if (x == gx && y == gy)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
}
| #include <iomanip>
#include <iostream>
using namespace std;
long long W, H, x, y;
int main() {
cin >> W >> H >> x >> y;
double s = W * H / 2.0;
cout << setprecision(20) << s << ' ';
double gx = W / 2.0, gy = H / 2.0;
if (x == gx && y == gy)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
}
| [
"literal.number.change",
"expression.operation.binary.change"
] | 817,146 | 817,147 | u102334466 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
float wd, hd, answer;
wd = w;
hd = h;
answer = wd * hd / 2.0;
cout << setprecision(9) << answer;
if (x == w / 2.0 || y == h / 2.0)
cout << " 1" << endl;
else
cout << " 0" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
double wd, hd, answer;
wd = w;
hd = h;
answer = wd * hd / 2.0;
cout << setprecision(9) << answer;
if (x == w / 2.0 && y == h / 2.0)
cout << " 1" << endl;
else
cout << " 0" << endl;
}
| [
"variable_declaration.type.primitive.change",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 817,152 | 817,151 | u986947674 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string str;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef map<str, int> mapsi;
typedef map<str, int>::iterator mapsitr;
typedef map<int, int> mint;
typedef map<ll, ll> mll;
typedef set<int> si;
typedef set<ll> sll;
typedef si ::iterator sitr;
typedef si ::reverse_iterator rsitr;
typedef sll ::iterator sltr;
typedef sll ::reverse_iterator rsltr;
#define mset multiset
typedef mset<int> msi;
typedef mset<ll> msll;
typedef msi ::iterator msitr;
typedef msi ::reverse_iterator msritr;
typedef msll ::iterator msltr;
typedef msll ::reverse_iterator mslritr;
#define mp make_pair
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define fi first
#define se second
#define fs first.second
#define ss second.second
#define ff first.first
#define sf second.first
#define newl '\n'
char to_upper(char x) {
if (97 <= int(x) && int(x) <= 126)
return char(x - 32);
else if (65 <= int(x) && int(x) <= 90)
return x;
}
char to_lower(char x) {
if (97 <= int(x) && int(x) <= 126)
return x;
else if (65 <= int(x) && int(x) <= 90)
return char(x + 32);
}
int numerize(char x) {
if (48 <= int(x) && int(x) <= 57)
return int(x - '0');
else if (97 <= int(x) && int(x) <= 126)
return int(x - 96);
else if (65 <= int(x) && int(x) <= 90)
return int(x - 64);
}
// void IO(){
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
//}
// end of Template
int w, h, x, y, z;
double ans;
int main() {
// IO();
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> w >> h >> x >> y;
ans = (w * h) / 2;
if (w % 2 == 0 && h % 2 == 0) {
int a, b;
a = w / 2;
b = h / 2;
if (a == x && b == y) {
z = 1;
}
}
printf("%.7lf %d\n", ans, z);
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string str;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef map<str, int> mapsi;
typedef map<str, int>::iterator mapsitr;
typedef map<int, int> mint;
typedef map<ll, ll> mll;
typedef set<int> si;
typedef set<ll> sll;
typedef si ::iterator sitr;
typedef si ::reverse_iterator rsitr;
typedef sll ::iterator sltr;
typedef sll ::reverse_iterator rsltr;
#define mset multiset
typedef mset<int> msi;
typedef mset<ll> msll;
typedef msi ::iterator msitr;
typedef msi ::reverse_iterator msritr;
typedef msll ::iterator msltr;
typedef msll ::reverse_iterator mslritr;
#define mp make_pair
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define fi first
#define se second
#define fs first.second
#define ss second.second
#define ff first.first
#define sf second.first
#define newl '\n'
char to_upper(char x) {
if (97 <= int(x) && int(x) <= 126)
return char(x - 32);
else if (65 <= int(x) && int(x) <= 90)
return x;
}
char to_lower(char x) {
if (97 <= int(x) && int(x) <= 126)
return x;
else if (65 <= int(x) && int(x) <= 90)
return char(x + 32);
}
int numerize(char x) {
if (48 <= int(x) && int(x) <= 57)
return int(x - '0');
else if (97 <= int(x) && int(x) <= 126)
return int(x - 96);
else if (65 <= int(x) && int(x) <= 90)
return int(x - 64);
}
// void IO(){
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
//}
// end of Template
int w, h, x, y, z;
double ans;
int main() {
// IO();
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> w >> h >> x >> y;
ans = ((double)w * (double)h) / 2;
if (w % 2 == 0 && h % 2 == 0) {
int a, b;
a = w / 2;
b = h / 2;
if (a == x && b == y) {
z = 1;
}
}
printf("%.7lf %d\n", ans, z);
}
| [
"type_conversion.add"
] | 817,170 | 817,171 | u337775536 | cpp |
p03001 | // by adiforluls
#pragma GCC optimize("-O2")
#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;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define mii map<int, int>
#define vi vector<int>
#define vll vector<long long>
#define all(a) (a).begin(), (a).end()
#define clz(a) __builtin_clz(a) // count leading zeroes
#define ctz(a) __builtin_ctz(a) // count trailing zeroes
#define popc(a) \
__builtin_popcount(a) // count set bits (for ints only diff for ll)
#define lul 1000000007
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rfor(i, a, b) for (int i = a; i >= b; i--)
#define SIZE 1000005
#define F first
#define S second
#define mod 998244353
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
std::cerr << name << " = " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
const char *comma = strchr(names + 1, ',');
std::cerr.write(names, comma - names) << " = " << arg1 << " |";
__f(comma + 1, args...);
}
#else
#define trace(...)
#endif
#define endl '\n'
#define ordered_set \
tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>
const ld PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
void solve() {
int w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h;
ans /= 2.0;
cout << fixed << setprecision(15) << ans << " ";
if (2 * x == w or 2 * y == h)
cout << 1;
else
cout << 0;
}
int main() {
FAST;
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
int t;
t = 1;
while (t--) {
solve();
}
return 0;
} | // by adiforluls
#pragma GCC optimize("-O2")
#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;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define mii map<int, int>
#define vi vector<int>
#define vll vector<long long>
#define all(a) (a).begin(), (a).end()
#define clz(a) __builtin_clz(a) // count leading zeroes
#define ctz(a) __builtin_ctz(a) // count trailing zeroes
#define popc(a) \
__builtin_popcount(a) // count set bits (for ints only diff for ll)
#define lul 1000000007
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rfor(i, a, b) for (int i = a; i >= b; i--)
#define SIZE 1000005
#define F first
#define S second
#define mod 998244353
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
std::cerr << name << " = " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
const char *comma = strchr(names + 1, ',');
std::cerr.write(names, comma - names) << " = " << arg1 << " |";
__f(comma + 1, args...);
}
#else
#define trace(...)
#endif
#define endl '\n'
#define ordered_set \
tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>
const ld PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
void solve() {
ld w, h, x, y;
cin >> w >> h >> x >> y;
ld ans = w * h;
ans /= 2.0;
cout << fixed << setprecision(9) << ans << " ";
if (2 * x == w and 2 * y == h)
cout << 1;
else
cout << 0;
}
int main() {
FAST;
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
int t;
t = 1;
while (t--) {
solve();
}
return 0;
} | [
"variable_declaration.type.change",
"literal.number.change",
"io.output.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 817,211 | 817,209 | u701389155 | cpp |
p03001 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double res = W * H / 2;
int tmp = 0;
if (W == x * 2 && H == y * 2)
tmp = 1;
printf("%.6f %d", res, tmp);
return 0;
} | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double res = (double)W * H / 2;
int tmp = 0;
if (W == x * 2 && H == y * 2)
tmp = 1;
printf("%.6f %d\n", res, tmp);
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 817,217 | 817,218 | u326401041 | cpp |
p03001 | #include <iomanip>
#include <iostream>
using namespace std;
double w, h, x, y;
void solve() {
bool onlyOne = (w == 2 * x ^ h == 2 * y);
cout << setprecision(10) << (w * h / 2.0) << " " << (onlyOne ? "0" : "1")
<< endl;
}
int main() {
cin >> w >> h >> x >> y;
solve();
}
| // review
#include <iomanip>
#include <iostream>
using namespace std;
double w, h, x, y;
void solve() {
bool multiple = (w == 2 * x && h == 2 * y);
cout << setprecision(10) << (w * h / 2.0) << " " << (multiple ? "1" : "0")
<< endl;
}
int main() {
cin >> w >> h >> x >> y;
solve();
}
| [
"variable_declaration.name.change",
"identifier.change",
"expression.operation.binary.change",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 817,225 | 817,226 | u550178285 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
cout << (W * H) / 2 << " " << (2 * x == W && 2 * y == H ? 1 : 0) << endl;
} | #include <iostream>
using namespace std;
int main() {
long long W, H, x, y;
cin >> W >> H >> x >> y;
cout << (double(W) * double(H)) / 2 << " "
<< (2 * x == W && 2 * y == H ? 1 : 0) << endl;
} | [
"call.add",
"call.arguments.change"
] | 817,227 | 817,228 | u940000534 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double ans = (double)(W * H / 2);
int flag = 0;
if (x * 2 == W && y * 2 == H)
flag = 1;
printf("%.10f %d\n", ans, flag);
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double ans = (double)W * H / 2;
int flag = 0;
if (x * 2 == W && y * 2 == H)
flag = 1;
printf("%.10f %d\n", ans, flag);
return 0;
}
| [] | 817,233 | 817,234 | u067128860 | cpp |
p03001 | #include <stdio.h>
typedef long long int ll;
ll min(ll x, ll y) {
if (x > y) {
return y;
} else {
return x;
}
}
int main(void) {
ll w, h, x, y;
scanf("%lld%lld%lld%lld", &w, &h, &x, &y);
ll menseki = w * h;
printf("%lld %lld\n", menseki / 2, 2 * x == w && 2 * y == h);
return 0;
} | #include <stdio.h>
typedef long long int ll;
ll min(ll x, ll y) {
if (x > y) {
return y;
} else {
return x;
}
}
int main(void) {
ll w, h, x, y;
scanf("%lld%lld%lld%lld", &w, &h, &x, &y);
ll menseki = w * h;
printf("%lf %lld\n", (double)menseki / 2, 2 * x == w && 2 * y == h);
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,243 | 817,244 | u497418592 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long w, h, x, y;
cin >> w >> h >> x >> y;
double s = w * h / 2;
if (x + x == w && y + y == h) {
cout << s << ' ' << '1' << endl;
} else {
cout << s << ' ' << '0' << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long w, h, x, y;
cin >> w >> h >> x >> y;
double s = double(w) * double(h) / 2;
if (x + x == w && y + y == h) {
cout << s << ' ' << '1' << endl;
} else {
cout << s << ' ' << '0' << endl;
}
} | [
"call.add",
"call.arguments.change"
] | 817,245 | 817,246 | u256868077 | cpp |
p03001 | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <numeric>
#include <queue>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
int main(void) {
LL w, h, x, y;
cin >> w >> h >> x >> y;
LL area = (w * h) / 2;
if (x * 2 == w && y * 2 == h) {
cout << area << ' ' << 1 << endl;
} else {
cout << area << ' ' << 0 << endl;
}
return 0;
} | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <numeric>
#include <queue>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
int main(void) {
LL w, h, x, y;
cin >> w >> h >> x >> y;
double area = (double)w * (double)h / 2;
if (x * 2 == w && y * 2 == h) {
cout << area << ' ' << 1 << endl;
} else {
cout << area << ' ' << 0 << endl;
}
return 0;
} | [
"variable_declaration.type.change",
"expression.operation.binary.change"
] | 817,247 | 817,248 | u783825935 | cpp |
p03001 | #include <iostream>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int check = 0;
if (W == x * 2 && H == y * 2)
check = 1;
double ans;
ans = W * H / 2;
printf("%0.6f %d\n", ans, check);
} | #include <iostream>
using namespace std;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
int check = 0;
if (W == x * 2 && H == y * 2)
check = 1;
double ans;
//キャスト演算子を使用
ans = (double)W * H / 2;
printf("%0.6f %d\n", ans, check);
} | [
"type_conversion.add"
] | 817,254 | 817,255 | u159117146 | cpp |
p03001 | #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, 1, 0, -1};
const int INF = 100000000;
const long long LINF = 1000000000000000000;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using ll = long long;
using pLL = std::pair<ll, ll>;
#define SORT(v) std::sort(v.begin(), v.end())
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M, x, y;
cin >> N >> M >> x >> y;
printf("%ld %d\n", double(N) * double(M) / 2.0, (2 * x == N && 2 * y == M));
return 0;
}
| #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, 1, 0, -1};
const int INF = 100000000;
const long long LINF = 1000000000000000000;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using ll = long long;
using pLL = std::pair<ll, ll>;
#define SORT(v) std::sort(v.begin(), v.end())
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M, x, y;
cin >> N >> M >> x >> y;
printf("%lf %d\n", double(N) * double(M) / 2.0, (2 * x == N && 2 * y == M));
return 0;
}
| [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,274 | 817,275 | u199371251 | cpp |
p03001 | /*---------------------------------
@Author: Dicer
@DateTime: 2019-06-17 09:17:14
---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
inline ll qpow(ll a, ll b, ll mod) {
ll res = 1;
while (b) {
if (b & 1)
res = (res * a) % mod;
a = (a * a) % mod;
b >>= 1;
}
return res;
}
const double eps = 1e-8;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int MAXN = 2e5 + 7;
int main(int argc, char const *argv[]) {
int w, h, x, y;
cin >> w >> h >> x >> y;
if (w == 2 * x && h == 2 * y) {
cout << w * h / 2 << ' ' << 1 << endl;
} else {
cout << w * h / 2 << ' ' << 0 << endl;
}
return 0;
} | /*---------------------------------
@Author: Dicer
@DateTime: 2019-06-17 09:17:14
---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
inline ll qpow(ll a, ll b, ll mod) {
ll res = 1;
while (b) {
if (b & 1)
res = (res * a) % mod;
a = (a * a) % mod;
b >>= 1;
}
return res;
}
const double eps = 1e-8;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int MAXN = 2e5 + 7;
int main(int argc, char const *argv[]) {
ll w, h, x, y;
cin >> w >> h >> x >> y;
if (w == 2 * x && h == 2 * y) {
cout << w * h / 2.0 << ' ' << 1 << endl;
} else {
cout << w * h / 2.0 << ' ' << 0 << endl;
}
return 0;
} | [
"variable_declaration.type.change",
"literal.number.change",
"io.output.change"
] | 817,280 | 817,279 | u613520453 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w / 2 * h << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w / 2.0 * h << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | [
"literal.number.change",
"io.output.change"
] | 817,283 | 817,284 | u658899890 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2 << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w / 2.0 * h << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | [
"expression.operation.binary.remove"
] | 817,285 | 817,284 | u658899890 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << " ";
if (x == w / 2.0 || y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
cout << w / 2.0 * h << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | [
"variable_declaration.type.change",
"expression.operation.binary.remove",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 817,286 | 817,284 | u658899890 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << w * h / 2.0 << " ";
if (x == w / 2.0 || y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
#define All(v) (v).begin(), (v).end()
#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 For(i, m, n) for (int i = m; i < n; i++)
#define Fors(i, m, n) for (int i = m; i <= n; i++)
#define Inf 2e9
#define F first
#define S second
#define pb push_back
#define mp make_pair
struct speed {
speed() {
cin.tie();
ios::sync_with_stdio(false);
cout << fixed << setprecision(18);
}
} speed;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
ll gcd(ll a, ll b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << w / 2.0 * h << " ";
if (x == w / 2.0 && y == h / 2.0) {
cout << 1 << "\n";
} else {
cout << 0 << "\n";
}
} | [
"expression.operation.binary.remove",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 817,286 | 817,288 | u658899890 | cpp |
p03001 | #include "bits/stdc++.h"
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
printf("%lf %d\n", double(w) * double(h), x + x == w && y + y == h);
return 0;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
printf("%lf %d\n", double(w) * double(h) / 2, x + x == w && y + y == h);
return 0;
} | [
"expression.operation.binary.add"
] | 817,290 | 817,291 | u297292406 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int x, y, a, b;
int main() {
scanf("%d%d%d%d", &x, &y, &a, &b);
printf("%.9f ", double(a) * double(b) / 2.0);
if (2 * a == x && 2 * b == y)
printf("1\n");
else
printf("0\n");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int x, y, a, b;
int main() {
scanf("%d%d%d%d", &x, &y, &a, &b);
printf("%.9f ", double(x) * double(y) / 2.0);
if (2 * a == x && 2 * b == y)
printf("1\n");
else
printf("0\n");
return 0;
}
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 817,299 | 817,300 | u433665020 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
template <typename T> using v = vector<T>;
template <typename T> using pq = priority_queue<T>;
template <typename T> using minpq = priority_queue<T, vector<T>, greater<T>>;
template <typename T, typename K> using ump = unordered_map<T, K>;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const ll mod = 1000000007;
const ll inf = ll(1e9);
const ll e5 = ll(1e5);
const ll ll_inf = ll(1e9) * ll(1e9);
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n - 1; i >= 0; i--)
#define repone(i, n) for (ll i = 1; i <= (ll)(n); i++)
#define each(i, mp) for (auto i : mp)
#define eb emplace_back
#define F first
#define S second
#define all(obj) (obj).begin(), (obj).end()
ll inl() {
ll x;
cin >> x;
return (x);
}
string ins() {
string x;
cin >> x;
return (x);
}
/* ----------- ANSWER ----------- */
/* ------------------------------ */
int main() {
#ifdef MY_DEBUG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-noreturn"
while (true) {
#pragma clang diagnostic pop
#endif
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h / 2.0;
cout << fixed << setprecision(10) << ans;
cout << " " << (x == w / 2 || y == h / 2) << endl;
#ifdef MY_DEBUG
}
#endif
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
template <typename T> using v = vector<T>;
template <typename T> using pq = priority_queue<T>;
template <typename T> using minpq = priority_queue<T, vector<T>, greater<T>>;
template <typename T, typename K> using ump = unordered_map<T, K>;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const ll mod = 1000000007;
const ll inf = ll(1e9);
const ll e5 = ll(1e5);
const ll ll_inf = ll(1e9) * ll(1e9);
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n - 1; i >= 0; i--)
#define repone(i, n) for (ll i = 1; i <= (ll)(n); i++)
#define each(i, mp) for (auto i : mp)
#define eb emplace_back
#define F first
#define S second
#define all(obj) (obj).begin(), (obj).end()
ll inl() {
ll x;
cin >> x;
return (x);
}
string ins() {
string x;
cin >> x;
return (x);
}
/* ----------- ANSWER ----------- */
/* ------------------------------ */
int main() {
#ifdef MY_DEBUG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-noreturn"
while (true) {
#pragma clang diagnostic pop
#endif
double w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h / 2.0;
cout << fixed << setprecision(10) << ans;
cout << " " << (x == w / 2 && y == h / 2) << endl;
#ifdef MY_DEBUG
}
#endif
return 0;
} | [
"misc.opposites",
"io.output.change"
] | 817,309 | 817,310 | u136378781 | cpp |
p03001 | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <math.h>
#include <string>
using ll = long long;
using namespace std;
int main() {
ll W;
cin >> W;
ll H;
cin >> H;
ll x;
cin >> x;
ll y;
cin >> y;
double ans;
ans = (W * H) / 2;
cout << ans << " ";
if (x + x == W && y + y == H) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
} | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <math.h>
#include <string>
using ll = long long;
using namespace std;
int main() {
ll W;
cin >> W;
ll H;
cin >> H;
ll x;
cin >> x;
ll y;
cin >> y;
double ans;
ans = (W * H);
ans = ans / 2;
cout << ans << " ";
if (x + x == W && y + y == H) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
} | [
"assignment.change"
] | 817,318 | 817,319 | u311671153 | cpp |
p03001 | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <math.h>
#include <string>
using ll = long long;
using namespace std;
int main() {
ll W;
cin >> W;
ll H;
cin >> H;
ll x;
cin >> x;
ll y;
cin >> y;
double ans;
ans = W * H / 2;
cout << ans << " ";
if (x + x == W && y + y == H) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
} | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <math.h>
#include <string>
using ll = long long;
using namespace std;
int main() {
ll W;
cin >> W;
ll H;
cin >> H;
ll x;
cin >> x;
ll y;
cin >> y;
double ans;
ans = (W * H);
ans = ans / 2;
cout << ans << " ";
if (x + x == W && y + y == H) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
} | [
"assignment.add",
"assignment.change"
] | 817,320 | 817,319 | u311671153 | cpp |
p03001 | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
long long w, h, x, y;
int isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = w * h / 2;
if (x == w / 2 && y == h / 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%12lf %d\n", ans, isNotOnly);
} | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
double w, h, x, y;
int isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = w * h / 2;
if (x == w / 2 && y == h / 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%12lf %d\n", ans, isNotOnly);
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.narrow.change"
] | 817,321 | 817,322 | u201827503 | cpp |
p03001 | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
int w, h, x, y, isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = w * h / 2;
if (x == w / 2 && y == h / 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%lf %d\n", ans, isNotOnly);
} | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
double w, h, x, y;
int isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = w * h / 2;
if (x == w / 2 && y == h / 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%12lf %d\n", ans, isNotOnly);
} | [
"variable_declaration.type.primitive.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,323 | 817,322 | u201827503 | cpp |
p03001 | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
long long w, h, x, y;
int isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = double(w) * double(h) / 2;
if (x == double(w) * 2 && y == double(h) * 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%12lf %d\n", ans, isNotOnly);
} | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
long long w, h, x, y;
int isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = double(w) * double(h) / 2;
if (x == double(w) / 2 && y == double(h) / 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%12lf %d\n", ans, isNotOnly);
} | [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 817,324 | 817,325 | u201827503 | cpp |
p03001 | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
long long w, h, x, y;
int isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = w * h / 2;
if (w == x * 2 && h == y * 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%12lf %d\n", ans, isNotOnly);
} | #include <bits/stdc++.h>
#define USE_MATH_DEFINES
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
long long w, h, x, y;
int isNotOnly;
double ans;
cin >> w >> h >> x >> y;
ans = double(w) * double(h) / 2;
if (w == x * 2 && h == y * 2)
isNotOnly = 1;
else
isNotOnly = 0;
printf("%12lf %d\n", ans, isNotOnly);
} | [
"call.add",
"call.arguments.change"
] | 817,326 | 817,327 | u201827503 | cpp |
p03001 | #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1 << 30;
const ll MOD = 1000000000 + 7;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << fixed << setprecision(6) << (double)(w * h / 2.0) << " "
<< (w / 2 == x && h / 2 == y ? 1 : 0) << endl;
} | #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1 << 30;
const ll MOD = 1000000000 + 7;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
cout << fixed << setprecision(6) << w * h / 2.0 << " "
<< (w / 2 == x && h / 2 == y ? 1 : 0) << endl;
} | [
"variable_declaration.type.primitive.change"
] | 817,332 | 817,333 | u366125700 | cpp |
p03001 | ///***Bismillahir Rahmanir Rahim***///
///*********************************///
///******Ashraful Haque Toni********///
///********Dept. of CSE,JnU*********///
/// email:ashrafulhaquetoni@gmail.com///
///*******contact:01640690531*******///
///*********************************///
#include <bits/stdc++.h>
using namespace std;
#define ash \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define pb push_back
#define mp make_pair
#define sc(n) scanf("%d", &n);
#define scl(n) scanf("%I64d", &n);
#define sc2(m, n) scanf("%d%d", &m, &n);
#define sc2l(m, n) scanf("%I64d%I64d", &m, &n);
#define pf printf
#define Big(x, y) max(x, y);
#define Small(x, y) min(x, y);
#define input(array, size) \
for (int i = 0; i < size; i++) \
cin >> array[i];
#define newline pf("\n");
#define f(s, l, in) for (ll i = s; i < l; i += in)
#define Max INT_MAX
#define Min INT_MIN
#define pi acos(-1.0)
#define Memset(a, val) memset(a, val, sizeof(a));
const int mod = 1e9 + 7;
const int N = 5e6 + 5;
typedef long long ll;
int main() {
ash;
double a, b, x, y;
cin >> a >> b >> x >> y;
if (a == x / 2.0 && b == y / 2.0) {
pf("%0.6f 1\n", a * b / 2.0);
} else {
pf("%0.6f 0\n", a * b / 2.0);
}
return 0;
}
| ///***Bismillahir Rahmanir Rahim***///
///*********************************///
///******Ashraful Haque Toni********///
///********Dept. of CSE,JnU*********///
/// email:ashrafulhaquetoni@gmail.com///
///*******contact:01640690531*******///
///*********************************///
#include <bits/stdc++.h>
using namespace std;
#define ash \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define pb push_back
#define mp make_pair
#define sc(n) scanf("%d", &n);
#define scl(n) scanf("%I64d", &n);
#define sc2(m, n) scanf("%d%d", &m, &n);
#define sc2l(m, n) scanf("%I64d%I64d", &m, &n);
#define pf printf
#define Big(x, y) max(x, y);
#define Small(x, y) min(x, y);
#define input(array, size) \
for (int i = 0; i < size; i++) \
cin >> array[i];
#define newline pf("\n");
#define f(s, l, in) for (ll i = s; i < l; i += in)
#define Max INT_MAX
#define Min INT_MIN
#define pi acos(-1.0)
#define Memset(a, val) memset(a, val, sizeof(a));
const int mod = 1e9 + 7;
const int N = 5e6 + 5;
typedef long long ll;
int main() {
ash;
double a, b, x, y;
cin >> a >> b >> x >> y;
if (a == x * 2.0 && b == y * 2.0) {
pf("%0.6f 1\n", a * b / 2.0);
} else {
pf("%0.6f 0\n", a * b / 2.0);
}
return 0;
}
| [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 817,334 | 817,335 | u802094864 | cpp |
p03001 | #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;
#ifndef bhartiya
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
// #pragma GCC target
// ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
typedef long long ll;
typedef pair<ll, ll> pll;
typedef gp_hash_table<long long, long long> umap;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
oset;
// not that imp
typedef pair<pll, ll> plll;
typedef vector<ll> vl;
typedef vector<pll> vll;
#define inf 200000000000000ll
#define mod 1000000007ll
#define eps 1e-7
#define PI 3.1415926535897932385
// #define PI acos(-1)
#define pb push_back
#define bitc __builtin_popcountll
#define mp make_pair
#define ff first
#define ss second
#define all(ar) ar.begin(), ar.end()
#define fr(i, a, b) for (ll i = (a), _b = (b); i <= _b; i++)
#define rep(i, n) for (ll i = 0, _n = (n); i < _n; i++)
#define repr(i, n) for (ll i = n - 1; i >= 0; i--)
#define frr(i, a, b) for (ll i = (a), _b = (b); i >= _b; i--)
#define foreach(it, ar) for (auto it = ar.begin(); it != ar.end(); it++)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#ifdef bhartiya
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
const char *comma = strchr(names + 1, ',');
cout.write(names, comma - names) << " : " << arg1 << " | ";
__f(comma + 1, args...);
}
int begtime = clock();
#define end_routine() \
cout << "\n\nTime elapsed: " << (clock() - begtime) * 1000 / CLOCKS_PER_SEC \
<< " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
inline bool equals(double a, double b) { return fabs(a - b) < 1e-9; }
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
const ll maxn = 500005;
ll n;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0), cout.precision(4); // cout<<fixed;
cin.exceptions(cin.failbit);
#ifdef bhartiya
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t = 1;
// cin>>t;
while (t--) {
ll w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h;
ans /= 2.0;
cout << ans << " ";
if (x * 2 == 2 && y * 2 == h) {
cout << 1;
} else {
cout << 0;
}
}
end_routine();
} | #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;
#ifndef bhartiya
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
// #pragma GCC target
// ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
typedef long long ll;
typedef pair<ll, ll> pll;
typedef gp_hash_table<long long, long long> umap;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
oset;
// not that imp
typedef pair<pll, ll> plll;
typedef vector<ll> vl;
typedef vector<pll> vll;
#define inf 200000000000000ll
#define mod 1000000007ll
#define eps 1e-7
#define PI 3.1415926535897932385
// #define PI acos(-1)
#define pb push_back
#define bitc __builtin_popcountll
#define mp make_pair
#define ff first
#define ss second
#define all(ar) ar.begin(), ar.end()
#define fr(i, a, b) for (ll i = (a), _b = (b); i <= _b; i++)
#define rep(i, n) for (ll i = 0, _n = (n); i < _n; i++)
#define repr(i, n) for (ll i = n - 1; i >= 0; i--)
#define frr(i, a, b) for (ll i = (a), _b = (b); i >= _b; i--)
#define foreach(it, ar) for (auto it = ar.begin(); it != ar.end(); it++)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#ifdef bhartiya
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
const char *comma = strchr(names + 1, ',');
cout.write(names, comma - names) << " : " << arg1 << " | ";
__f(comma + 1, args...);
}
int begtime = clock();
#define end_routine() \
cout << "\n\nTime elapsed: " << (clock() - begtime) * 1000 / CLOCKS_PER_SEC \
<< " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
inline bool equals(double a, double b) { return fabs(a - b) < 1e-9; }
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
const ll maxn = 500005;
ll n;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0), cout.precision(10); // cout<<fixed;
cin.exceptions(cin.failbit);
#ifdef bhartiya
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t = 1;
// cin>>t;
while (t--) {
ll w, h, x, y;
cin >> w >> h >> x >> y;
double ans = w * h;
ans /= 2.0;
cout << ans << " ";
if (x * 2 == w && y * 2 == h) {
cout << 1;
} else {
cout << 0;
}
}
end_routine();
} | [
"literal.number.change",
"call.arguments.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 817,342 | 817,341 | u497408083 | cpp |
p03001 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iostream>
#include <list> //双方向リスト
#include <map> //連想配列
#include <numeric>
#include <queue>
#include <set> //集合
#include <stack>
#include <string>
#include <vector> //動的配列
typedef long long ll;
using namespace std;
typedef pair<int, int> P;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
ll fast_pow(ll x, ll n, ll mod) {
if (n == 0)
return 1;
ll res = fast_pow(x * x % mod, n / 2, mod);
if (n & 1)
res = res * x % mod;
return res;
}
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i = 0; i < (int)v.size(); i++)
o << (i > 0 ? ", " : "") << v[i];
o << "}";
return o;
}
// n次元配列の初期化。第2引数の型のサイズごとに初期化していく。
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
//小さい順から取り出すヒープ
// priority_queue<ll, vector<ll>, greater<ll> > pque1;
int main() {
ll c, r, x, y; //列の横と縦
cin >> c >> r >> x >> y;
bool check = false;
if (2 * x == c && 2 * y == r)
check = true;
double sq;
sq = c * r / 2;
// if (r*min(x,c-x)==c*min(r,r-y)) check=true;
printf("%9f", sq);
if (check)
cout << ' ' << 1 << endl;
else
cout << ' ' << 0 << endl;
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iostream>
#include <list> //双方向リスト
#include <map> //連想配列
#include <numeric>
#include <queue>
#include <set> //集合
#include <stack>
#include <string>
#include <vector> //動的配列
typedef long long ll;
using namespace std;
typedef pair<int, int> P;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
ll fast_pow(ll x, ll n, ll mod) {
if (n == 0)
return 1;
ll res = fast_pow(x * x % mod, n / 2, mod);
if (n & 1)
res = res * x % mod;
return res;
}
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i = 0; i < (int)v.size(); i++)
o << (i > 0 ? ", " : "") << v[i];
o << "}";
return o;
}
// n次元配列の初期化。第2引数の型のサイズごとに初期化していく。
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
//小さい順から取り出すヒープ
// priority_queue<ll, vector<ll>, greater<ll> > pque1;
int main() {
ll c, r, x, y; //列の横と縦
cin >> c >> r >> x >> y;
bool check = false;
if (2 * x == c && 2 * y == r)
check = true;
double sq;
sq = (double)c * (double)r / 2;
printf("%9f", sq);
if (check)
cout << ' ' << 1 << endl;
else
cout << ' ' << 0 << endl;
} | [
"type_conversion.add"
] | 817,349 | 817,350 | u652150585 | cpp |
p03001 | // https://atcoder.jp/contests/
#include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define REPR(i, n) for (int(i) = (n); (i) >= 0; (i)--)
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); i++)
#define FORR(i, m, n) for (int(i) = (n); (i) >= (m); i--)
#define rep(...) _overload3(__VA_ARGS__, FOR, REP, )(__VA_ARGS__)
#define repr(...) _overload3(__VA_ARGS__, FORR, REPR, )(__VA_ARGS__)
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define INF 1e9
#define ALL(v) (v).begin(), (v).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double S = W * H / 2;
ll center = W == x * 2 && H == y * 2 ? 1 : 0;
cout << fixed << setprecision(9) << S << ' ' << center << '\n';
return 0;
}
| // https://atcoder.jp/contests/
#include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define REPR(i, n) for (int(i) = (n); (i) >= 0; (i)--)
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); i++)
#define FORR(i, m, n) for (int(i) = (n); (i) >= (m); i--)
#define rep(...) _overload3(__VA_ARGS__, FOR, REP, )(__VA_ARGS__)
#define repr(...) _overload3(__VA_ARGS__, FORR, REPR, )(__VA_ARGS__)
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define INF 1e9
#define ALL(v) (v).begin(), (v).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
double S = (double)W * H / 2;
ll center = W == x * 2 && H == y * 2 ? 1 : 0;
cout << fixed << setprecision(9) << S << ' ' << center << '\n';
return 0;
}
| [
"type_conversion.add"
] | 817,361 | 817,362 | u414220724 | cpp |
p03001 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
long long w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2)
cout << setprecision(10) << w * h / 2 << " " << 1 << endl;
else
cout << setprecision(10) << w * h / 2 << " " << 0 << endl;
} | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
long double w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2)
cout << setprecision(10) << w * h / 2 << " " << 1 << endl;
else
cout << setprecision(10) << w * h / 2 << " " << 0 << endl;
} | [
"variable_declaration.type.narrow.change",
"variable_declaration.type.widen.change"
] | 817,368 | 817,369 | u675125216 | cpp |
p03001 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << double(w) * double(h) / 2.0 << ((x * 2 == w) && (y * 2 == h)) << endl;
} | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int w, h, x, y;
cin >> w >> h >> x >> y;
cout << double(w) * double(h) / 2.0 << " " << ((x * 2 == w) && (y * 2 == h))
<< endl;
} | [
"io.output.change"
] | 817,370 | 817,371 | u804453976 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define all(v) v.begin(), v.end()
const int MOD = 1e9 + 7;
const int INF = 2e9;
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = (w * h) / 2;
int ans2 = 0;
if (w % 2 == 0 && h % 2 == 0) {
if (w / 2 == x && h / 2 == y) {
ans2 = 1;
}
}
cout << fixed;
cout << setprecision(10) << ans1 << " ";
cout << ans2 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define all(v) v.begin(), v.end()
const int MOD = 1e9 + 7;
const int INF = 2e9;
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122
int main() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
double ans1 = (double)(w * h) / 2;
int ans2 = 0;
if (w % 2 == 0 && h % 2 == 0) {
if (w / 2 == x && h / 2 == y) {
ans2 = 1;
}
}
cout << fixed;
cout << setprecision(10) << ans1 << " ";
cout << ans2 << endl;
return 0;
}
| [
"type_conversion.add"
] | 817,379 | 817,380 | u214304095 | cpp |
p03001 | /*input
2 3 1 2
*/
#include <bits/stdc++.h>
using namespace std;
// ALL DEFFINES HERE
#define ll long long int
#define ii pair<int, int>
#define mp make_pair
#define N 100005
#define rep(i, n) for (int i = 0; i < n; i++)
#define Rep(i, k, n) for (int i = k; i < n; i++)
#define pb push_back
#define vi vector<int>
#define vii vector<vector<int>>
#define vl vector<ll>
#define F first
#define S second
#define all(v) v.begin(), v.end()
// ALL declarations here const ints etc
const ll mod = 1e9 + 7;
// IMPORTANT FUNCTION DECLARATIONS ,
// SORRY FOR THE BAD PRESENTATION
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll absl(ll a) { return a >= 0 ? a : -a; }
ll maxl(ll a, ll b) { return a >= b ? a : b; }
ll exp(ll a, ll n) {
if (n == 0)
return 1;
if (n == 1)
return a;
if (n & 1)
return (a % mod * exp((a * a) % mod, n / 2) % mod) % mod;
else
return exp((a * a) % mod, n / 2) % mod;
}
// --->>> main starts here
// m*h >= l + k
double mi(double a, double b) { return a < b ? a : b; }
double mx(double a, double b) { return a >= b ? a : b; }
void solve() {
int w, h, x, y;
cin >> w >> h >> x >> y;
int multiple = 0;
if (w == 2 * x && h == 2 * y)
multiple = 1;
cout << w * h / 2 << " " << multiple;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
// auto beginProgram = chrono::steady_clock::now();
// int t; cin >> t;
// while (t--)
{ solve(); }
// auto endProgram = chrono::steady_clock::now();
// std::chrono::duration<double> diff = endProgram - beginProgram;
// cout << "\nTime: " <<diff.count()*1000 << " ms\n";
return 0;
}
| /*input
2 3 1 2
*/
#include <bits/stdc++.h>
using namespace std;
// ALL DEFFINES HERE
#define ll long long int
#define ii pair<int, int>
#define mp make_pair
#define N 100005
#define rep(i, n) for (int i = 0; i < n; i++)
#define Rep(i, k, n) for (int i = k; i < n; i++)
#define pb push_back
#define vi vector<int>
#define vii vector<vector<int>>
#define vl vector<ll>
#define F first
#define S second
#define all(v) v.begin(), v.end()
// ALL declarations here const ints etc
const ll mod = 1e9 + 7;
// IMPORTANT FUNCTION DECLARATIONS ,
// SORRY FOR THE BAD PRESENTATION
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll absl(ll a) { return a >= 0 ? a : -a; }
ll maxl(ll a, ll b) { return a >= b ? a : b; }
ll exp(ll a, ll n) {
if (n == 0)
return 1;
if (n == 1)
return a;
if (n & 1)
return (a % mod * exp((a * a) % mod, n / 2) % mod) % mod;
else
return exp((a * a) % mod, n / 2) % mod;
}
// --->>> main starts here
// m*h >= l + k
double mi(double a, double b) { return a < b ? a : b; }
double mx(double a, double b) { return a >= b ? a : b; }
void solve() {
double w, h, x, y;
cin >> w >> h >> x >> y;
int multiple = 0;
if (w == 2 * x && h == 2 * y)
multiple = 1;
cout << w * h / 2 << " " << multiple;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
// auto beginProgram = chrono::steady_clock::now();
// int t; cin >> t;
// while (t--)
{ solve(); }
// auto endProgram = chrono::steady_clock::now();
// std::chrono::duration<double> diff = endProgram - beginProgram;
// cout << "\nTime: " <<diff.count()*1000 << " ms\n";
return 0;
}
| [
"variable_declaration.type.primitive.change"
] | 817,381 | 817,382 | u956910277 | cpp |
p03001 | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
//#define cerr if(false) cerr
#ifdef DEBUG
#define show(...) cerr << #__VA_ARGS__ << " = ", debug(__VA_ARGS__);
#else
#define show(...) 42
#endif
using namespace std;
using ll = long long;
using pii = pair<int, int>;
template <typename T, typename S>
ostream &operator<<(ostream &os, pair<T, S> a) {
os << '(' << a.first << ',' << a.second << ')';
return os;
}
template <typename T> ostream &operator<<(ostream &os, vector<T> v) {
for (auto x : v)
os << x << ' ';
return os;
}
void debug() { cerr << '\n'; }
template <typename H, typename... T> void debug(H a, T... b) {
cerr << a;
if (sizeof...(b))
cerr << ", ";
debug(b...);
}
int main() {
double a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b / 2 << " ";
int res = 1;
if (a == c * 2 and b == d * 2)
res = 0;
cout << res << endl;
} | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
//#define cerr if(false) cerr
#ifdef DEBUG
#define show(...) cerr << #__VA_ARGS__ << " = ", debug(__VA_ARGS__);
#else
#define show(...) 42
#endif
using namespace std;
using ll = long long;
using pii = pair<int, int>;
template <typename T, typename S>
ostream &operator<<(ostream &os, pair<T, S> a) {
os << '(' << a.first << ',' << a.second << ')';
return os;
}
template <typename T> ostream &operator<<(ostream &os, vector<T> v) {
for (auto x : v)
os << x << ' ';
return os;
}
void debug() { cerr << '\n'; }
template <typename H, typename... T> void debug(H a, T... b) {
cerr << a;
if (sizeof...(b))
cerr << ", ";
debug(b...);
}
int main() {
double a, b, c, d;
cin >> a >> b >> c >> d;
cout << a * b / 2 << " ";
int res = 0;
if (a == c * 2 and b == d * 2)
res = 1;
cout << res << endl;
} | [
"literal.number.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 817,388 | 817,389 | u628047647 | cpp |
p03001 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define chmin(x, y) (x = min(x, y))
#define chmax(x, y) (x = max(x, y))
// ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ll mod = 1e9 + 7;
const ll IMF = 1LL << 29;
const double PI = 3.14159265358979323846;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
long double ans = (W * H) / 2;
printf("%.14Lf", ans);
cout << " ";
if (x == W / 2 && y == H / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define chmin(x, y) (x = min(x, y))
#define chmax(x, y) (x = max(x, y))
// ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ll mod = 1e9 + 7;
const ll IMF = 1LL << 29;
const double PI = 3.14159265358979323846;
int main() {
long double W, H, x, y;
cin >> W >> H >> x >> y;
long double ans = (W * H) / 2;
printf("%.14Lf", ans);
cout << " ";
if (x == W / 2 && y == H / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| [
"variable_declaration.type.widen.change"
] | 817,392 | 817,393 | u195054737 | cpp |
p03001 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define chmin(x, y) (x = min(x, y))
#define chmax(x, y) (x = max(x, y))
// ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ll mod = 1e9 + 7;
const ll IMF = 1LL << 29;
const double PI = 3.14159265358979323846;
int main() {
ll W, H, x, y;
cin >> W >> H >> x >> y;
long double ans = (W * H) / 2;
printf("%.10Lf", ans);
cout << " ";
if (x == W / 2 && y == H / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define chmin(x, y) (x = min(x, y))
#define chmax(x, y) (x = max(x, y))
// ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ll mod = 1e9 + 7;
const ll IMF = 1LL << 29;
const double PI = 3.14159265358979323846;
int main() {
long double W, H, x, y;
cin >> W >> H >> x >> y;
long double ans = (W * H) / 2;
printf("%.14Lf", ans);
cout << " ";
if (x == W / 2 && y == H / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| [
"variable_declaration.type.widen.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,394 | 817,393 | u195054737 | cpp |
p03001 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define chmin(x, y) (x = min(x, y))
#define chmax(x, y) (x = max(x, y))
// ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ll mod = 1e9 + 7;
const ll IMF = 1LL << 29;
const double PI = 3.14159265358979323846;
int main() {
int W, H, x, y;
cin >> W >> H >> x >> y;
double ans = (W * H) / 2;
printf("%.10f", ans);
cout << " ";
if (x == W / 2 && y == H / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, x) for (ll i = 0; i < (ll)(x); i++)
#define rrep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define chmin(x, y) (x = min(x, y))
#define chmax(x, y) (x = max(x, y))
// ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ll mod = 1e9 + 7;
const ll IMF = 1LL << 29;
const double PI = 3.14159265358979323846;
int main() {
long double W, H, x, y;
cin >> W >> H >> x >> y;
long double ans = (W * H) / 2;
printf("%.14Lf", ans);
cout << " ";
if (x == W / 2 && y == H / 2)
cout << 1 << endl;
else
cout << 0 << endl;
}
| [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,395 | 817,393 | u195054737 | cpp |
p03001 | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) int((x).size())
#define OUT(x) cout << (x) << endl
typedef long long ll;
typedef vector<int> V;
typedef vector<vector<int>> VV;
typedef pair<int, int> P;
typedef map<string, int> M;
typedef unordered_map<int, int> HM;
typedef set<int> S;
typedef multiset<int> MS;
typedef queue<int> Q;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2) {
cout << w * h / 2.0 << " " << 1 << endl;
} else
cout << w * h / 2.0 << " " << 0 << endl;
}
| #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) int((x).size())
#define OUT(x) cout << (x) << endl
typedef long long ll;
typedef vector<int> V;
typedef vector<vector<int>> VV;
typedef pair<int, int> P;
typedef map<string, int> M;
typedef unordered_map<int, int> HM;
typedef set<int> S;
typedef multiset<int> MS;
typedef queue<int> Q;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2) {
cout << w * h / 2.0 << " " << 1 << endl;
} else
cout << w * h / 2.0 << " " << 0 << endl;
}
| [
"variable_declaration.type.primitive.change"
] | 817,398 | 817,399 | u901615543 | cpp |
p03001 | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) int((x).size())
#define OUT(x) cout << (x) << endl
typedef long long ll;
typedef vector<int> V;
typedef vector<vector<int>> VV;
typedef pair<int, int> P;
typedef map<string, int> M;
typedef unordered_map<int, int> HM;
typedef set<int> S;
typedef multiset<int> MS;
typedef queue<int> Q;
int main() {
int w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2) {
cout << w * h / 2 << " " << 1 << endl;
} else
cout << w * h / 2 << " " << 0 << endl;
} | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) int((x).size())
#define OUT(x) cout << (x) << endl
typedef long long ll;
typedef vector<int> V;
typedef vector<vector<int>> VV;
typedef pair<int, int> P;
typedef map<string, int> M;
typedef unordered_map<int, int> HM;
typedef set<int> S;
typedef multiset<int> MS;
typedef queue<int> Q;
int main() {
double w, h, x, y;
cin >> w >> h >> x >> y;
if (x == w / 2 && y == h / 2) {
cout << w * h / 2.0 << " " << 1 << endl;
} else
cout << w * h / 2.0 << " " << 0 << endl;
}
| [
"variable_declaration.type.primitive.change",
"literal.number.change",
"io.output.change"
] | 817,400 | 817,399 | u901615543 | cpp |
p03001 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <iterator>
#include <set>
using namespace std;
using namespace __gnu_pbds;
#define ft first
#define sd second
#define pb push_back
#define all(x) x.begin(), x.end()
#define ll long long int
#define vi vector<int>
#define vii vector<pair<int, int>>
#define pii pair<int, int>
#define plii pair<pair<ll, int>, int>
#define piii pair<pii, int>
#define viii vector<pair<pii, int>>
#define vl vector<ll>
#define vll vector<pair<ll, ll>>
#define pll pair<ll, ll>
#define pli pair<ll, int>
#define mp make_pair
#define ms(x, v) memset(x, v, sizeof x)
#define pr_vec(v) \
for (int i = 0; i < v.size(); i++) \
cout << v[i] << " ";
#define f_in(st) freopen(st, "r", stdin)
#define f_out(st) freopen(st, "w", stdout)
#define INF INT_MAX
#define matrix vector<vector<ll>>
#define fr(i, a, b) for (i = a; i <= b; i++)
#define fb(i, a, b) for (i = a; i >= b; i--)
#define ASST(x, l, r) assert(x <= r && x >= l)
typedef tree<pll, null_type, less<pll>, rb_tree_tag,
tree_order_statistics_node_update>
new_data_set;
const int N = 1e3 + 10, M = (ll)1e9 + 1;
const int mod = 998244353;
// ll n,m,a[N][N],dp[N][N],cnt[N][N],cnt2[N][N];
void work() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
double ar = (w * h) / 2.0, ok = 1;
if (2 * x == w && 2 * y == h)
ok = 0;
cout << fixed << setprecision(9) << ar << " " << (ll)ok;
}
int main() {
ios_base::sync_with_stdio(0);
ll t, z;
// cin >> t;
// z=t;
t = 1;
while (t--) {
// cout << "Case #" << z-t << ": ";
work();
}
return 0;
}
| #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <iterator>
#include <set>
using namespace std;
using namespace __gnu_pbds;
#define ft first
#define sd second
#define pb push_back
#define all(x) x.begin(), x.end()
#define ll long long int
#define vi vector<int>
#define vii vector<pair<int, int>>
#define pii pair<int, int>
#define plii pair<pair<ll, int>, int>
#define piii pair<pii, int>
#define viii vector<pair<pii, int>>
#define vl vector<ll>
#define vll vector<pair<ll, ll>>
#define pll pair<ll, ll>
#define pli pair<ll, int>
#define mp make_pair
#define ms(x, v) memset(x, v, sizeof x)
#define pr_vec(v) \
for (int i = 0; i < v.size(); i++) \
cout << v[i] << " ";
#define f_in(st) freopen(st, "r", stdin)
#define f_out(st) freopen(st, "w", stdout)
#define INF INT_MAX
#define matrix vector<vector<ll>>
#define fr(i, a, b) for (i = a; i <= b; i++)
#define fb(i, a, b) for (i = a; i >= b; i--)
#define ASST(x, l, r) assert(x <= r && x >= l)
typedef tree<pll, null_type, less<pll>, rb_tree_tag,
tree_order_statistics_node_update>
new_data_set;
const int N = 1e3 + 10, M = (ll)1e9 + 1;
const int mod = 998244353;
// ll n,m,a[N][N],dp[N][N],cnt[N][N],cnt2[N][N];
void work() {
ll w, h, x, y;
cin >> w >> h >> x >> y;
double ar = (w * h) / 2.0, ok = 0;
if (2 * x == w && 2 * y == h)
ok = 1;
cout << fixed << setprecision(9) << ar << " " << (ll)ok;
}
int main() {
ios_base::sync_with_stdio(0);
ll t, z;
// cin >> t;
// z=t;
t = 1;
while (t--) {
// cout << "Case #" << z-t << ": ";
work();
}
return 0;
}
| [
"literal.number.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 817,401 | 817,402 | u888735570 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
float w, h, x, y;
cin >> w >> h >> x >> y;
if (w == x + x && h / 2.0 == y + y) {
cout << w * h / 2.0 << " " << 1;
return 0;
} else {
cout << w * h / 2.0 << " " << 0;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
long long w, h, x, y;
cin >> w >> h >> x >> y;
if (w == x + x && h == y + y) {
cout << w * h / 2.0 << " " << 1;
return 0;
} else {
cout << w * h / 2.0 << " " << 0;
}
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"expression.operation.binary.remove"
] | 817,415 | 817,414 | u653206280 | cpp |
p03001 | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = 1.000000;
ans *= W * H / 2;
printf("%f", ans);
if (W / 2 == x && H / 2 == y) {
puts(" 1");
} else {
puts(" 2");
}
} | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int main() {
double W, H, x, y;
cin >> W >> H >> x >> y;
double ans = 1.000000;
ans *= W * H / 2;
printf("%f ", ans);
if (W / 2 == x && H / 2 == y) {
puts("1");
} else {
puts("0");
}
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 817,422 | 817,423 | u685922019 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int w, h, x, y;
cin >> w >> h >> x >> y;
cout << (double)w * h / 2 << ' ';
if (x == (double)w / 2 || y == (double)h / 2)
cout << 1;
else
cout << 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int w, h, x, y;
cin >> w >> h >> x >> y;
cout << (double)w * h / 2 << ' ';
if (x == (double)w / 2 && y == (double)h / 2)
cout << 1;
else
cout << 0;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 817,426 | 817,427 | u408650734 | cpp |
p03001 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool is_even(int w, int h, int x, int y) {
return ((w - x == w) && (h - y == h));
}
int main(int argc, char **argv) {
int w, h, x, y;
cin >> w >> h >> x >> y;
if (is_even(w, h, x, y)) {
cout << setprecision(9) << (double)w * h / (double)2 << " " << 1 << endl;
} else {
cout << setprecision(9) << (double)w * h / (double)2 << " " << 0 << endl;
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool is_even(int w, int h, int x, int y) {
return ((w - x == x) && (h - y == y));
}
int main(int argc, char **argv) {
int w, h, x, y;
cin >> w >> h >> x >> y;
if (is_even(w, h, x, y)) {
cout << setprecision(9) << (double)w * h / (double)2 << " " << 1 << endl;
} else {
cout << setprecision(9) << (double)w * h / (double)2 << " " << 0 << endl;
}
return 0;
} | [
"identifier.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 817,434 | 817,435 | u603356062 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 0;
double w, h, x, y;
cin >> w >> h >> x >> y;
cout << h * w / 2;
if (x == w / 2 && y == h / 2)
ans = 1;
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 0;
double w, h, x, y;
cin >> w >> h >> x >> y;
cout << h * w / 2;
if (x == w / 2 && y == h / 2)
ans = 1;
cout << " " << ans << endl;
} | [
"io.output.change"
] | 817,440 | 817,441 | u370447425 | cpp |
p03001 | #include <bits/stdc++.h>
#define CEIL(a, b) ((a) / (b) + ((a) % (b) == 0 ? 0 : 1))
using namespace std;
using ll = long long;
using pii = pair<int, int>;
constexpr int MOD = 1'000'000'007;
constexpr int INF = 1'000'000'001;
constexpr ll LLINF = 4'000'000'000'000'000'001;
// constexpr int INF = 2147483647; // 2 * 1e9
// constexpr ll LLINF = 9223372036854775807; // 9 * 1e18
const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1, 0};
const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1, 0};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(10);
int w, h, x, y;
cin >> w >> h >> x >> y;
double ans = (double)w * h / 2;
int cnt = (w / 2 == x && w % 2 == 0) + (h / 2 == y && h % 2 == 0) - 1;
cout << ans << " " << cnt << "\n";
return 0;
} | #include <bits/stdc++.h>
#define CEIL(a, b) ((a) / (b) + ((a) % (b) == 0 ? 0 : 1))
using namespace std;
using ll = long long;
using pii = pair<int, int>;
constexpr int MOD = 1'000'000'007;
constexpr int INF = 1'000'000'001;
constexpr ll LLINF = 4'000'000'000'000'000'001;
// constexpr int INF = 2147483647; // 2 * 1e9
// constexpr ll LLINF = 9223372036854775807; // 9 * 1e18
const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1, 0};
const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1, 0};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(10);
int w, h, x, y;
cin >> w >> h >> x >> y;
double ans = (double)w * h / 2;
int cnt = (w / 2 == x && w % 2 == 0) + (h / 2 == y && h % 2 == 0) - 1;
cout << ans << " " << max(cnt, 0) << "\n";
return 0;
} | [
"call.add",
"call.arguments.add"
] | 817,444 | 817,445 | u993640894 | cpp |
p03001 | #include <bits/stdc++.h>
using namespace std;
/* g++ -g -fsanitize=address -lasan -std=c++11 -Dfoo_ */
/* freopen("input.txt", "rt", stdin); */
/* freopen("output.txt", "wt", stdout); */
#define ALL(c) (c).begin(), (c).end()
#define ALLR(c) (c).rbegin(), (c).rend()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a); i > (b); --i)
#define FOR_ALL(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define FOR_ALLR(i, c) \
for (__typeof((c).rbegin()) i = (c).rbegin(); i != (c).rend(); ++i)
#define SZ(array) (sizeof(array) / sizeof(array[0]))
#define lc(x) (x << 1) /* 2*x */
#define rc(x) (x << 1 | 1) /* 2*x+1 */
#define lowbit(x) (x & (-x)) /* 0b10100 -> 0b100 */
typedef long long LL;
typedef map<int, int> MII;
typedef pair<int, int> PII;
typedef set<int> SI;
typedef vector<bool> VB;
typedef vector<double> VD;
typedef vector<int> VI;
typedef vector<string> VS;
/* check if a key is in container C */
template <class C> inline bool in_(const typename C::key_type &k, const C &A) {
return A.find(k) != A.end();
}
inline bool in_(const string &s, const string &S) {
return S.find(s) != string::npos;
}
int main() {
#ifdef foo_
freopen("foo", "rt", stdin);
#endif
ios::sync_with_stdio(false);
int w, h, x, y;
while (cin >> w >> h >> x >> y) {
const double A = 0.1 * w * h / 2;
int ans = 0;
if (w - x == x && h - y == y)
ans = 1;
printf("%.10f %d\n", A, ans);
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
/* g++ -g -fsanitize=address -lasan -std=c++11 -Dfoo_ */
/* freopen("input.txt", "rt", stdin); */
/* freopen("output.txt", "wt", stdout); */
#define ALL(c) (c).begin(), (c).end()
#define ALLR(c) (c).rbegin(), (c).rend()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a); i > (b); --i)
#define FOR_ALL(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define FOR_ALLR(i, c) \
for (__typeof((c).rbegin()) i = (c).rbegin(); i != (c).rend(); ++i)
#define SZ(array) (sizeof(array) / sizeof(array[0]))
#define lc(x) (x << 1) /* 2*x */
#define rc(x) (x << 1 | 1) /* 2*x+1 */
#define lowbit(x) (x & (-x)) /* 0b10100 -> 0b100 */
typedef long long LL;
typedef map<int, int> MII;
typedef pair<int, int> PII;
typedef set<int> SI;
typedef vector<bool> VB;
typedef vector<double> VD;
typedef vector<int> VI;
typedef vector<string> VS;
/* check if a key is in container C */
template <class C> inline bool in_(const typename C::key_type &k, const C &A) {
return A.find(k) != A.end();
}
inline bool in_(const string &s, const string &S) {
return S.find(s) != string::npos;
}
int main() {
#ifdef foo_
freopen("foo", "rt", stdin);
#endif
ios::sync_with_stdio(false);
int w, h, x, y;
while (cin >> w >> h >> x >> y) {
const double A = 1.0 * w * h / 2;
int ans = 0;
if (w - x == x && h - y == y)
ans = 1;
printf("%.10f %d\n", A, ans);
}
return 0;
}
| [
"literal.number.change",
"expression.operation.binary.change"
] | 817,448 | 817,449 | u668711082 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.