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 |
|---|---|---|---|---|---|---|---|
p02999 | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a;
cin >> b;
if (a <= b) {
cout << 0 << endl;
} else {
cout << 10 << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b) {
cout << 0 << endl;
} else {
cout << 10 << endl;
}
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,840 | 809,841 | u728824436 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1000000007;
int main() {
int X, A;
cin >> X >> A;
if (X < A)
cout << 0 << endl;
else
cout << 1 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1000000007;
int main() {
int X, A;
cin >> X >> A;
if (X < A)
cout << 0 << endl;
else
cout << 10 << endl;
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 809,850 | 809,851 | u831873811 | cpp |
p02999 | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define DEBUG
#ifdef DEBUG
#define debug printf
#else
#define debug(...)
#endif
int main(int argc, char const *argv[]) {
int x, a;
cin >> x >> a;
if (x < 0) {
printf("0\n");
} else {
printf("10\n");
}
return 0;
} | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define DEBUG
#ifdef DEBUG
#define debug printf
#else
#define debug(...)
#endif
int main(int argc, char const *argv[]) {
int x, a;
cin >> x >> a;
if (x < a) {
printf("0\n");
} else {
printf("10\n");
}
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 809,852 | 809,853 | u320267258 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
std::cin >> x >> a;
if (x > a)
std::cout << '1';
std::cout << '0' << std::endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
std::cin >> x >> a;
if (x >= a)
std::cout << '1';
std::cout << '0' << std::endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,856 | 809,857 | u832726997 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a > b ? 10 : 0) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a >= b ? 10 : 0) << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 809,866 | 809,867 | u676654593 | cpp |
p02999 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(void) {
int A, X;
int res;
cin >> A >> X;
res = (X < A) ? 0 : 10;
cout << res;
}
| #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(void) {
int A, X;
int res;
cin >> X >> A;
res = (X < A) ? 0 : 10;
cout << res;
}
| [
"expression.operation.binary.remove"
] | 809,873 | 809,874 | u209053759 | cpp |
p02999 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << 0 << endl;
} else if (x <= a) {
cout << 10 << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << 0 << endl;
}
if (x >= a) {
cout << 10 << endl;
}
return 0;
} | [
"control_flow.branch.if.replace.add",
"control_flow.branch.else_if.replace.remove",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,882 | 809,883 | u294829559 | cpp |
p02999 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << 0 << endl;
} else if (x <= a) {
cout << 10 << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << 0 << endl;
} else if (x >= a) {
cout << 10 << endl;
}
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,882 | 809,884 | u294829559 | cpp |
p02999 | #include <iostream>
using namespace std;
int main(void) {
int X, A;
cin >> X >> A;
if (X <= A) {
cout << 0 << endl;
} else if (X >= A) {
cout << 10 << endl;
} else if (X == A) {
cout << 10 << endl;
}
} | #include <iostream>
using namespace std;
int main(void) {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else if (X > A) {
cout << 10 << endl;
} else if (X == A) {
cout << 10 << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,885 | 809,886 | u413186616 | cpp |
p02999 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int i, j;
cin >> i >> j;
if (i > j) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main(void) {
int i, j;
cin >> i >> j;
if (i < j) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
return 0;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,887 | 809,888 | u370315157 | cpp |
p02999 | #include <algorithm>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i, a, b) for (ll i = (ll)a; i < (ll)b; i++)
#define rep(i, n) FOR(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define rmsame(a) sort(all(a)), a.erase(unique(all(a)), a.end())
#define rmvector(a, b) \
rep(i, a.size()) rep(j, b.size()) if (a[i] == b[j]) { \
a.erase(a.begin() + i); \
i--; \
break; \
}
#define first_more_idx(ve, num) \
upper_bound(all(ve), num) - ve.begin() // idx = first_more_idx(ve,num); if(idx
// = ve.size()) , then not exist
#define first_lessequal_idx(ve, num) lower_bound(all(ve), num) - ve.begin()
#define pq_pair_tB \
priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>
#define pq_pair_ts priority_queue<pair<ll, ll>> // only sort first param
template <typename X> bool exist(vector<X> vec, X item) {
return find(all(vec), item) != vec.end();
}
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll power(ll x, ll n) {
if (n == 0)
return 1;
return (n % 2) ? x * power(x, n - 1) % MOD : power(x * x % MOD, n / 2);
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll X, A;
cin >> X >> A;
if (X <= A)
cout << 0 << endl;
else
cout << 10 << endl;
// cout << fixed << setprecision(16) << ans << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i, a, b) for (ll i = (ll)a; i < (ll)b; i++)
#define rep(i, n) FOR(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define rmsame(a) sort(all(a)), a.erase(unique(all(a)), a.end())
#define rmvector(a, b) \
rep(i, a.size()) rep(j, b.size()) if (a[i] == b[j]) { \
a.erase(a.begin() + i); \
i--; \
break; \
}
#define first_more_idx(ve, num) \
upper_bound(all(ve), num) - ve.begin() // idx = first_more_idx(ve,num); if(idx
// = ve.size()) , then not exist
#define first_lessequal_idx(ve, num) lower_bound(all(ve), num) - ve.begin()
#define pq_pair_tB \
priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>
#define pq_pair_ts priority_queue<pair<ll, ll>> // only sort first param
template <typename X> bool exist(vector<X> vec, X item) {
return find(all(vec), item) != vec.end();
}
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll power(ll x, ll n) {
if (n == 0)
return 1;
return (n % 2) ? x * power(x, n - 1) % MOD : power(x * x % MOD, n / 2);
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll X, A;
cin >> X >> A;
if (X < A)
cout << 0 << endl;
else
cout << 10 << endl;
// cout << fixed << setprecision(16) << ans << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,900 | 809,901 | u866107333 | cpp |
p02999 | #include <bits/stdc++.h>
#define sz(c) int(c.size())
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define per(i, a, b) for (int i = (b)-1; i >= (a); --i)
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
cout << fixed << setprecision(10);
int x, a;
cin >> x >> a;
cout << (x / a) * 10 << "\n";
}
| #include <bits/stdc++.h>
#define sz(c) int(c.size())
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define per(i, a, b) for (int i = (b)-1; i >= (a); --i)
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
cout << fixed << setprecision(10);
int x, a;
cin >> x >> a;
cout << (x >= a) * 10 << "\n";
}
| [
"io.output.change"
] | 809,915 | 809,916 | u740102500 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, x;
cin >> a >> x;
if (x < a) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, x;
cin >> x >> a;
if (x < a) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
return 0;
}
| [
"expression.operation.binary.remove"
] | 809,919 | 809,920 | u010685577 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 1 << endl;
else
cout << 10 << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0 << endl;
else
cout << 10 << endl;
} | [
"literal.number.change",
"io.output.change"
] | 809,933 | 809,934 | u544165468 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
scanf("%d%d", &a, &b);
printf("%d", a > b ? 0 : 10);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
scanf("%d%d", &a, &b);
printf("%d", a < b ? 0 : 10);
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 809,935 | 809,936 | u508834119 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (x > y) {
cout << "10" << endl;
} else
cout << "0" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (x >= y) {
cout << "10" << endl;
} else
cout << "0" << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,954 | 809,955 | u432205669 | cpp |
p02999 |
#include <iostream>
int main(void) {
int A, X;
std::cin >> A >> X;
if (X < A)
std::cout << 0 << std::endl;
else
std::cout << 10 << std::endl;
return 0;
} | #include <iostream>
int main(void) {
int A, X;
std::cin >> X >> A;
if (X < A)
std::cout << 0 << std::endl;
else
std::cout << 10 << std::endl;
return 0;
} | [
"expression.operation.binary.remove"
] | 809,959 | 809,960 | u967843578 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else if (X <= A) {
cout << 10 << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else if (X >= A) {
cout << 10 << endl;
}
return 0;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 809,966 | 809,967 | u236517920 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else {
cout << 1 << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else {
cout << 10 << endl;
}
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 809,978 | 809,979 | u807156908 | cpp |
p02999 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <list>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1012345678;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
#include <math.h>
#include <stdio.h>
#define PI 3.141592653
int main() {
int A;
int X;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else
cout << 1 << endl;
return 0;
}
// ./compile.sh main
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <list>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1012345678;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
#include <math.h>
#include <stdio.h>
#define PI 3.141592653
int main() {
int A;
int X;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else
cout << 10 << endl;
return 0;
}
// ./compile.sh main
| [
"literal.number.change",
"io.output.change"
] | 809,985 | 809,986 | u950174376 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x, a;
if (x < a)
cout << "0";
else
cout << "10";
return 0;
} | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << "0";
else
cout << "10";
return 0;
} | [] | 809,987 | 809,988 | u924527074 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x, a;
if (x < a)
cout << "0";
else
cout << "1";
return 0;
} | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << "0";
else
cout << "10";
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 809,989 | 809,988 | u924527074 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
scanf("%d %d", &a, &b);
printf("%d\n", a < b ? 1 : 10);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
scanf("%d %d", &a, &b);
printf("%d\n", a < b ? 0 : 10);
} | [
"literal.number.change",
"call.arguments.change",
"io.output.change"
] | 809,997 | 809,998 | u702404504 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (A <= X) {
cout << 1;
} else {
cout << 0;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (A <= X) {
cout << 10;
} else {
cout << 0;
}
return 0;
} | [
"literal.number.change",
"io.output.change"
] | 810,011 | 810,012 | u367177642 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << "0" << endl;
} else {
cout << "1" << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 810,019 | 810,020 | u065375429 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0 << endl;
cout << 10 << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0 << endl;
else
cout << 10 << endl;
return 0;
} | [
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 810,028 | 810,029 | u211795663 | cpp |
p02999 | #include <iostream>
int main(void) {
int X, A;
std::cin >> X >> A;
std::cout << (X < A) ? 0 : 10;
return 0;
}
| #include <iostream>
int main(void) {
int X, A;
std::cin >> X >> A;
std::cout << ((X < A) ? 0 : 10);
return 0;
}
| [] | 810,036 | 810,037 | u459819918 | cpp |
p02999 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()
int tt = 1;
void ok() {
int a, x;
cin >> a >> x;
cout << ((x < a) ? 0 : 10) << "\n";
}
int32_t main() {
int t = 1;
// cin >> t;
int c = 0;
while (t--) {
ok();
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()
int tt = 1;
void ok() {
int a, x;
cin >> x >> a;
cout << ((x < a) ? 0 : 10) << "\n";
}
int32_t main() {
int t = 1;
// cin >> t;
int c = 0;
while (t--) {
ok();
}
return 0;
}
| [
"expression.operation.binary.remove"
] | 810,038 | 810,039 | u745631549 | cpp |
p02999 | #include <iostream>
#include <stdio.h>
int main() {
int n, m;
std::cin >> n, m;
puts(n < m ? "0" : "10");
} | #include <iostream>
#include <stdio.h>
int main() {
int n, m;
std::cin >> n >> m;
puts(n < m ? "0" : "10");
} | [] | 810,046 | 810,047 | u244203620 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
cout << (x < a) ? (0) : (10);
return 0;
} | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
cout << ((x < a) ? (0) : (10));
return 0;
} | [] | 810,055 | 810,056 | u061626279 | cpp |
p02999 | #include <stdio.h>
int X;
int A;
int main() {
scanf("%d %d", X, A);
if (X < A)
printf("0");
else
printf("10");
return 0;
} | #include <stdio.h>
using namespace std;
int X;
int A;
int main() {
scanf("%d %d", &X, &A);
if (X < A)
printf("0");
else
printf("10");
return 0;
}
| [
"expression.operation.unary.reference.add"
] | 810,057 | 810,058 | u088989565 | cpp |
p02999 | #include <algorithm> // sort
#include <bits/stdc++.h>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map> // pair
#include <math.h>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define nin(n) \
int n; \
cin >> n;
#define kin(k) \
int k; \
cin >> k;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << "0" << endl;
} else {
cout << "1" << endl;
}
} | #include <algorithm> // sort
#include <bits/stdc++.h>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map> // pair
#include <math.h>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define nin(n) \
int n; \
cin >> n;
#define kin(k) \
int k; \
cin >> k;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 810,278 | 810,279 | u132284673 | cpp |
p02999 | #include <cstdio>
int main() {
int x, a;
scanf("%d %d", &x, &a);
if (x > a)
printf("0");
else
printf("10");
}
| #include <cstdio>
int main() {
int x, a;
scanf("%d %d", &x, &a);
if (x < a)
printf("0");
else
printf("10");
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,282 | 810,283 | u175715341 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << '0' << endl;
} else {
cout << '10' << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 810,288 | 810,289 | u478018523 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, c, ans, temp;
cin >> n >> a;
if (n <= a) {
cout << 10;
} else {
cout << 0;
}
// cout << ;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, c, ans, temp;
cin >> n >> a;
if (a <= n) {
cout << 10;
} else {
cout << 0;
}
// cout << ;
return 0;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 810,290 | 810,291 | u922786510 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int n, x;
cin >> n >> x;
if (x < n)
cout << 0;
else
cout << 10;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, x;
cin >> x >> n;
if (x < n)
cout << 0;
else
cout << 10;
return 0;
} | [
"expression.operation.binary.remove"
] | 810,302 | 810,303 | u264043768 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b;
if (a < b) {
cout << 10;
} else
cout << 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b;
if (a < b) {
cout << 0;
} else
cout << 10;
}
| [
"literal.number.change",
"io.output.change"
] | 810,304 | 810,305 | u661845689 | cpp |
p02999 | #include <bits/stdc++.h>
#define ll long long
#define speed_up \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define pb push_back
using namespace std;
int main() {
ll x, a;
cin >> x >> a;
if (x < a)
cout << a;
else
cout << 10;
return 0;
} | #include <bits/stdc++.h>
#define ll long long
#define speed_up \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define pb push_back
using namespace std;
int main() {
ll x, a;
cin >> x >> a;
if (x < a)
cout << 0;
else
cout << 10;
return 0;
} | [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 810,306 | 810,307 | u223028888 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a <= b)
cout << 0 << endl;
else
cout << 10 << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b)
cout << 0 << endl;
else
cout << 10 << endl;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,316 | 810,317 | u466983830 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
// 整数Xの入力
int X;
cin >> X;
// 整数Aの入力
int A;
cin >> A;
// 分岐
if (X < A) { // XがA未満のときは0を出力する
cout << 0 << endl;
}
else { // X >= A以上の時10を出力せよ。
cout << 0 << endl;
}
} | #include <iostream>
using namespace std;
int main() {
// 整数Xの入力
int X;
cin >> X;
// 整数Aの入力
int A;
cin >> A;
// 分岐
if (X < A) { // XがA未満のときは0を出力する
cout << 0 << endl;
}
else { // X >= A以上の時10を出力せよ。
cout << 10 << endl;
}
} | [
"literal.number.change",
"io.output.change"
] | 810,318 | 810,319 | u203694953 | cpp |
p02999 | #include <iostream>
using namespace std;
int main(void) {
int a, b;
cin >> a >> b;
if (a < b) {
cout << "0";
} else if (a >= b) {
cout << "1";
}
cout << endl;
}
| #include <iostream>
using namespace std;
int main(void) {
int a, b;
cin >> a >> b;
if (a < b) {
cout << "0";
} else if (a >= b) {
cout << "10";
}
cout << endl;
}
| [
"literal.string.change",
"io.output.change"
] | 810,340 | 810,341 | u869112787 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
cout << (A - X >= 0) * 10 << endl;
} | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
cout << (X - A >= 0) * 10 << endl;
} | [
"expression.operation.binary.remove"
] | 810,350 | 810,351 | u313403396 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
cout << (X - A <= 0) * 10 << endl;
} | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
cout << (X - A >= 0) * 10 << endl;
} | [
"misc.opposites",
"expression.operator.compare.change",
"io.output.change"
] | 810,352 | 810,351 | u313403396 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> a >> x;
if (x < a) {
cout << 0;
} else {
cout << 10;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << 0;
} else {
cout << 10;
}
}
| [
"expression.operation.binary.remove"
] | 810,366 | 810,367 | u521723672 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X > A) {
printf("0");
} else {
printf("10");
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
printf("0");
} else {
printf("10");
}
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,368 | 810,369 | u840958781 | cpp |
p02999 | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << x << endl;
else
cout << 10 << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0 << endl;
else
cout << 10 << endl;
return 0;
} | [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 810,385 | 810,386 | u754144235 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x > a) {
cout << 10 << endl;
} else {
cout << 0 << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x >= a) {
cout << 10 << endl;
} else {
cout << 0 << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,387 | 810,388 | u600611341 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << '0' << endl;
else
cout << '10' << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << "0" << endl;
else
cout << "10" << endl;
} | [
"literal.string.change",
"io.output.change"
] | 810,389 | 810,390 | u111886521 | cpp |
p02999 | #include <bits/stdc++.h>
#include <string>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
#define INF (1e9)
// テンプレート関数
#define REP(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
int main() {
int X, A;
cin >> X >> A;
int ans = 0;
if (X > A) {
ans = 10;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
#include <string>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
#define INF (1e9)
// テンプレート関数
#define REP(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
int main() {
int X, A;
cin >> X >> A;
int ans = 0;
if (X >= A) {
ans = 10;
}
cout << ans << endl;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,393 | 810,394 | u490932182 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (long long i = 0; i < n; i++)
#define REP1(i, n) for (long long i = 1; i <= n; i++)
#define PER(i, n) for (long long i = ((n)-1); i >= 0; i--)
#define PER1(i, n) for (long long i = (n); i > 0; i--)
#define FOR(i, a, b) for (long long i = (a); i < (b); i++)
#define FORE(i, a, b) for (long long i = (a); i <= (b); i++)
#define ITE(arr) for (auto ite = (arr).begin(); ite != (arr).end(); ite++)
#define ALL(a) (a.begin()), (a.end())
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define YNPRT(b) cout << ((b) ? "Yes" : "No") << endl
#define REV(arr) reverse(ALL(arr))
#define PRT(a) cout << a << endl;
#define PRTLST(arr, num) REP(_i, num) cout << _i << " - " << arr[_i] << endl;
#define PRTLST2(arr2, d1, d2) \
REP(_i, d1) \
REP(_j, d2) cout << _i << "," << _j << " : " << arr2[_i][_j] << endl;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
const int INF_INT = 2147483647;
const ll INF_LL = 9223372036854775807LL;
const ull INF_ULL = 18446744073709551615Ull;
const ll P = 92540646808111039LL;
const int Move[4][2] = {-1, 0, 1, 0, 0, 1, 0, -1};
const int Move_[8][2] = {-1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 1};
//---------------------
#define MAXN 100000
//---------------------
ll x, a;
int main() {
cin >> x >> a;
cout << (x < 0 ? 0 : 10) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (long long i = 0; i < n; i++)
#define REP1(i, n) for (long long i = 1; i <= n; i++)
#define PER(i, n) for (long long i = ((n)-1); i >= 0; i--)
#define PER1(i, n) for (long long i = (n); i > 0; i--)
#define FOR(i, a, b) for (long long i = (a); i < (b); i++)
#define FORE(i, a, b) for (long long i = (a); i <= (b); i++)
#define ITE(arr) for (auto ite = (arr).begin(); ite != (arr).end(); ite++)
#define ALL(a) (a.begin()), (a.end())
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define YNPRT(b) cout << ((b) ? "Yes" : "No") << endl
#define REV(arr) reverse(ALL(arr))
#define PRT(a) cout << a << endl;
#define PRTLST(arr, num) REP(_i, num) cout << _i << " - " << arr[_i] << endl;
#define PRTLST2(arr2, d1, d2) \
REP(_i, d1) \
REP(_j, d2) cout << _i << "," << _j << " : " << arr2[_i][_j] << endl;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
const int INF_INT = 2147483647;
const ll INF_LL = 9223372036854775807LL;
const ull INF_ULL = 18446744073709551615Ull;
const ll P = 92540646808111039LL;
const int Move[4][2] = {-1, 0, 1, 0, 0, 1, 0, -1};
const int Move_[8][2] = {-1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 1};
//---------------------
#define MAXN 100000
//---------------------
ll x, a;
int main() {
cin >> x >> a;
cout << (x < a ? 0 : 10) << endl;
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 810,395 | 810,396 | u786318703 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
int res = (x < a) ? 0 : 1;
cout << res << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
int res = (x < a) ? 0 : 10;
cout << res << endl;
return 0;
} | [
"literal.number.change"
] | 810,402 | 810,403 | u455317716 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int x, a;
cin >> x >> a;
if (x < 0)
cout << 0;
else
cout << 10;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int x, a;
cin >> x >> a;
if (x < a)
cout << 0;
else
cout << 10;
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 810,414 | 810,415 | u788544244 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (A < 0)
cout << 0;
else
cout << 10;
}
| #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A)
cout << 0;
else
cout << 10;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"identifier.replace.add",
"literal.replace.remove"
] | 810,419 | 810,420 | u275488634 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, z;
cin >> x >> z;
if (x <= z)
cout << "0";
else
cout << "10";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, z;
cin >> x >> z;
if (x < z)
cout << "0";
else
cout << "10";
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,427 | 810,428 | u728408455 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
if (n > m)
cout << "0" << endl;
else
cout << "10" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
if (n < m)
cout << "0" << endl;
else
cout << "10" << endl;
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,431 | 810,432 | u787972656 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x > a)
cout << 10;
else
cout << 0;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0;
else
cout << 10;
return 0;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.branch.else.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 810,445 | 810,446 | u152997492 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a <= b)
cout << 0;
else
cout << 10;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b)
cout << 0;
else
cout << 10;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,447 | 810,448 | u923018133 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a + b < 10)
cout << 0;
else
cout << 10;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b)
cout << 0;
else
cout << 10;
return 0;
} | [
"expression.operation.binary.remove",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 810,449 | 810,448 | u923018133 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a, b;
if (a < b) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
return 0;
}
| [] | 810,452 | 810,453 | u818818531 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A)
cout << '0';
else {
cout << '10';
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A)
cout << '0';
else {
cout << "10";
}
} | [
"literal.string.change",
"io.output.change"
] | 810,458 | 810,459 | u341447450 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a > b)
cout << 10;
else
cout << 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b)
cout << 0;
else
cout << 10;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.branch.else.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 810,460 | 810,461 | u398059025 | cpp |
p02999 | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define REPN(i, n) for (int(i) = 1; (i) < (int)(n); (i)++)
#define _abs(x) ((x) > 0 ? (x) : -(x))
#define ll long long
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x, a) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
// system("pause");
return 0;
} | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define REPN(i, n) for (int(i) = 1; (i) < (int)(n); (i)++)
#define _abs(x) ((x) > 0 ? (x) : -(x))
#define ll long long
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << "0" << endl;
} else {
cout << "10" << endl;
}
// system("pause");
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 810,462 | 810,463 | u559149715 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A)
cout << '0' << endl;
else
cout << '10' << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A)
cout << 0 << endl;
else
cout << 10 << endl;
return 0;
}
| [] | 810,469 | 810,470 | u656527663 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else {
cout << 1 << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else {
cout << 10 << endl;
}
}
| [
"literal.number.change",
"io.output.change"
] | 810,477 | 810,478 | u788063708 | cpp |
p02999 | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x > a) {
cout << 0;
} else {
cout << 10;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << 0;
} else {
cout << 10;
}
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,479 | 810,480 | u125051909 | cpp |
p02999 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int X, A;
cin >> X >> A;
if (A < X)
cout << 0 << endl;
else
cout << 10 << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int X, A;
cin >> X >> A;
if (X < A)
cout << 0 << endl;
else
cout << 10 << endl;
return 0;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 810,483 | 810,484 | u777853124 | cpp |
p02999 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
typedef long long ll;
using namespace std;
int a, b;
int main() {
scanf("%sd%d", &a, &b);
printf("%d", a < b ? 0 : 10);
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
typedef long long ll;
using namespace std;
int a, b;
int main() {
scanf("%d%d", &a, &b);
printf("%d", a < b ? 0 : 10);
return 0;
} | [
"literal.string.change",
"call.arguments.change"
] | 810,491 | 810,492 | u885501507 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < n; ++i)
#define FORR(i, a, n) for (int i = a; i < n; ++i)
#define ALL(c) (c).begin(), (c).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
int in() {
int x;
scanf("%d", &x);
return x;
}
ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
void printfv(VI a) {
int n = a.size();
FOR(i, n) cout << a[i] << " ";
}
int main(void) {
int x, a;
cin >> a >> x;
if (x < a) {
cout << "0";
} else {
cout << "10";
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < n; ++i)
#define FORR(i, a, n) for (int i = a; i < n; ++i)
#define ALL(c) (c).begin(), (c).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
int in() {
int x;
scanf("%d", &x);
return x;
}
ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
void printfv(VI a) {
int n = a.size();
FOR(i, n) cout << a[i] << " ";
}
int main(void) {
int x, a;
cin >> x >> a;
if (x < a) {
cout << "0";
} else {
cout << "10";
}
return 0;
}
| [
"expression.operation.binary.remove"
] | 810,493 | 810,494 | u522598953 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (x >= y)
cout << "0";
else
cout << "10";
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (x >= y)
cout << "10";
else
cout << "0";
} | [
"control_flow.branch.else.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 810,498 | 810,499 | u786773683 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << '0';
} else {
cout << '10';
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a) {
cout << "0";
} else {
cout << "10";
}
} | [
"literal.string.change",
"io.output.change"
] | 810,500 | 810,501 | u583560632 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define ZERO (1e-10)
#define INF int(1e9 + 1)
#define CL(A, I) (memset(A, I, sizeof(A)))
#define DEB printf("DEB!\n");
#define D(X) cout << " " << #X ": " << X << endl;
#define EQ(A, B) (A + ZERO > B && A - ZERO < B)
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define IN(n) \
int n; \
scanf("%d", &n);
#define FOR(i, m, n) for (int i(m); i < n; i++)
#define F(n) FOR(i, 0, n)
#define FF(n) FOR(j, 0, n)
#define FT(m, n) FOR(k, m, n)
#define aa first
#define bb second
void ga(int N, int *A) { F(N) scanf("%d", A + i); }
int A, X;
int main(void) {
scanf("%d%d", &A, &X);
puts(X < A ? "0" : "10");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define ZERO (1e-10)
#define INF int(1e9 + 1)
#define CL(A, I) (memset(A, I, sizeof(A)))
#define DEB printf("DEB!\n");
#define D(X) cout << " " << #X ": " << X << endl;
#define EQ(A, B) (A + ZERO > B && A - ZERO < B)
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define IN(n) \
int n; \
scanf("%d", &n);
#define FOR(i, m, n) for (int i(m); i < n; i++)
#define F(n) FOR(i, 0, n)
#define FF(n) FOR(j, 0, n)
#define FT(m, n) FOR(k, m, n)
#define aa first
#define bb second
void ga(int N, int *A) { F(N) scanf("%d", A + i); }
int A, X;
int main(void) {
scanf("%d%d", &X, &A);
puts(X < A ? "0" : "10");
return 0;
}
| [
"identifier.change",
"call.arguments.change"
] | 810,502 | 810,503 | u710480858 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x > a)
cout << 0;
else
cout << 10;
}
| #include <iostream>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0;
else
cout << 10;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,504 | 810,505 | u927804708 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 1;
else
cout << 10;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0;
else
cout << 10;
} | [
"literal.number.change",
"io.output.change"
] | 810,508 | 810,509 | u506112954 | cpp |
p02999 | #include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < n; i++)
#define ALL(x) (x).begin(), (x).end()
#define MSG(x) cout << x << endl;
#define YN(x) x ? cout << "YES" << endl : cout << "NO" << endl;
#define Yn(x) x ? cout << "Yes" << endl : cout << "No" << endl;
#define yn(x) x ? cout << "yes" << endl : cout << "no" << endl;
using namespace std;
using ll = long long;
int main(int argc, char *argv[]) {
ll x, a;
cin >> x, a;
if (x < a)
MSG(0)
else
MSG(10)
return 0;
}
| #include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < n; i++)
#define ALL(x) (x).begin(), (x).end()
#define MSG(x) cout << x << endl;
#define YN(x) x ? cout << "YES" << endl : cout << "NO" << endl;
#define Yn(x) x ? cout << "Yes" << endl : cout << "No" << endl;
#define yn(x) x ? cout << "yes" << endl : cout << "no" << endl;
using namespace std;
using ll = long long;
int main(int argc, char *argv[]) {
ll x, a;
cin >> x >> a;
if (x < a)
MSG(0)
else
MSG(10)
return 0;
}
| [] | 810,510 | 810,511 | u720829795 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a > b)
printf("10");
else
printf("0");
printf("\n");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a >= b)
printf("10");
else
printf("0");
printf("\n");
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,514 | 810,515 | u073500051 | cpp |
p02999 | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
REP(i, v.size()) {
if (i)
os << " ";
os << v[i];
}
return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<vector<T>> &v) {
REP(i, v.size()) {
if (i)
os << endl;
os << v[i];
}
return os;
}
const ll INF = 1LL << 60;
ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;
#define int long long
inline void my_io() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
cout << fixed << setprecision(16);
// cout << setprecision(10) << scientific << ans << endl;
}
signed main() {
ll x, a;
cin >> x >> a;
if (x, a) {
cout << 0 << endl;
} else {
cout << 10 << endl;
}
} | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
REP(i, v.size()) {
if (i)
os << " ";
os << v[i];
}
return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<vector<T>> &v) {
REP(i, v.size()) {
if (i)
os << endl;
os << v[i];
}
return os;
}
const ll INF = 1LL << 60;
ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;
#define int long long
inline void my_io() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
cout << fixed << setprecision(16);
// cout << setprecision(10) << scientific << ans << endl;
}
signed main() {
ll x, a;
cin >> x >> a;
if (x < a) {
cout << 0 << endl;
} else {
cout << 10 << endl;
}
} | [
"control_flow.branch.if.condition.change"
] | 810,518 | 810,519 | u800551451 | cpp |
p02999 | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define int long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define mp make_pair
#define pb push_back
int X, A;
int ans = 0;
signed main() {
scanf("%lld", &X, &A);
if (X < A)
ans = 0;
else
ans = 10;
printf("%lld\n", ans);
} | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define int long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define mp make_pair
#define pb push_back
int X, A;
int ans = 0;
signed main() {
scanf("%lld %lld", &X, &A);
if (X < A)
ans = 0;
else
ans = 10;
printf("%lld\n", ans);
} | [
"literal.string.change",
"call.arguments.change"
] | 810,520 | 810,521 | u857644621 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, x;
cin >> x >> a;
if (a < x)
cout << "0" << endl;
else
cout << "10" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, x;
cin >> x >> a;
if (a > x)
cout << "0" << endl;
else
cout << "10" << endl;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,522 | 810,523 | u330689597 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X, A;
if (X < A)
cout << 0 << endl;
else
cout << 10 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X < A) {
cout << 0 << endl;
} else
cout << 10 << endl;
}
| [] | 810,524 | 810,525 | u983062344 | cpp |
p02999 | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b) {
cout << 0 << "\n";
} else {
cout << 1 << "\n";
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a < b) {
cout << 0 << "\n";
} else {
cout << 10 << "\n";
}
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 810,533 | 810,534 | u148386511 | cpp |
p02999 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
using std::bitset;
using std::deque;
using std::iterator;
using std::map;
using std::multimap;
using std::multiset;
using std::pair;
using std::queue;
using std::set;
using std::stack;
using std::string;
using std::vector;
using std::fill;
using std::ios_base;
using std::lower_bound;
using std::max_element;
using std::min_element;
using std::next_permutation;
using std::reverse;
using std::sort;
using std::stable_sort;
using std::swap;
using std::unique;
long long max(long long a, long long b) {
if (a > b)
return a;
return b;
}
long long min(long long a, long long b) {
if (a > b)
return b;
return a;
}
typedef long long ll;
typedef pair<long long, long long> pii;
typedef pair<ll, ll> pll;
namespace MySpace {};
#define forn(i, n) for (long long(i) = 0; (i) != (n); (i)++)
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define int long long
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
ll n, m;
ll s[50000];
ll t[50000];
ll dp[2300][2300];
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// freopen("", "r", stdin);
// freopen("", "w", stdout);
cin >> n >> m;
cout << (n < m) * 10;
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
using std::bitset;
using std::deque;
using std::iterator;
using std::map;
using std::multimap;
using std::multiset;
using std::pair;
using std::queue;
using std::set;
using std::stack;
using std::string;
using std::vector;
using std::fill;
using std::ios_base;
using std::lower_bound;
using std::max_element;
using std::min_element;
using std::next_permutation;
using std::reverse;
using std::sort;
using std::stable_sort;
using std::swap;
using std::unique;
long long max(long long a, long long b) {
if (a > b)
return a;
return b;
}
long long min(long long a, long long b) {
if (a > b)
return b;
return a;
}
typedef long long ll;
typedef pair<long long, long long> pii;
typedef pair<ll, ll> pll;
namespace MySpace {};
#define forn(i, n) for (long long(i) = 0; (i) != (n); (i)++)
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define int long long
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
ll n, m;
ll s[50000];
ll t[50000];
ll dp[2300][2300];
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// freopen("", "r", stdin);
// freopen("", "w", stdout);
cin >> n >> m;
cout << (n >= m) * 10;
}
| [
"expression.operator.compare.change",
"io.output.change"
] | 810,535 | 810,536 | u798339690 | cpp |
p02999 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(), (a).end()
#define EPS (1e-5)
#define bit(n, k) ((n >> k) & 1)
const ll Mod = 1000000007;
const ll mod = 998244353;
struct H {
ll x, y;
bool operator<(const H &b) const {
if (x != b.x)
return x < b.x;
return y < b.y;
}
bool operator>(const H &b) const {
if (x != b.x)
return x > b.x;
return y > b.y;
}
bool operator==(const H &b) const { return x == b.x && y == b.y; }
bool operator!=(const H &b) const { return (*this) != b; }
};
struct P {
ll pos, cost;
bool operator<(const P &b) const { return cost < b.cost; }
bool operator>(const P &b) const { return cost > b.cost; }
};
struct B {
ll to, cost;
};
struct E {
ll from, to, cost;
bool operator<(const E &b) const { return cost < b.cost; }
bool operator>(const E &b) const { return cost > b.cost; }
};
template <typename T, typename U> void chmin(T &a, U b) {
if (a > b)
a = b;
}
template <typename T, typename U> void chmax(T &a, U b) {
if (a < b)
a = b;
}
template <typename T> T max_0(T a) {
if (a < 0)
return 0;
return a;
}
template <typename T> T min_0(T a) {
if (a > 0)
return 0;
return a;
}
ll read() {
ll u;
ll k = scanf("%lld", &u);
return u;
}
ll gcd(ll i, ll j) {
if (i > j)
swap(i, j);
if (i == 0)
return j;
return gcd(j % i, i);
}
ll mod_pow(ll x, ll n, ll p) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = res * x % p;
x = x * x % p;
n >>= 1;
}
return res;
} // x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
int x, a;
signed main() {
cin >> x >> a;
cout << (x < a) * 10 << endl;
} | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(), (a).end()
#define EPS (1e-5)
#define bit(n, k) ((n >> k) & 1)
const ll Mod = 1000000007;
const ll mod = 998244353;
struct H {
ll x, y;
bool operator<(const H &b) const {
if (x != b.x)
return x < b.x;
return y < b.y;
}
bool operator>(const H &b) const {
if (x != b.x)
return x > b.x;
return y > b.y;
}
bool operator==(const H &b) const { return x == b.x && y == b.y; }
bool operator!=(const H &b) const { return (*this) != b; }
};
struct P {
ll pos, cost;
bool operator<(const P &b) const { return cost < b.cost; }
bool operator>(const P &b) const { return cost > b.cost; }
};
struct B {
ll to, cost;
};
struct E {
ll from, to, cost;
bool operator<(const E &b) const { return cost < b.cost; }
bool operator>(const E &b) const { return cost > b.cost; }
};
template <typename T, typename U> void chmin(T &a, U b) {
if (a > b)
a = b;
}
template <typename T, typename U> void chmax(T &a, U b) {
if (a < b)
a = b;
}
template <typename T> T max_0(T a) {
if (a < 0)
return 0;
return a;
}
template <typename T> T min_0(T a) {
if (a > 0)
return 0;
return a;
}
ll read() {
ll u;
ll k = scanf("%lld", &u);
return u;
}
ll gcd(ll i, ll j) {
if (i > j)
swap(i, j);
if (i == 0)
return j;
return gcd(j % i, i);
}
ll mod_pow(ll x, ll n, ll p) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = res * x % p;
x = x * x % p;
n >>= 1;
}
return res;
} // x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
int x, a;
signed main() {
cin >> x >> a;
cout << (x >= a) * 10 << endl;
} | [
"expression.operator.compare.change",
"io.output.change"
] | 810,542 | 810,543 | u811004127 | cpp |
p02999 | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define f first
#define s second
#define endl "\n"
#define pb push_back
#define oo 0x3f3f3f3f
#define limit 1000000007
#define two pair<int, int>
#define mod(x, m) ((x % m + m) % m)
#define all(v) v.begin(), v.end()
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))
#define fori(x, n) for (int i = x; i < n; i++)
#define forj(y, m) for (int j = y; j < m; j++)
#define fork(z, p) for (int k = z; k < p; k++)
#define fastio std::ios::sync_with_stdio(false)
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define input_from_file freopen("input.txt", "r", stdin);
int main() {
int x, a;
cin >> x >> a;
if (x > a)
cout << 10 << endl;
else
cout << 0 << endl;
}
| #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define f first
#define s second
#define endl "\n"
#define pb push_back
#define oo 0x3f3f3f3f
#define limit 1000000007
#define two pair<int, int>
#define mod(x, m) ((x % m + m) % m)
#define all(v) v.begin(), v.end()
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))
#define fori(x, n) for (int i = x; i < n; i++)
#define forj(y, m) for (int j = y; j < m; j++)
#define fork(z, p) for (int k = z; k < p; k++)
#define fastio std::ios::sync_with_stdio(false)
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define input_from_file freopen("input.txt", "r", stdin);
int main() {
int x, a;
cin >> x >> a;
if (x >= a)
cout << 10 << endl;
else
cout << 0 << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,546 | 810,547 | u520002141 | cpp |
p02999 | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define bit(x) (1L << (x))
using ll = long long;
using namespace std;
template <typename T> vector<T> make_v(size_t a, T b) {
return vector<T>(a, b);
}
template <typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v(ts...))>(a, make_v(ts...));
}
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << a << endl;
else
cout << 10 << endl;
return 0;
}
| #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define bit(x) (1L << (x))
using ll = long long;
using namespace std;
template <typename T> vector<T> make_v(size_t a, T b) {
return vector<T>(a, b);
}
template <typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v(ts...))>(a, make_v(ts...));
}
int main() {
int x, a;
cin >> x >> a;
if (x < a)
cout << 0 << endl;
else
cout << 10 << endl;
return 0;
}
| [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 810,575 | 810,576 | u772304668 | cpp |
p02999 | #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);
int a, x;
cin >> a >> x;
if (a > x) {
cout << 10 << 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);
int a, x;
cin >> a >> x;
if (a >= x) {
cout << 10 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,577 | 810,578 | u060896757 | cpp |
p02999 | /*
我的心脏怦怦跳,监管者就在附近
*/
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unistd.h>
#define random(a, b) (rand() % (b - a + 1) + a)
using namespace std;
int main() {
int n, x;
cin >> n >> x;
if (n < x)
cout << 0;
if (x >= n)
cout << 10;
return 0;
} | /*
我的心脏怦怦跳,监管者就在附近
*/
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unistd.h>
#define random(a, b) (rand() % (b - a + 1) + a)
using namespace std;
int main() {
int n, x;
cin >> n >> x;
if (n < x)
cout << 0;
else if (n >= x)
cout << 10;
return 0;
} | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove",
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 810,581 | 810,582 | u378968614 | cpp |
p02999 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
using namespace std;
typedef long long lint;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rep0(i, n) rep(i, 0, n)
int main(void) {
ios::sync_with_stdio(false);
int a, b;
cin >> a >> b;
if (a <= b) {
cout << "0";
} else {
cout << "10";
}
return 0;
}
// sort N個の配列a
// sort(a, a + N); //昇順
// sort(a, a + N, greater<int>()); //降順
////最大公約数(ユークリッドの互除法利用)
// int gcd(int a, int b) {
// if (a == 0) return b;
// if (b == 0) return a;
// int m = max(a, b);
// int n = min(a, b);
// if (m%n == 0) return n;
// else return gcd(n, m%n);
//
//}
//
////最小公倍数
// int lca(int a, int b) {
// if (a == 0) return 0;
// if (b == 0) return 0;
// return a * b / gcm(a, b);
//}
//
////n^k(整数)
// int pow_int(int n, int k) {
// int re = 1;
// for (int i = 0; i < k; i++) re *= n;
// return re;
//}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
using namespace std;
typedef long long lint;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rep0(i, n) rep(i, 0, n)
int main(void) {
ios::sync_with_stdio(false);
int a, b;
cin >> a >> b;
if (a < b) {
cout << "0";
} else {
cout << "10";
}
return 0;
}
// sort N個の配列a
// sort(a, a + N); //昇順
// sort(a, a + N, greater<int>()); //降順
////最大公約数(ユークリッドの互除法利用)
// int gcd(int a, int b) {
// if (a == 0) return b;
// if (b == 0) return a;
// int m = max(a, b);
// int n = min(a, b);
// if (m%n == 0) return n;
// else return gcd(n, m%n);
//
//}
//
////最小公倍数
// int lca(int a, int b) {
// if (a == 0) return 0;
// if (b == 0) return 0;
// return a * b / gcm(a, b);
//}
//
////n^k(整数)
// int pow_int(int n, int k) {
// int re = 1;
// for (int i = 0; i < k; i++) re *= n;
// return re;
//}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,591 | 810,592 | u809278162 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(c) (c).begin(), (c).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
const int MOD = 1000000007;
int main() {
int x, a;
cin >> x, a;
cout << (x < a ? 0 : 10) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(c) (c).begin(), (c).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
const int MOD = 1000000007;
int main() {
int x, a;
cin >> x >> a;
cout << (x < a ? 0 : 10) << endl;
}
| [] | 810,618 | 810,619 | u540491484 | cpp |
p02999 | #include <bits/stdc++.h>
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define CANCER \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long
#define f first
#define s second
#define mod 1000000007
using namespace std;
int main() {
CANCER;
int x, a;
cin >> x >> a;
if (x < a)
cout << 3 << "\n";
else
cout << 10 << "\n";
return 0;
}
| #include <bits/stdc++.h>
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define CANCER \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll long long
#define f first
#define s second
#define mod 1000000007
using namespace std;
int main() {
CANCER;
int x, a;
cin >> x >> a;
if (x < a)
cout << 0 << "\n";
else
cout << 10 << "\n";
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 810,620 | 810,621 | u470437951 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X, A;
if (X >= A)
cout << "10" << endl;
else
cout << "0" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int X, A;
cin >> X >> A;
if (X >= A)
cout << 10 << endl;
else
cout << 0 << endl;
}
| [] | 810,624 | 810,625 | u236540805 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
int res;
if (x <= a)
res = 0;
else
res = 10;
cout << res << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, a;
cin >> x >> a;
int res;
if (x < a)
res = 0;
else
res = 10;
cout << res << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 810,626 | 810,627 | u203527087 | cpp |
p02999 | #include <iostream>
using namespace ::std;
int main() {
int a, b;
cin >> a, b;
cout << (a >= b ? 10 : 0) << '\n';
} | #include <iostream>
using namespace ::std;
int main() {
int a, b;
cin >> a >> b;
cout << (a >= b ? 10 : 0) << '\n';
} | [] | 810,628 | 810,629 | u461597211 | cpp |
p02999 | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int a, x;
cin >> x >> a;
if (x < a) {
cout << 0;
} else {
cout << 1;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int a, x;
cin >> x >> a;
if (x < a) {
cout << 0;
} else {
cout << 10;
}
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 810,632 | 810,633 | u419633921 | cpp |
p02999 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < n; i++)
#define why(n, x) \
int n; \
while (cin >> n, n != x)
#define iFOR(i, x, n) for (int i = x; i < n; i++)
#define fin << '\n'
#define __ << " " <<
#define ___ << " "
#define bash push_back
#define ALL(x) x.begin(), x.end()
#define SWAP(a, b) ((a != b) && (a += b, b = a - b, a -= b))
//#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vit;
typedef map<string, int> mstit;
typedef vector<pii> vpi;
typedef greater<pii> gpi;
typedef priority_queue<pii, vpi, gpi> dijk;
static const signed int INF = 0x3f3f3f3f;
static const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL;
static const signed int SMOD = 1000000007;
static const signed int NMOD = 1000000009;
static const signed int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
static const signed int dy[] = {0, -1, 0, 1, -1, 1, -1, 1};
bool inside(int x, int y, int w, int h) {
return (x >= 0 && y >= 0 && x < w && y < h);
}
template <class T> T abs(T &x) { return x < 0 ? -x : x; }
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
int qp(int a, ll b, int mo) {
int ans = 1;
do {
if (b & 1)
ans = 1ll * ans * a % mo;
a = 1ll * a * a % mo;
} while (b >>= 1);
return ans;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline void solve() {
int a, x;
cin >> x >> a;
if (x >= a)
cout << 10 fin;
else
cout << 1 fin;
}
struct xyz {
xyz() {
cin.tie(0), ios::sync_with_stdio(false);
cout << fixed << setprecision(12);
};
} xyzzy;
signed main() {
solve();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < n; i++)
#define why(n, x) \
int n; \
while (cin >> n, n != x)
#define iFOR(i, x, n) for (int i = x; i < n; i++)
#define fin << '\n'
#define __ << " " <<
#define ___ << " "
#define bash push_back
#define ALL(x) x.begin(), x.end()
#define SWAP(a, b) ((a != b) && (a += b, b = a - b, a -= b))
//#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vit;
typedef map<string, int> mstit;
typedef vector<pii> vpi;
typedef greater<pii> gpi;
typedef priority_queue<pii, vpi, gpi> dijk;
static const signed int INF = 0x3f3f3f3f;
static const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL;
static const signed int SMOD = 1000000007;
static const signed int NMOD = 1000000009;
static const signed int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
static const signed int dy[] = {0, -1, 0, 1, -1, 1, -1, 1};
bool inside(int x, int y, int w, int h) {
return (x >= 0 && y >= 0 && x < w && y < h);
}
template <class T> T abs(T &x) { return x < 0 ? -x : x; }
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
int qp(int a, ll b, int mo) {
int ans = 1;
do {
if (b & 1)
ans = 1ll * ans * a % mo;
a = 1ll * a * a % mo;
} while (b >>= 1);
return ans;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline void solve() {
int a, x;
cin >> x >> a;
if (x >= a)
cout << 10 fin;
else
cout << 0 fin;
}
struct xyz {
xyz() {
cin.tie(0), ios::sync_with_stdio(false);
cout << fixed << setprecision(12);
};
} xyzzy;
signed main() {
solve();
return 0;
}
| [
"literal.number.change",
"io.output.change"
] | 810,648 | 810,649 | u678146855 | cpp |
p02998 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define endl "\n"
template <typename T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <typename T> ostream &operator<<(ostream &s, const complex<T> &d) {
return s << "(" << d.real() << ", " << d.imag() << ")";
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const pair<T1, T2> &d) {
return s << "(" << d.first << ", " << d.second << ")";
}
template <typename T> ostream &operator<<(ostream &s, const vector<T> &d) {
int len = d.size();
rep(i, len) {
s << d[i];
if (i < len - 1)
s << " ";
}
return s;
}
template <typename T>
ostream &operator<<(ostream &s, const vector<vector<T>> &d) {
int len = d.size();
rep(i, len) { s << d[i] << endl; }
return s;
}
template <typename T> ostream &operator<<(ostream &s, const set<T> &v) {
s << "{ ";
for (auto itr = v.begin(); itr != v.end(); ++itr) {
if (itr != v.begin()) {
s << ", ";
}
s << (*itr);
}
s << " }";
return s;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const map<T1, T2> &m) {
s << "{" << endl;
for (auto itr = m.begin(); itr != m.end(); ++itr) {
s << " " << (*itr).first << " : " << (*itr).second << endl;
}
s << "}" << endl;
return s;
}
const ll mod = 1e9 + 7;
const ll inf = 1e17;
const int INF = 1e9;
const double PI = acos(-1);
const double EPS = 1e-10;
int n, offset = 100010;
vector<vector<int>> g(300010);
vector<bool> used(300010, false);
vector<ll> cnt(2);
void dfs(int v) {
if (used[v])
return;
used[v] = true;
if (v >= offset)
cnt[1]++;
else
cnt[0]++;
for (auto itr : g[v]) {
dfs(itr);
}
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
vector<int> ten;
rep(i, n) {
int x, y;
cin >> x >> y;
y += offset;
ten.push_back(x);
ten.push_back(y);
g[x].push_back(y);
g[y].push_back(x);
}
ll ans = 0;
for (auto itr : ten) {
if (used[ten[itr]])
continue;
rep(j, 2) cnt[j] = 0;
dfs(itr);
ans += cnt[0] * cnt[1];
}
ans -= n;
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define endl "\n"
template <typename T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <typename T> ostream &operator<<(ostream &s, const complex<T> &d) {
return s << "(" << d.real() << ", " << d.imag() << ")";
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const pair<T1, T2> &d) {
return s << "(" << d.first << ", " << d.second << ")";
}
template <typename T> ostream &operator<<(ostream &s, const vector<T> &d) {
int len = d.size();
rep(i, len) {
s << d[i];
if (i < len - 1)
s << " ";
}
return s;
}
template <typename T>
ostream &operator<<(ostream &s, const vector<vector<T>> &d) {
int len = d.size();
rep(i, len) { s << d[i] << endl; }
return s;
}
template <typename T> ostream &operator<<(ostream &s, const set<T> &v) {
s << "{ ";
for (auto itr = v.begin(); itr != v.end(); ++itr) {
if (itr != v.begin()) {
s << ", ";
}
s << (*itr);
}
s << " }";
return s;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &s, const map<T1, T2> &m) {
s << "{" << endl;
for (auto itr = m.begin(); itr != m.end(); ++itr) {
s << " " << (*itr).first << " : " << (*itr).second << endl;
}
s << "}" << endl;
return s;
}
const ll mod = 1e9 + 7;
const ll inf = 1e17;
const int INF = 1e9;
const double PI = acos(-1);
const double EPS = 1e-10;
int n, offset = 100010;
vector<vector<int>> g(300010);
vector<bool> used(300010, false);
vector<ll> cnt(2);
void dfs(int v) {
if (used[v])
return;
used[v] = true;
if (v >= offset)
cnt[1]++;
else
cnt[0]++;
for (auto itr : g[v]) {
dfs(itr);
}
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
vector<int> ten;
rep(i, n) {
int x, y;
cin >> x >> y;
y += offset;
ten.push_back(x);
ten.push_back(y);
g[x].push_back(y);
g[y].push_back(x);
}
ll ans = 0;
for (auto itr : ten) {
if (used[itr])
continue;
rep(j, 2) cnt[j] = 0;
dfs(itr);
ans += cnt[0] * cnt[1];
}
ans -= n;
cout << ans << endl;
} | [
"control_flow.branch.if.condition.change"
] | 810,677 | 810,678 | u340010271 | cpp |
p02998 | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) // [a, b)
#define reprev(i, n) reprrev(i, 0, n)
typedef long long ll;
typedef unsigned long long ull;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
/* attention
long longのシフト演算には気をつけよう
タイポした時のデバッグが死ぬほどきつくなるので変数名は最低3字くらい使った方がいいかも
sizeは(int)とキャストしよう
ごちゃごちゃ場合分けを考える前に全探索は考えましたか?
詰まった時に、別の分野の問題として考え直す(これdpでは?、グラフとしてみればいいのでは?)
多くの問題はパターンマッチだが、パターンに落とし込むまでが難しく、そのための訓練としてわからない問題をあれこれ色々な角度から考察してみるのではないか
cin.tie(0);
ios::sync_with_stdio(false);<- これら、printfとかと併用しない方が良さそう
*/
const ll mod = 1e9 + 7;
void chmod(ll &M) {
if (M >= mod)
M %= mod;
else if (M < 0) {
M += (abs(M) / mod + 1) * mod;
M %= mod;
}
}
ll modpow(ll x, ll n) {
if (n == 0)
return 1;
ll res = modpow(x, n / 2);
if (n % 2 == 0)
return res * res % mod;
else
return res * res % mod * x % mod;
}
int getl(int i, int N) { return i == 0 ? N - 1 : i - 1; };
int getr(int i, int N) { return i == N - 1 ? 0 : i + 1; };
/* <--------------------------------------------> */
typedef tuple<int, int, int> T;
// get<K>(tuple型の変数)
class UnionFind {
public:
//親の番号を格納する。親だった場合はー(その集合のサイズ)
vector<int> parents;
int count;
//作る時はparentsを-1で初期化する
//こうすることで全部ばらばらになる
UnionFind(int n) {
parents = vector<int>(n, -1);
count = n;
}
// Aがどのグループにいるか調べる
int root(int A) {
if (parents[A] < 0)
return A;
return parents[A] = root(parents[A]);
}
//自分のいるグループの大きさを調べる
int size(int A) { return -parents[root(A)]; }
// AとBをくっつける
bool connect(int A, int B) {
// AとBを直接ではなく親同士をくっつける
A = root(A);
B = root(B);
if (A == B) {
return false;
}
//大きい方(A)に小さい方(B)をくっつけたい
if (size(A) < size(B))
swap(A, B);
parents[A] += parents[B];
parents[B] = A;
--count;
return true;
}
};
const ll MAX = 110000;
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
UnionFind uni(2 * MAX);
vector<int> x(n), y(n);
rep(i, n) {
cin >> x[i] >> y[i];
uni.connect(x[i], y[i]);
}
map<int, ll> mx, my;
rep(i, MAX)++ mx[uni.root(i)];
repr(i, MAX, 2 * MAX)++ my[uni.root(i)];
ll res = 0;
rep(r, 2 * MAX) res += mx[r] * my[r];
cout << res - n << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) // [a, b)
#define reprev(i, n) reprrev(i, 0, n)
typedef long long ll;
typedef unsigned long long ull;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
/* attention
long longのシフト演算には気をつけよう
タイポした時のデバッグが死ぬほどきつくなるので変数名は最低3字くらい使った方がいいかも
sizeは(int)とキャストしよう
ごちゃごちゃ場合分けを考える前に全探索は考えましたか?
詰まった時に、別の分野の問題として考え直す(これdpでは?、グラフとしてみればいいのでは?)
多くの問題はパターンマッチだが、パターンに落とし込むまでが難しく、そのための訓練としてわからない問題をあれこれ色々な角度から考察してみるのではないか
cin.tie(0);
ios::sync_with_stdio(false);<- これら、printfとかと併用しない方が良さそう
*/
const ll mod = 1e9 + 7;
void chmod(ll &M) {
if (M >= mod)
M %= mod;
else if (M < 0) {
M += (abs(M) / mod + 1) * mod;
M %= mod;
}
}
ll modpow(ll x, ll n) {
if (n == 0)
return 1;
ll res = modpow(x, n / 2);
if (n % 2 == 0)
return res * res % mod;
else
return res * res % mod * x % mod;
}
int getl(int i, int N) { return i == 0 ? N - 1 : i - 1; };
int getr(int i, int N) { return i == N - 1 ? 0 : i + 1; };
/* <--------------------------------------------> */
typedef tuple<int, int, int> T;
// get<K>(tuple型の変数)
class UnionFind {
public:
//親の番号を格納する。親だった場合はー(その集合のサイズ)
vector<int> parents;
int count;
//作る時はparentsを-1で初期化する
//こうすることで全部ばらばらになる
UnionFind(int n) {
parents = vector<int>(n, -1);
count = n;
}
// Aがどのグループにいるか調べる
int root(int A) {
if (parents[A] < 0)
return A;
return parents[A] = root(parents[A]);
}
//自分のいるグループの大きさを調べる
int size(int A) { return -parents[root(A)]; }
// AとBをくっつける
bool connect(int A, int B) {
// AとBを直接ではなく親同士をくっつける
A = root(A);
B = root(B);
if (A == B) {
return false;
}
//大きい方(A)に小さい方(B)をくっつけたい
if (size(A) < size(B))
swap(A, B);
parents[A] += parents[B];
parents[B] = A;
--count;
return true;
}
};
const ll MAX = 110000;
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
UnionFind uni(2 * MAX);
vector<int> x(n), y(n);
rep(i, n) {
cin >> x[i] >> y[i];
uni.connect(x[i], y[i] + MAX);
}
map<int, ll> mx, my;
rep(i, MAX)++ mx[uni.root(i)];
repr(i, MAX, 2 * MAX)++ my[uni.root(i)];
ll res = 0;
rep(r, 2 * MAX) res += mx[r] * my[r];
cout << res - n << endl;
return 0;
}
| [
"expression.operation.binary.add"
] | 810,718 | 810,719 | u052332717 | cpp |
p02998 |
/*vvv>
zzzzzI
.---. zzuzuI .vgggg&,.
+++++= dunkoI .WbbWo JMM9^```?TMB` ..&gNNg,. gggggggJ, qgggggggg]
(&&&&&&&&[ c+OA&J, (&&&&&&+J, .cJeAA&-. (&&&&&&&&x .&AA&=-.
+++++= dunkoI Xpbpbp JM#` (M#^ ?MMp MM| +TMN. JMF '
|yk ` dVY 7Vk, Vy XV cVf ?Y! JM V$ `
+++++= OunkoI Xppppp dMN .MM+ .MM MM| MM] JMMMMMM+
|@tqkoh) ,y0 (V$ yyyyyyyV7 VV JMWyZWr TWVVVVW&,
++++++ dZZZZ0 Xppppp ^HMN, _.db WMm, .MMF MM| ..MM` JMF .
|yk .WV&. .XW' yy 4yn. jyn +. JM #S
`++++` ?ZZZX= ?WWWW= -THMMMMH9^ (TMMMMM9! MMMMMMM"" JMMMMMMMME
|UU. ?TUUUUY= UU. (UU- ^7TUUUV7! JUUUUUUUU 7TUNKO*/
// Ricty Diminished
#include "bits/stdc++.h"
using namespace std;
typedef long long lint;
typedef vector<lint> liv;
//#define rep(i,n) for(int i=0;i<n;++i)
#define all(v) v.begin(), v.end()
#define linf 1152921504606846976
#define MAXN 100100
#define md_1e9_7 1000000007
#define md_998244353 998244353
#define pb push_back
#define _vcppunko4(tuple) _getname4 tuple
#define _getname4(_1, _2, _3, _4, name, ...) name
#define _getname3(_1, _2, _3, name, ...) name
#define _trep2(tuple) _rep2 tuple
#define _trep3(tuple) _rep3 tuple
#define _trep4(tuple) _rep4 tuple
#define _rep1(n) for (lint i = 0; i < n; ++i)
#define _rep2(i, n) for (lint i = 0; i < n; ++i)
#define _rep3(i, a, b) for (lint i = a; i < b; ++i)
#define _rep4(i, a, b, c) for (lint i = a; i < b; i += c)
#define _trrep2(tuple) _rrep2 tuple
#define _trrep3(tuple) _rrep3 tuple
#define _trrep4(tuple) _rrep4 tuple
#define _rrep1(n) for (lint i = n - 1; i >= 0; --i)
#define _rrep2(i, n) for (lint i = n - 1; i >= 0; --i)
#define _rrep3(i, a, b) for (lint i = b - 1; i >= a; --i)
#define _rrep4(i, a, b, c) \
for (lint i = a + (b - a - 1) / c * c; i >= a; i -= c)
template <class T> istream &operator>>(istream &is, vector<T> &vec);
template <class T, size_t size>
istream &operator>>(istream &is, array<T, size> &vec);
template <class T, class L> istream &operator>>(istream &is, pair<T, L> &p);
template <class T> ostream &operator<<(ostream &os, vector<T> &vec);
template <class T, class L> ostream &operator<<(ostream &os, pair<T, L> &p);
template <class T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
template <class T, class L> istream &operator>>(istream &is, pair<T, L> &p) {
is >> p.first;
is >> p.second;
return is;
}
// template<class T>
// ostream& operator<<(ostream& os,vector<T>& vec){
// os<<vec[0];rep(i,1,vec.size())os<<' '<<vec[i];return os; } template<class T>
// ostream& operator<<(ostream& os,deque<T>& deq){
// os<<deq[0];rep(i,1,deq.size())os<<' '<<deq[i];return os; }
template <class T, class L> ostream &operator<<(ostream &os, pair<T, L> &p) {
os << p.first << " " << p.second;
return os;
}
inline void in() {}
template <class Head, class... Tail>
inline void in(Head &&head, Tail &&...tail) {
cin >> head;
in(move(tail)...);
}
template <class T> inline bool out(T t) {
cout << t << '\n';
return 0;
}
inline bool out() {
cout << '\n';
return 0;
}
template <class Head, class... Tail> inline bool out(Head head, Tail... tail) {
cout << head << ' ';
out(move(tail)...);
return 0;
}
template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) {
t = v;
}
template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) {
for (auto &e : t)
fill_v(e, v);
} // http://beet-aizu.hatenablog.com/entry/2018/04/08/145516
#define rep(...) \
_vcppunko4((__VA_ARGS__, _trep4, _trep3, _trep2, _rep1))((__VA_ARGS__))
#define rrep(...) \
_vcppunko4((__VA_ARGS__, _trrep4, _trrep3, _trrep2, _rrep1))((__VA_ARGS__))
#define each(v) for (auto &i : v)
#define lin(...) \
lint __VA_ARGS__; \
in(__VA_ARGS__)
#define stin(...) \
string __VA_ARGS__; \
in(__VA_ARGS__)
#define vin(type, name, size) \
vector<type> name(size); \
in(name)
#define fi i.first
#define se i.second
#define YES(c) cout << ((c) ? "YES\n" : "NO\n"), 0
#define Yes(c) cout << ((c) ? "Yes\n" : "No\n"), 0
#define o(p) cout << p << endl, 0
#define sp(p) cout << p << " "
#define deb(p) cerr << p << endl, 0
#define dd(n) cout << fixed << setprecision(n)
#define inf linf
#define md_tmp template <uint_fast64_t md = 1000000007>
md_tmp class mint {
using u64 = uint_fast64_t;
public:
u64 a;
constexpr mint(const u64 x = 0) noexcept : a(x % md) {}
constexpr u64 &value() noexcept { return a; }
constexpr const u64 &value() const noexcept { return a; }
constexpr mint operator+(const mint rhs) const noexcept {
return mint(*this) += rhs;
}
constexpr mint operator-(const mint rhs) const noexcept {
return mint(*this) -= rhs;
}
constexpr mint operator*(const mint rhs) const noexcept {
return mint(*this) *= rhs;
}
constexpr mint operator^(const lint rhs) const noexcept {
return mint(*this) ^= rhs;
}
constexpr mint operator/(const mint rhs) const noexcept {
return mint(*this) /= rhs;
}
constexpr mint &operator+=(const mint rhs) noexcept {
a += rhs.a;
if (a >= md)
a -= md;
return *this;
}
constexpr mint &operator-=(const mint rhs) noexcept {
if (a < rhs.a)
a += md;
a -= rhs.a;
return *this;
}
constexpr mint &operator*=(const mint rhs) noexcept {
a = a * rhs.a % md;
return *this;
}
constexpr mint &operator^=(const lint rhs) noexcept {
if (!rhs)
return *this = 1;
u64 exp = rhs - 1;
mint base = this->a;
while (exp) {
if (exp & 1)
*this *= base;
base *= base;
exp >>= 1;
}
return *this;
}
constexpr mint &operator/=(const mint rhs) noexcept {
a = (*this * (rhs ^ (md - 2))).a;
return *this;
}
};
md_tmp istream &operator>>(istream &os, mint<md> &m) {
os >> m.a, m.a %= md;
return os;
}
md_tmp ostream &operator<<(ostream &os, const mint<md> &m) { return os << m.a; }
md_tmp mint<md> ncr(lint n, lint r) {
mint<md> ncr_res = 1, ncr_div = 1;
rep(r) ncr_res *= (n - i), ncr_div *= (r - i);
return ncr_res / ncr_div;
}
mint<> operator"" m(unsigned long long n) { return mint<>(n); }
mint<998244353> operator"" m9(unsigned long long n) {
return mint<998244353>(n);
}
mint<1000003> operator"" m3(unsigned long long n) { return mint<1000003>(n); }
class UnionFind {
public: // par,rank,init,uf,uf,root,same,unite
int par[MAXN], rank[MAXN], sum[MAXN];
set<int> tate[MAXN], yoko[MAXN];
void init(int n) { rep(i, n) par[i] = i, rank[i] = 0, sum[i] = 1; }
UnionFind(int n) { init(n); }
UnionFind() {}
int root(int x) { return x == par[x] ? x : par[x] = root(par[x]); }
bool same(int x, int y) { return root(x) == root(y); }
void unite(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return;
if (rank[x] < rank[y]) {
par[x] = y;
sum[y] += sum[x];
// tate[y]にtate[x]を追加
for (auto i : tate[x])
tate[y].insert(i);
for (auto i : yoko[x])
yoko[y].insert(i);
} else {
par[y] = x;
sum[x] += sum[y];
if (rank[x] == rank[y])
++rank[x];
for (auto i : tate[y])
tate[x].insert(i);
for (auto i : yoko[y])
yoko[x].insert(i);
}
}
};
UnionFind t;
typedef pair<lint, lint> P;
vector<P> ver[100010], hor[100010];
int main() {
lint n;
in(n);
t.init(n);
int x, y;
rep(n) {
in(x, y);
--x, --y;
ver[x].pb({i, y});
hor[y].pb({i, x});
t.tate[i].insert(x);
t.yoko[i].insert(x);
}
rep(100000) if (ver[i].size()) {
for (auto e : ver[i])
t.unite(ver[i][0].first, e.first);
}
rep(100000) if (hor[i].size()) {
for (auto e : hor[i])
t.unite(hor[i][0].first, e.first);
}
lint ans = 0;
rep(100000) if (t.par[i] == i) {
ans += t.tate[i].size() * t.yoko[i].size() - t.sum[i];
}
o(ans);
}
// class UnionFind{
// public://par,rank,init,uf,uf,root,same,unite
// int par[MAXN],rank[MAXN],sum[MAXN];
// void init(int n){
// rep(i,n)par[i]=i,rank[i]=0,sum[i]=1;
// }
// UnionFind(int n){
// init(n);
// }UnionFind(){}
// int root(int x){
// return x==par[x]?x:par[x]=root(par[x]);
// }
// bool same(int x,int y){
// return root(x)==root(y);
// }
// void unite(int x,int y){
// x=root(x);
// y=root(y);
// if(x==y)return;
// if(rank[x]<rank[y]){
// par[x]=y;
// sum[y]+=sum[x];
// } else{
// par[y]=x;
// sum[x]+=sum[y];
// if(rank[x]==rank[y])++rank[x];
// }
// }
//};
// UnionFind tr;
//
// struct edge{
// lint from,to,c;
//};
// bool operator<(edge l,edge r){
// return l.c<r.c;
//}bool operator>(edge l,edge r){
// return l.c>r.c;
//}
// vector<edge>g[100010];
// int main(){
// lint n,m;in(n,m);++n;
// tr.init(n);
// lint s,t,c;
// priority_queue<edge,vector<edge>,greater<edge>>q;
// rep(m){
// cin>>s>>t>>c;
// g[s].pb({s,t,c});
// if(!s)q.push({s,t,c});
// }
// lint ans=0;
// while(q.size()){
// s=q.top().from,t=q.top().to,c=q.top().c;q.pop();
// if(!tr.same(0,t)){
// tr.unite(0,t);
// ans+=c;
// for(auto i:g[t]){
// q.push(i);
// }
// }
// }
// /*rep(m){
// if(!tr.same(g[i].to,0)){
// tr.unite(g[i].to,0);
// ans+=g[i].c;
// }
// }*/
// if(tr.sum[tr.root(0)]!=n){
// cout<<tr.sum[tr.root(0)]-1<<" ";
// }o(ans);
//}
int maain() {
lint n;
in(n);
map<lint, lint> ma;
rep(q, n) {
lint a, b;
in(a, b);
lint plf = b, pp;
map<lint, lint> t;
for (int i = 2; i * i <= b; ++i) {
pp = 0;
while (plf % i == 0) {
++pp;
plf /= i;
}
if (pp) { //ここで因数i**ppがわかる
t[i] = pp;
}
}
if (plf != 1) { //ここで因数plf**1がわかる
++t[plf];
}
if (a == 1) {
for (auto i : t) {
ma[fi] += se;
}
} else {
lint ans = linf;
for (auto i : t) {
ans = min(ans, ma[fi] / se);
}
o(ans);
}
}
return 0;
}
// sub-EOF
|
/*vvv>
zzzzzI
.---. zzuzuI .vgggg&,.
+++++= dunkoI .WbbWo JMM9^```?TMB` ..&gNNg,. gggggggJ, qgggggggg]
(&&&&&&&&[ c+OA&J, (&&&&&&+J, .cJeAA&-. (&&&&&&&&x .&AA&=-.
+++++= dunkoI Xpbpbp JM#` (M#^ ?MMp MM| +TMN. JMF '
|yk ` dVY 7Vk, Vy XV cVf ?Y! JM V$ `
+++++= OunkoI Xppppp dMN .MM+ .MM MM| MM] JMMMMMM+
|@tqkoh) ,y0 (V$ yyyyyyyV7 VV JMWyZWr TWVVVVW&,
++++++ dZZZZ0 Xppppp ^HMN, _.db WMm, .MMF MM| ..MM` JMF .
|yk .WV&. .XW' yy 4yn. jyn +. JM #S
`++++` ?ZZZX= ?WWWW= -THMMMMH9^ (TMMMMM9! MMMMMMM"" JMMMMMMMME
|UU. ?TUUUUY= UU. (UU- ^7TUUUV7! JUUUUUUUU 7TUNKO*/
// Ricty Diminished
#include "bits/stdc++.h"
using namespace std;
typedef long long lint;
typedef vector<lint> liv;
//#define rep(i,n) for(int i=0;i<n;++i)
#define all(v) v.begin(), v.end()
#define linf 1152921504606846976
#define MAXN 100100
#define md_1e9_7 1000000007
#define md_998244353 998244353
#define pb push_back
#define _vcppunko4(tuple) _getname4 tuple
#define _getname4(_1, _2, _3, _4, name, ...) name
#define _getname3(_1, _2, _3, name, ...) name
#define _trep2(tuple) _rep2 tuple
#define _trep3(tuple) _rep3 tuple
#define _trep4(tuple) _rep4 tuple
#define _rep1(n) for (lint i = 0; i < n; ++i)
#define _rep2(i, n) for (lint i = 0; i < n; ++i)
#define _rep3(i, a, b) for (lint i = a; i < b; ++i)
#define _rep4(i, a, b, c) for (lint i = a; i < b; i += c)
#define _trrep2(tuple) _rrep2 tuple
#define _trrep3(tuple) _rrep3 tuple
#define _trrep4(tuple) _rrep4 tuple
#define _rrep1(n) for (lint i = n - 1; i >= 0; --i)
#define _rrep2(i, n) for (lint i = n - 1; i >= 0; --i)
#define _rrep3(i, a, b) for (lint i = b - 1; i >= a; --i)
#define _rrep4(i, a, b, c) \
for (lint i = a + (b - a - 1) / c * c; i >= a; i -= c)
template <class T> istream &operator>>(istream &is, vector<T> &vec);
template <class T, size_t size>
istream &operator>>(istream &is, array<T, size> &vec);
template <class T, class L> istream &operator>>(istream &is, pair<T, L> &p);
template <class T> ostream &operator<<(ostream &os, vector<T> &vec);
template <class T, class L> ostream &operator<<(ostream &os, pair<T, L> &p);
template <class T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
template <class T, class L> istream &operator>>(istream &is, pair<T, L> &p) {
is >> p.first;
is >> p.second;
return is;
}
// template<class T>
// ostream& operator<<(ostream& os,vector<T>& vec){
// os<<vec[0];rep(i,1,vec.size())os<<' '<<vec[i];return os; } template<class T>
// ostream& operator<<(ostream& os,deque<T>& deq){
// os<<deq[0];rep(i,1,deq.size())os<<' '<<deq[i];return os; }
template <class T, class L> ostream &operator<<(ostream &os, pair<T, L> &p) {
os << p.first << " " << p.second;
return os;
}
inline void in() {}
template <class Head, class... Tail>
inline void in(Head &&head, Tail &&...tail) {
cin >> head;
in(move(tail)...);
}
template <class T> inline bool out(T t) {
cout << t << '\n';
return 0;
}
inline bool out() {
cout << '\n';
return 0;
}
template <class Head, class... Tail> inline bool out(Head head, Tail... tail) {
cout << head << ' ';
out(move(tail)...);
return 0;
}
template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) {
t = v;
}
template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) {
for (auto &e : t)
fill_v(e, v);
} // http://beet-aizu.hatenablog.com/entry/2018/04/08/145516
#define rep(...) \
_vcppunko4((__VA_ARGS__, _trep4, _trep3, _trep2, _rep1))((__VA_ARGS__))
#define rrep(...) \
_vcppunko4((__VA_ARGS__, _trrep4, _trrep3, _trrep2, _rrep1))((__VA_ARGS__))
#define each(v) for (auto &i : v)
#define lin(...) \
lint __VA_ARGS__; \
in(__VA_ARGS__)
#define stin(...) \
string __VA_ARGS__; \
in(__VA_ARGS__)
#define vin(type, name, size) \
vector<type> name(size); \
in(name)
#define fi i.first
#define se i.second
#define YES(c) cout << ((c) ? "YES\n" : "NO\n"), 0
#define Yes(c) cout << ((c) ? "Yes\n" : "No\n"), 0
#define o(p) cout << p << endl, 0
#define sp(p) cout << p << " "
#define deb(p) cerr << p << endl, 0
#define dd(n) cout << fixed << setprecision(n)
#define inf linf
#define md_tmp template <uint_fast64_t md = 1000000007>
md_tmp class mint {
using u64 = uint_fast64_t;
public:
u64 a;
constexpr mint(const u64 x = 0) noexcept : a(x % md) {}
constexpr u64 &value() noexcept { return a; }
constexpr const u64 &value() const noexcept { return a; }
constexpr mint operator+(const mint rhs) const noexcept {
return mint(*this) += rhs;
}
constexpr mint operator-(const mint rhs) const noexcept {
return mint(*this) -= rhs;
}
constexpr mint operator*(const mint rhs) const noexcept {
return mint(*this) *= rhs;
}
constexpr mint operator^(const lint rhs) const noexcept {
return mint(*this) ^= rhs;
}
constexpr mint operator/(const mint rhs) const noexcept {
return mint(*this) /= rhs;
}
constexpr mint &operator+=(const mint rhs) noexcept {
a += rhs.a;
if (a >= md)
a -= md;
return *this;
}
constexpr mint &operator-=(const mint rhs) noexcept {
if (a < rhs.a)
a += md;
a -= rhs.a;
return *this;
}
constexpr mint &operator*=(const mint rhs) noexcept {
a = a * rhs.a % md;
return *this;
}
constexpr mint &operator^=(const lint rhs) noexcept {
if (!rhs)
return *this = 1;
u64 exp = rhs - 1;
mint base = this->a;
while (exp) {
if (exp & 1)
*this *= base;
base *= base;
exp >>= 1;
}
return *this;
}
constexpr mint &operator/=(const mint rhs) noexcept {
a = (*this * (rhs ^ (md - 2))).a;
return *this;
}
};
md_tmp istream &operator>>(istream &os, mint<md> &m) {
os >> m.a, m.a %= md;
return os;
}
md_tmp ostream &operator<<(ostream &os, const mint<md> &m) { return os << m.a; }
md_tmp mint<md> ncr(lint n, lint r) {
mint<md> ncr_res = 1, ncr_div = 1;
rep(r) ncr_res *= (n - i), ncr_div *= (r - i);
return ncr_res / ncr_div;
}
mint<> operator"" m(unsigned long long n) { return mint<>(n); }
mint<998244353> operator"" m9(unsigned long long n) {
return mint<998244353>(n);
}
mint<1000003> operator"" m3(unsigned long long n) { return mint<1000003>(n); }
class UnionFind {
public: // par,rank,init,uf,uf,root,same,unite
int par[MAXN], rank[MAXN], sum[MAXN];
set<int> tate[MAXN], yoko[MAXN];
void init(int n) { rep(i, n) par[i] = i, rank[i] = 0, sum[i] = 1; }
UnionFind(int n) { init(n); }
UnionFind() {}
int root(int x) { return x == par[x] ? x : par[x] = root(par[x]); }
bool same(int x, int y) { return root(x) == root(y); }
void unite(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return;
if (rank[x] < rank[y]) {
par[x] = y;
sum[y] += sum[x];
// tate[y]にtate[x]を追加
for (auto i : tate[x])
tate[y].insert(i);
for (auto i : yoko[x])
yoko[y].insert(i);
} else {
par[y] = x;
sum[x] += sum[y];
if (rank[x] == rank[y])
++rank[x];
for (auto i : tate[y])
tate[x].insert(i);
for (auto i : yoko[y])
yoko[x].insert(i);
}
}
};
UnionFind t;
typedef pair<lint, lint> P;
vector<P> ver[100010], hor[100010];
int main() {
lint n;
in(n);
t.init(n);
int x, y;
rep(n) {
in(x, y);
--x, --y;
ver[x].pb({i, y});
hor[y].pb({i, x});
t.tate[i].insert(x);
t.yoko[i].insert(y);
}
rep(100000) if (ver[i].size()) {
for (auto e : ver[i])
t.unite(ver[i][0].first, e.first);
}
rep(100000) if (hor[i].size()) {
for (auto e : hor[i])
t.unite(hor[i][0].first, e.first);
}
lint ans = 0;
rep(100000) if (t.par[i] == i) {
ans += t.tate[i].size() * t.yoko[i].size() - t.sum[i];
}
o(ans);
}
// class UnionFind{
// public://par,rank,init,uf,uf,root,same,unite
// int par[MAXN],rank[MAXN],sum[MAXN];
// void init(int n){
// rep(i,n)par[i]=i,rank[i]=0,sum[i]=1;
// }
// UnionFind(int n){
// init(n);
// }UnionFind(){}
// int root(int x){
// return x==par[x]?x:par[x]=root(par[x]);
// }
// bool same(int x,int y){
// return root(x)==root(y);
// }
// void unite(int x,int y){
// x=root(x);
// y=root(y);
// if(x==y)return;
// if(rank[x]<rank[y]){
// par[x]=y;
// sum[y]+=sum[x];
// } else{
// par[y]=x;
// sum[x]+=sum[y];
// if(rank[x]==rank[y])++rank[x];
// }
// }
//};
// UnionFind tr;
//
// struct edge{
// lint from,to,c;
//};
// bool operator<(edge l,edge r){
// return l.c<r.c;
//}bool operator>(edge l,edge r){
// return l.c>r.c;
//}
// vector<edge>g[100010];
// int main(){
// lint n,m;in(n,m);++n;
// tr.init(n);
// lint s,t,c;
// priority_queue<edge,vector<edge>,greater<edge>>q;
// rep(m){
// cin>>s>>t>>c;
// g[s].pb({s,t,c});
// if(!s)q.push({s,t,c});
// }
// lint ans=0;
// while(q.size()){
// s=q.top().from,t=q.top().to,c=q.top().c;q.pop();
// if(!tr.same(0,t)){
// tr.unite(0,t);
// ans+=c;
// for(auto i:g[t]){
// q.push(i);
// }
// }
// }
// /*rep(m){
// if(!tr.same(g[i].to,0)){
// tr.unite(g[i].to,0);
// ans+=g[i].c;
// }
// }*/
// if(tr.sum[tr.root(0)]!=n){
// cout<<tr.sum[tr.root(0)]-1<<" ";
// }o(ans);
//}
int maain() {
lint n;
in(n);
map<lint, lint> ma;
rep(q, n) {
lint a, b;
in(a, b);
lint plf = b, pp;
map<lint, lint> t;
for (int i = 2; i * i <= b; ++i) {
pp = 0;
while (plf % i == 0) {
++pp;
plf /= i;
}
if (pp) { //ここで因数i**ppがわかる
t[i] = pp;
}
}
if (plf != 1) { //ここで因数plf**1がわかる
++t[plf];
}
if (a == 1) {
for (auto i : t) {
ma[fi] += se;
}
} else {
lint ans = linf;
for (auto i : t) {
ans = min(ans, ma[fi] / se);
}
o(ans);
}
}
return 0;
}
// sub-EOF
| [
"identifier.change",
"call.arguments.change"
] | 810,731 | 810,732 | u675296835 | cpp |
p02998 | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
class UnionFind {
vector<int> par;
public:
UnionFind(int n) { par.assign(n, -1); }
int root(int x) {
if (par[x] < 0)
return x;
else
return par[x] == root(par[x]);
}
bool same(int x, int y) { return root(x) == root(y); }
bool merge(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return 0;
if (par[x] > par[y])
swap(x, y);
par[x] += par[y];
par[y] = x;
return 1;
}
int size(int x) { return -par[root(x)]; }
};
const long long ma = 110000;
long long n;
vector<long long> x, y;
long long solve() {
cin >> n;
UnionFind uf(ma * 2);
x.resize(n);
y.resize(n);
for (int i = 0; i < n; i++)
cin >> x[i] >> y[i], uf.merge(x[i], y[i] + ma);
map<int, long long> mx, my;
for (int i = 0; i < ma; i++)
mx[uf.root(i)]++;
for (int i = ma; i < 2 * ma; i++)
my[uf.root(i)]++;
long long res = 0;
for (int r = 0; r < ma * 2; r++)
res += mx[r] * my[r];
return res - n;
}
main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
cout << solve() << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
class UnionFind {
vector<int> par;
public:
UnionFind(int n) { par.assign(n, -1); }
int root(int x) {
if (par[x] < 0)
return x;
else
return par[x] = root(par[x]);
}
bool same(int x, int y) { return root(x) == root(y); }
bool merge(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return 0;
if (par[x] > par[y])
swap(x, y);
par[x] += par[y];
par[y] = x;
return 1;
}
int size(int x) { return -par[root(x)]; }
};
const long long ma = 110000;
long long n;
vector<long long> x, y;
long long solve() {
cin >> n;
UnionFind uf(ma * 2);
x.resize(n);
y.resize(n);
for (int i = 0; i < n; i++)
cin >> x[i] >> y[i], uf.merge(x[i], y[i] + ma);
map<int, long long> mx, my;
for (int i = 0; i < ma; i++)
mx[uf.root(i)]++;
for (int i = ma; i < 2 * ma; i++)
my[uf.root(i)]++;
long long res = 0;
for (int r = 0; r < ma * 2; r++)
res += mx[r] * my[r];
return res - n;
}
main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
cout << solve() << endl;
return 0;
} | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 810,735 | 810,736 | u468811760 | cpp |
p02998 | /*input
9
1 1
2 1
3 1
4 1
5 1
1 2
1 3
1 4
1 5
*/
#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;
typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
#pragma GCC optimize("unroll-loops,no-stack-protector")
// order_of_key #of elements less than x
// find_by_order kth element
using ll = long long;
using ld = long double;
using pii = pair<ll, ll>;
#define f first
#define s second
#define pb push_back
#define REP(i, n) for (int i = 0; i < n; i++)
#define FILL(n, x) memset(n, x, sizeof(n))
#define ALL(_a) _a.begin(), _a.end()
#define sz(x) (int)x.size()
#define SORT_UNIQUE(c) \
(sort(c.begin(), c.end()), \
c.resize(distance(c.begin(), unique(c.begin(), c.end()))))
const ll INF64 = 4e15;
const int INF = 0x3f3f3f3f;
const ll MOD = 1e9 + 7;
const ld PI = acos(-1);
const ld eps = 1e-9;
#define lowb(x) x &(-x)
#define MNTO(x, y) x = min(x, y)
ll mult(ll a, ll b) { return ((a % MOD) * (b % MOD)) % MOD; }
ll mypow(ll a, ll b) {
if (b <= 0)
return 1;
ll res = 1LL;
while (b) {
if (b & 1)
res = mult(res, a);
a = mult(a, a);
b >>= 1;
}
return res;
}
// default code end
const ll maxn = 100005;
const ll maxlg = __lg(maxn) + 2;
vector<pair<pii, int>> v, v2;
int par[maxn], rk1[maxn];
vector<int> x[maxn], y[maxn];
int find(int u) { return par[u] == u ? u : par[u] = find(par[u]); }
void merge(int u, int v) {
u = find(u), v = find(v);
if (u == v)
return;
if (rk1[u] > rk1[v])
swap(u, v);
for (auto z : x[u])
x[v].pb(z);
for (auto z : y[u])
y[v].pb(z);
par[u] = v;
rk1[v] += rk1[u];
}
int main() {
int n;
cin >> n;
REP(i, n) {
int a, b;
cin >> a >> b;
v.pb({{a, b}, i});
v2.pb({{b, a}, i});
par[i] = i, rk1[i] = 1;
x[i].pb(a);
y[i].pb(b);
}
sort(ALL(v));
sort(ALL(v2));
REP(i, n - 1) {
if (v[i].f.f == v[i + 1].f.f)
merge(v[i].s, v[i + 1].s);
}
REP(i, n - 1) if (v[i].f.f == v[i + 1].f.f) merge(v2[i].s, v2[i + 1].s);
ll ans = 0;
REP(i, n) {
if (par[i] == i) {
SORT_UNIQUE(x[i]);
SORT_UNIQUE(y[i]);
ans += (ll)sz(x[i]) * sz(y[i]);
}
}
cout << ans - n << '\n';
} | /*input
3
1 1
5 1
5 5
*/
#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;
typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
#pragma GCC optimize("unroll-loops,no-stack-protector")
// order_of_key #of elements less than x
// find_by_order kth element
using ll = long long;
using ld = long double;
using pii = pair<ll, ll>;
#define f first
#define s second
#define pb push_back
#define REP(i, n) for (int i = 0; i < n; i++)
#define FILL(n, x) memset(n, x, sizeof(n))
#define ALL(_a) _a.begin(), _a.end()
#define sz(x) (int)x.size()
#define SORT_UNIQUE(c) \
(sort(c.begin(), c.end()), \
c.resize(distance(c.begin(), unique(c.begin(), c.end()))))
const ll INF64 = 4e15;
const int INF = 0x3f3f3f3f;
const ll MOD = 1e9 + 7;
const ld PI = acos(-1);
const ld eps = 1e-9;
#define lowb(x) x &(-x)
#define MNTO(x, y) x = min(x, y)
ll mult(ll a, ll b) { return ((a % MOD) * (b % MOD)) % MOD; }
ll mypow(ll a, ll b) {
if (b <= 0)
return 1;
ll res = 1LL;
while (b) {
if (b & 1)
res = mult(res, a);
a = mult(a, a);
b >>= 1;
}
return res;
}
// default code end
const ll maxn = 100005;
const ll maxlg = __lg(maxn) + 2;
vector<pair<pii, int>> v, v2;
int par[maxn], rk1[maxn];
vector<int> x[maxn], y[maxn];
int find(int u) { return par[u] == u ? u : par[u] = find(par[u]); }
void merge(int u, int v) {
u = find(u), v = find(v);
if (u == v)
return;
if (rk1[u] > rk1[v])
swap(u, v);
for (auto z : x[u])
x[v].pb(z);
for (auto z : y[u])
y[v].pb(z);
par[u] = v;
rk1[v] += rk1[u];
}
int main() {
int n;
cin >> n;
REP(i, n) {
int a, b;
cin >> a >> b;
v.pb({{a, b}, i});
v2.pb({{b, a}, i});
par[i] = i, rk1[i] = 1;
x[i].pb(a);
y[i].pb(b);
}
sort(ALL(v));
sort(ALL(v2));
REP(i, n - 1) {
if (v[i].f.f == v[i + 1].f.f)
merge(v[i].s, v[i + 1].s);
}
REP(i, n - 1) if (v2[i].f.f == v2[i + 1].f.f) merge(v2[i].s, v2[i + 1].s);
ll ans = 0;
REP(i, n) {
if (par[i] == i) {
SORT_UNIQUE(x[i]);
SORT_UNIQUE(y[i]);
ans += (ll)sz(x[i]) * sz(y[i]);
}
}
cout << ans - n << '\n';
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 810,742 | 810,743 | u110464018 | cpp |
p02998 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
using namespace std;
const int V = 100005;
vector<int> to[V * 2];
bool visited[V * 2]; //グローバル変数なので0で初期化される
vector<int> cnt;
void dfs(int v) {
if (visited[v])
return;
visited[v] = true;
cnt[v / V]++;
for (int u : to[v])
dfs(u);
}
int main() {
int n;
cin >> n;
rep(i, n) {
int x, y;
cin >> x >> y;
y += V;
to[x].push_back(y);
to[y].push_back(x);
}
ll ans = 0;
rep(i, V * 2) {
if (visited[i])
continue;
cnt = vector<int>(2);
dfs(i);
ans += (ll)cnt[0] * cnt[1];
}
ans -= n;
cout << n << endl;
}
| #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
using namespace std;
const int V = 100005;
vector<int> to[V * 2];
bool visited[V * 2]; //グローバル変数なので0で初期化される
vector<int> cnt;
void dfs(int v) {
if (visited[v])
return;
visited[v] = true;
cnt[v / V]++;
for (int u : to[v])
dfs(u);
}
int main() {
int n;
cin >> n;
rep(i, n) {
int x, y;
cin >> x >> y;
y += V;
to[x].push_back(y);
to[y].push_back(x);
}
ll ans = 0;
rep(i, V * 2) {
if (visited[i])
continue;
cnt = vector<int>(2);
dfs(i);
ans += (ll)cnt[0] * cnt[1];
}
ans -= n;
cout << ans << endl;
}
| [
"identifier.change",
"io.output.change"
] | 810,752 | 810,753 | u091665287 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.