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 |
|---|---|---|---|---|---|---|---|
p02983 | #include <algorithm>
#include <array>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, n) for (int(i) = 0; (i) < (n); (i)++)
typedef long long ll;
ll gcd(ll a, ll b) {
if (a < b)
return gcd(b, a);
ll r;
while ((r = a % b)) {
a = b;
b = r;
}
return b;
}
int main() {
int L, R;
cin >> L >> R;
ll max = pow(10, 9) * 2;
if ((R - L) > 2018) {
cout << 0 << endl;
} else {
for (int i = L; i < R; i++) {
for (int j = i + 1; j <= R; j++) {
ll tmp = ((i % 2019) * (j % 2019)) % 2019;
if (max > tmp) {
max = tmp;
}
}
}
}
cout << max << endl;
return 0;
}
| #include <algorithm>
#include <array>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, n) for (int(i) = 0; (i) < (n); (i)++)
typedef long long ll;
ll gcd(ll a, ll b) {
if (a < b)
return gcd(b, a);
ll r;
while ((r = a % b)) {
a = b;
b = r;
}
return b;
}
int main() {
ll L, R;
cin >> L >> R;
ll max = pow(10, 9) * 2;
if ((R - L) > 2018) {
cout << 0 << endl;
return 0;
} else {
for (int i = L; i < R; i++) {
for (int j = i + 1; j <= R; j++) {
ll tmp = ((i % 2019) * (j % 2019)) % 2019;
if (max > tmp) {
max = tmp;
}
}
}
}
cout << max << endl;
return 0;
}
| [
"variable_declaration.type.change",
"control_flow.return.add",
"control_flow.return.0.add"
] | 790,019 | 790,018 | u920434083 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t L, R;
cin >> L >> R;
int64_t ans = 2018;
for (int64_t i = L; i < R; i++) {
if (R - L >= 2019) {
ans = 0;
break;
}
for (int64_t j = i; j < R + 1; j++) {
ans = min(ans, (i * (j + 1)) % 2019);
if (ans == 0)
break;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t L, R;
cin >> L >> R;
int64_t ans = 2018;
for (int64_t i = L; i < R; i++) {
if (R - L >= 2019) {
ans = 0;
break;
}
for (int64_t j = i; j < R; j++) {
ans = min(ans, (i * (j + 1)) % 2019);
if (ans == 0)
break;
}
}
cout << ans << endl;
} | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 790,023 | 790,024 | u984247484 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
#define rp(i, k, n) for (int i = k; i < n; i++)
typedef long long ll;
ll mod = 1e9 + 7;
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;
}
const ll inf = 1ll << 60;
int main() {
int l, r;
scanf("%d%d", &l, &r);
if (r - l >= 2019) {
printf("%d", 0);
return 0;
}
l %= 2019;
r %= 2019;
if (l >= r)
printf("%d", 0);
else if (l == 0)
printf("%d", 0);
else {
int res = 2019;
rp(i, l, r) {
rp(j, 1, r - l + 1) { chmin(res, (i * (i + j)) % 2019); }
}
printf("%d", res);
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define rp(i, k, n) for (int i = k; i < n; i++)
typedef long long ll;
ll mod = 1e9 + 7;
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;
}
const ll inf = 1ll << 60;
int main() {
int l, r;
scanf("%d%d", &l, &r);
if (r - l >= 2019) {
printf("%d", 0);
return 0;
}
l %= 2019;
r %= 2019;
if (l >= r)
printf("%d", 0);
else if (l == 0)
printf("%d", 0);
else {
int res = 2019;
rp(i, l, r) {
rp(j, 1, r - i + 1) { chmin(res, (i * (i + j)) % 2019); }
}
printf("%d", res);
}
return 0;
} | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 790,036 | 790,037 | u575653048 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r, ans = 2019;
cin >> l >> r;
for (int i = l; i < r; i++) {
for (int j = i + 1; j < r; j++) {
int a = i * j % 2019;
ans = min(a, ans);
if (ans == 0)
break;
}
if (ans == 0)
break;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r, ans = 2019;
cin >> l >> r;
for (long long i = l; i <= r; i++) {
for (long long j = i + 1; j <= r; j++) {
int a = i * j % 2019;
ans = min(a, ans);
if (ans == 0)
break;
}
if (ans == 0)
break;
}
cout << ans << endl;
}
| [
"control_flow.loop.for.initializer.change",
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,051 | 790,049 | u422633119 | cpp |
p02983 | // RemainderMinimization.cpp : This file contains the 'main' function. Program
// execution begins and ends there.
//
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long a;
long long b;
cin >> a >> b;
long long min1 = 2018;
if (a % 2019 == 0 || b % 2019 == 0 || (b - a >= 2019)) {
cout << 0 << endl;
return 0;
}
for (long long i = a; i <= b; i++) {
for (long long j = a + 1; j <= b; j++) {
min1 = min((i * j) % 2019, min1);
}
}
cout << min1 << endl;
}
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project > Add
// Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open > Project
// and select the .sln file
| // RemainderMinimization.cpp : This file contains the 'main' function. Program
// execution begins and ends there.
//
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long a;
long long b;
cin >> a >> b;
long long min1 = 2018;
if (a % 2019 == 0 || b % 2019 == 0 || (b - a >= 2020)) {
cout << 0 << endl;
return 0;
}
for (long long i = a; i < b; i++) {
for (long long j = a + 1; j <= b; j++) {
min1 = min((i * j) % 2019, min1);
}
}
cout << min1 << endl;
}
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project > Add
// Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open > Project
// and select the .sln file
| [
"literal.number.change",
"control_flow.branch.if.condition.change",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,052 | 790,053 | u467345889 | cpp |
p02983 | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define fi first
#define sc second
#define ALL(x) x.begin(), x.end()
#define RALL(X) x.begin(), x.end()
#define FOR(i, n, k) for (i = 0; i < n; i += k)
#define FO(i, n, k) for (i = 1; i <= n; i += k)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define N 100005
#define mid ((l + r) / 2)
#define dbg(x) (cerr << #x << " : " << x << endl)
#define endl "\n"
#define MOD 100000009
using namespace std;
typedef long long lli;
#define int long long
signed main() {
ios_base::sync_with_stdio(false);
lli l, r;
cin >> l >> r;
if (2019 <= r - l) {
cout << 0;
return 0;
}
int res = INT_MAX;
for (int i = l; i <= r; i++) {
for (int j = l + 1; j <= r; j++) {
res = min(res, (i * j) % 2019);
}
}
cout << res;
return 0;
} | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define fi first
#define sc second
#define ALL(x) x.begin(), x.end()
#define RALL(X) x.begin(), x.end()
#define FOR(i, n, k) for (i = 0; i < n; i += k)
#define FO(i, n, k) for (i = 1; i <= n; i += k)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define N 100005
#define mid ((l + r) / 2)
#define dbg(x) (cerr << #x << " : " << x << endl)
#define endl "\n"
#define MOD 100000009
using namespace std;
typedef long long lli;
#define int long long
signed main() {
ios_base::sync_with_stdio(false);
lli l, r;
cin >> l >> r;
if (2019 <= r - l) {
cout << 0;
return 0;
}
int res = INT_MAX;
for (int i = l; i <= r; i++) {
for (int j = i + 1; j <= r; j++) {
res = min(res, (i * j) % 2019);
}
}
cout << res;
return 0;
} | [
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,054 | 790,055 | u724515098 | cpp |
p02983 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
static const ll MOD = 1e9 + 7;
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rep_r(i, s, n) for (int i = n - 1; i >= s; i--)
#define repe(i, s, n) for (int i = s; i <= n; i++)
#define repe_r(i, s, n) for (int i = n; i >= s; i--)
int main() {
ll l, r;
cin >> l >> r;
if (r - l >= 2019) {
cout << 0 << endl;
return 0;
}
else {
ll t = 1e13;
rep(i, l, r) {
repe(j, l + 1, r) { t = min((ll)(i % 2019) * (ll)(j % 2019), t); }
}
cout << t << endl;
return 0;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
static const ll MOD = 1e9 + 7;
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rep_r(i, s, n) for (int i = n - 1; i >= s; i--)
#define repe(i, s, n) for (int i = s; i <= n; i++)
#define repe_r(i, s, n) for (int i = n; i >= s; i--)
int main() {
ll l, r;
cin >> l >> r;
if (r - l >= 2019) {
cout << 0 << endl;
return 0;
}
else {
ll t = 1e13;
rep(i, l, r) {
repe(j, i + 1, r) {
// ll p = (i*j) % 2019;
// t = min(t, p % 2019);
t = min((ll)(i % 2019) * (ll)(j % 2019) % 2019, t);
}
}
cout << t << endl;
return 0;
}
return 0;
} | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"assignment.change"
] | 790,058 | 790,059 | u685009987 | cpp |
p02983 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
static const ll MOD = 1e9 + 7;
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rep_r(i, s, n) for (int i = n - 1; i >= s; i--)
#define repe(i, s, n) for (int i = s; i <= n; i++)
#define repe_r(i, s, n) for (int i = n; i >= s; i--)
int main() {
ll l, r;
cin >> l >> r;
if (r - l >= 2019) {
cout << 0 << endl;
return 0;
}
else {
ll t = 1e13;
// rep(i, l, r) {
// t = min((ll)(i % 2019), t);
//}
rep(i, l, r) {
repe(j, l + 1, r) { t = min((ll)(i % 2019) * (ll)(j % 2019), t); }
}
cout << t << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
static const ll MOD = 1e9 + 7;
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rep_r(i, s, n) for (int i = n - 1; i >= s; i--)
#define repe(i, s, n) for (int i = s; i <= n; i++)
#define repe_r(i, s, n) for (int i = n; i >= s; i--)
int main() {
ll l, r;
cin >> l >> r;
if (r - l >= 2019) {
cout << 0 << endl;
return 0;
}
else {
ll t = 1e13;
rep(i, l, r) {
repe(j, i + 1, r) {
// ll p = (i*j) % 2019;
// t = min(t, p % 2019);
t = min((ll)(i % 2019) * (ll)(j % 2019) % 2019, t);
}
}
cout << t << endl;
return 0;
}
return 0;
} | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"assignment.change",
"control_flow.return.add",
"control_flow.return.0.add"
] | 790,060 | 790,059 | u685009987 | cpp |
p02983 | #include <cmath>
#include <iostream>
using namespace std;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
int main() {
long long L, R, res = 2020;
cin >> L >> R;
if (R - L > 2019)
R = L + 2019;
rep(i, L, R) {
long long i_res = i % 2019;
rep(j, i + 1, R) {
long long j_res = j % 2019;
res = min(i_res * j_res, res);
}
}
cout << res << endl;
}
| #include <cmath>
#include <iostream>
using namespace std;
#define rep(i, a, b) for (long long i = (a); i <= (b); i++)
int main() {
long long L, R, res = 2020;
cin >> L >> R;
if (R - L > 2019)
R = L + 2019;
rep(i, L, R) {
long long i_res = i % 2019;
rep(j, i + 1, R) {
long long j_res = j % 2019;
// res = min((i_res*j_res)%2019,res);
res = min(i * j % 2019, res);
}
}
cout << res << endl;
}
| [
"preprocessor.define.value.change",
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"assignment.change"
] | 790,063 | 790,064 | u291552830 | cpp |
p02983 | #include <cmath>
#include <iostream>
using namespace std;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
int main() {
long long L, R, res = 2020;
cin >> L >> R;
if (R - L > 2019)
R = L + 2019;
rep(i, L, R) {
long long i_res = i % 2019;
rep(j, i + 1, R) {
long long j_res = j % 2019;
res = min(i_res * j_res, res);
}
}
cout << res << endl;
}
| #include <cmath>
#include <iostream>
using namespace std;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
int main() {
long long L, R, res = 2020;
cin >> L >> R;
if (R - L > 2019)
R = L + 2019;
rep(i, L, R) {
long long i_res = i % 2019;
rep(j, i + 1, R) {
long long j_res = j % 2019;
res = min((i_res * j_res) % 2019, res);
}
}
cout << res << endl;
}
| [
"call.arguments.change",
"assignment.change"
] | 790,063 | 790,065 | u291552830 | cpp |
p02983 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define INF 1e9
typedef long long ll;
using namespace std;
int main() {
int l, r;
cin >> l >> r;
int minnum = INF;
int mod = 0;
if (r - l >= 2019) {
cout << 0 << endl;
} else {
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
int ll = i % 2019;
int rr = j % 2019;
mod = (ll * rr) % 2019;
minnum = min(minnum, mod);
}
}
}
cout << minnum << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define INF 1e9
typedef long long ll;
using namespace std;
int main() {
int l, r;
cin >> l >> r;
int minnum = INF;
int mod = 0;
if ((r - l) >= 2019) {
cout << 0 << endl;
} else {
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
int ll = i % 2019;
int rr = j % 2019;
mod = (ll * rr) % 2019;
minnum = min(minnum, mod);
}
}
cout << minnum << endl;
}
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 790,097 | 790,098 | u008582165 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int l, r, i, j, c, mi = INT_MAX;
cin >> l >> r;
i = (l - 1) / 2019;
j = r / 2019;
if (i != j)
cout << 0 << endl;
else {
for (int i = l; i <= r; i++) {
for (int j = l; j <= r; j++) {
if (i != j)
c = (i * j) % 2019;
mi = min(c, mi);
}
}
cout << mi << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long int l, r, i, j, c, mi = INT_MAX;
cin >> l >> r;
i = (l - 1) / 2019;
j = r / 2019;
if (i != j)
cout << 0 << endl;
else {
for (long long int i = l; i <= r; i++) {
for (long long int j = l; j <= r; j++) {
if (i != j) {
c = (i * j) % 2019;
mi = min(c, mi);
}
}
}
cout << mi << endl;
}
} | [
"control_flow.loop.for.initializer.change"
] | 790,107 | 790,106 | u553810513 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
#define PB(x) push_back(x)
#define MP(x, y) make_pair(x, y)
#define int long long int
#define F first
#define S second
#define boost ios_base::sync_with_stdio(false), cin.tie(NULL);
const int MOD = 998244353;
//#include <ext/pb_ds/assoc_container.hpp> // Common file
//#include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// stringstream ss; string temp; ss<<str(original string) ss>>temp;
int32_t main() {
int l, r;
cin >> l >> r;
if ((r - l + 1) > 2019) {
cout << "0" << endl;
return 0;
}
int ans = INT_MAX;
for (int i = l; i <= r; i++) {
for (int j = l + 1; j <= r; j++) {
ans = min(ans, (i % 2019 * j % 2019) % 2019);
}
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define PB(x) push_back(x)
#define MP(x, y) make_pair(x, y)
#define int long long int
#define F first
#define S second
#define boost ios_base::sync_with_stdio(false), cin.tie(NULL);
const int MOD = 998244353;
//#include <ext/pb_ds/assoc_container.hpp> // Common file
//#include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// stringstream ss; string temp; ss<<str(original string) ss>>temp;
int32_t main() {
int l, r;
cin >> l >> r;
if ((r - l + 1) > 2019) {
cout << "0" << endl;
return 0;
}
int ans = INT_MAX;
for (int i = l; i <= r; i++) {
for (int j = i + 1; j <= r; j++) {
ans = min(ans, (i % 2019 * j % 2019) % 2019);
}
}
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,108 | 790,109 | u359149108 | cpp |
p02983 | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b = (b < MOD) ? b : (b - MOD);
a += b;
a = (a < MOD) ? a : (a - MOD);
}
int main(void) {
ll l, r, i, j, ans = INFLL;
cin >> l >> r;
if (r - l > 2018) {
ans = 0ll;
cout << ans << endl;
return 0;
}
for (i = l; i < r; ++i) {
for (j = i + 1; j <= r; ++j) {
ans = min(ans, (i + j) % 2019);
}
}
cout << ans << endl;
return 0;
}
| #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b = (b < MOD) ? b : (b - MOD);
a += b;
a = (a < MOD) ? a : (a - MOD);
}
int main(void) {
ll l, r, i, j, ans = INFLL;
cin >> l >> r;
if (r - l > 2018) {
ans = 0ll;
cout << ans << endl;
return 0;
}
for (i = l; i < r; ++i) {
for (j = i + 1; j <= r; ++j) {
ans = min(ans, (i * j) % 2019);
}
}
cout << ans << endl;
return 0;
}
| [
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 790,110 | 790,111 | u548624367 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
// 総数を1000000007で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
#define ld long double
#define ull unsigned long long int
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define rep1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define rrep1(i, n) for (int i = ((int)(n)); i > 0; --i)
#define sz(x) ((int)(x).size())
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define RSORT(x) sort(rall(x));
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define FOR(i, m, n) for (int i = m; i < n; i++) // (i, 3, 10) i=3~i=9まで
#define pb push_back
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<double> vd;
typedef vector<long long> vl;
// template<class T>bool maxc(T &a, const T &b) { if (a<b) { a=b; return 1; } }
// template<class T>bool minc(T &a, const T &b) { if (b<a) { a=b; return 1; } }
#define INF (2e9)
#define PI (acos(-1))
#define EPS (1e-7)
int main() {
// cin.tie(0);
// ios::sync_with_stdio(false);
// cout << fixed << setprecision(5);
// 入力
int l, r;
cin >> l >> r;
// 処理
int a, b;
int ans;
for (int i = l; i < r; i++) {
for (int j = l + 1; j <= r; j++) {
a = i % 2019;
b = j % 2019;
ans = min(ans, (a * b) % 2019);
if (ans == 0) {
cout << ans << endl;
return 0;
}
}
}
// 出力
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// 総数を1000000007で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
#define ld long double
#define ull unsigned long long int
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define rep1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define rrep1(i, n) for (int i = ((int)(n)); i > 0; --i)
#define sz(x) ((int)(x).size())
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define RSORT(x) sort(rall(x));
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define FOR(i, m, n) for (int i = m; i < n; i++) // (i, 3, 10) i=3~i=9まで
#define pb push_back
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<double> vd;
typedef vector<long long> vl;
// template<class T>bool maxc(T &a, const T &b) { if (a<b) { a=b; return 1; } }
// template<class T>bool minc(T &a, const T &b) { if (b<a) { a=b; return 1; } }
#define INF (2e9)
#define PI (acos(-1))
#define EPS (1e-7)
int main() {
// cin.tie(0);
// ios::sync_with_stdio(false);
// cout << fixed << setprecision(5);
// 入力
int l, r;
cin >> l >> r;
// 処理
int a, b;
int ans = 2019;
for (int i = l; i < r; i++) {
for (int j = l + 1; j <= r; j++) {
a = i % 2019;
b = j % 2019;
ans = min(ans, (a * b) % 2019);
if (ans == 0) {
cout << ans << endl;
return 0;
}
}
}
// 出力
cout << ans << endl;
return 0;
}
| [
"variable_declaration.value.change"
] | 790,114 | 790,115 | u766205979 | cpp |
p02983 | #include <math.h>
#include <stdio.h>
typedef unsigned long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
ll min = 2019;
scanf("%ulld%ulld", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%ulld", min);
return 0;
} | #include <math.h>
#include <stdio.h>
typedef long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
ll min = 2019;
scanf("%lld%lld", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%lld", min);
return 0;
} | [
"variable_declaration.type.narrow.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 790,118 | 790,119 | u475546258 | cpp |
p02983 | #include <math.h>
#include <stdio.h>
typedef unsigned long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
int min = 2019;
scanf("%ull%ull", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%d", min);
return 0;
} | #include <math.h>
#include <stdio.h>
typedef long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
ll min = 2019;
scanf("%lld%lld", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%lld", min);
return 0;
} | [
"variable_declaration.type.narrow.change",
"variable_declaration.type.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 790,120 | 790,119 | u475546258 | cpp |
p02983 | #include <math.h>
#include <stdio.h>
typedef long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
int min = 2019;
scanf("%d%d", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%d", min);
return 0;
} | #include <math.h>
#include <stdio.h>
typedef long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
ll min = 2019;
scanf("%lld%lld", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%lld", min);
return 0;
} | [
"variable_declaration.type.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 790,122 | 790,119 | u475546258 | cpp |
p02983 | #include <math.h>
#include <stdio.h>
typedef long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
int min = 2019;
scanf("%d%d", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (int i = L; i <= R - 1; i++) {
for (int j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%d", min);
return 0;
} | #include <math.h>
#include <stdio.h>
typedef long long ll;
using namespace std;
int main(void) {
ll L, R, tmp;
ll min = 2019;
scanf("%lld%lld", &L, &R);
if (R > L + 4038) {
R = L + 4038;
}
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
tmp = (i * j) % 2019;
if (min > tmp) {
min = tmp;
}
}
}
printf("%lld", min);
return 0;
} | [
"variable_declaration.type.change",
"literal.string.change",
"call.arguments.change",
"control_flow.loop.for.initializer.change",
"io.output.change"
] | 790,123 | 790,119 | u475546258 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 2019;
long long L, R, ans = 2020;
main() {
std::cin >> L >> R;
for (long long i = L; i < R; i++) {
long long a = i % MOD;
for (long long j = i + 1; j <= R; j++) {
long long b = j % MOD;
ans = min(ans, a * b);
if (ans == 0) {
std::cout << ans;
return 0;
}
}
}
std::cout << ans;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
const long long MOD = 2019;
long long L, R, ans = 2018;
main() {
std::cin >> L >> R;
for (long long i = L; i < R; i++) {
long long a = i % MOD;
for (long long j = i + 1; j <= R; j++) {
long long b = j % MOD;
ans = min(ans, a * b % MOD);
if (ans == 0) {
std::cout << ans;
return 0;
}
}
}
std::cout << ans;
return 0;
}
| [
"literal.number.change",
"variable_declaration.value.change",
"assignment.change"
] | 790,124 | 790,125 | u220678048 | cpp |
p02983 | #include <algorithm>
#include <cmath>
#include <cstdio>
using ll = long long;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
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;
}
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
int main() {
int l, r;
scanf("%d", &l);
scanf("%d", &r);
int ans = INF;
int modl = l % 2019;
int modr = r % 2019;
int val;
if (((r - l) >= 2018) || (modl >= modr)) {
ans = 0;
} else {
FOR(i, modl, modr - 1) {
FOR(j, i + 1, modr) {
val = i * j;
CHMIN(ans, val);
}
}
}
printf("%d\n", ans);
} | #include <algorithm>
#include <cmath>
#include <cstdio>
using ll = long long;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
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;
}
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
int main() {
int l, r;
scanf("%d", &l);
scanf("%d", &r);
int ans = INF;
int modl = l % 2019;
int modr = r % 2019;
int val;
if (((r - l) >= 2018) || (modl >= modr)) {
ans = 0;
} else {
FOR(i, modl, modr - 1) {
FOR(j, i + 1, modr) {
val = (i * j) % 2019;
CHMIN(ans, val);
}
}
}
printf("%d\n", ans);
} | [
"assignment.change"
] | 790,132 | 790,133 | u410392135 | cpp |
p02983 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll l, r;
cin >> l >> r;
if (r - l + 1 >= 2019) {
cout << 0;
return 0;
}
int res = -1;
for (ll int i = l; i <= r; i++) {
for (ll int j = l + 1; j <= r; j++) {
int temp = ((i % 2019) * (j % 2019)) % 2019;
if (res == -1) {
res = temp;
} else {
res = min(res, temp);
}
}
}
cout << res;
return 0;
} | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll l, r;
cin >> l >> r;
if (r - l + 1 >= 2019) {
cout << 0;
return 0;
}
int res = -1;
for (ll int i = l; i <= r; i++) {
for (ll int j = i + 1; j <= r; j++) {
int temp = ((i % 2019) * (j % 2019)) % 2019;
if (res == -1) {
res = temp;
} else {
res = min(res, temp);
}
}
}
cout << res;
return 0;
} | [
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,151 | 790,152 | u070894252 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int M = 2019;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
int l, r;
cin >> l >> r;
if (l + M + 2 < r)
cout << 0 << endl;
else {
int ans = M * M;
for (int i = l; i <= r; i++) {
for (int j = l + 1; j <= r; j++) {
ans = min(ans, (i % M) * (j % M) % M);
}
}
cout << ans << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int M = 2019;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
int l, r;
cin >> l >> r;
if (l + M + 2 < r)
cout << 0 << endl;
else {
int ans = M;
for (int i = l; i <= r; i++) {
for (int j = i + 1; j <= r; j++) {
ans = min(ans, (i % M) * (j % M) % M);
}
}
cout << ans << endl;
}
}
| [
"expression.operation.binary.remove",
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,159 | 790,160 | u161130215 | cpp |
p02983 |
#include <bits/stdtr1c++.h>
// typedef __int128 int128;
// typedef __float128 float128;
using namespace std;
using namespace rel_ops;
typedef long long ll;
typedef long double ld;
typedef complex<ld> pt;
typedef vector<pt> pol;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ld> vd;
typedef vector<vd> vvd;
typedef pair<ll, ll> pii;
typedef vector<pii> vpii;
#define pb push_back
int main() {
// freopen("B.in", "r", stdin);
ll L, R;
cin >> L >> R;
bool nf = true;
for (ll i = L; i <= R; ++i) {
if (i % 2019 == 0) {
cout << 0 << endl;
nf = false;
return 0;
}
}
ll res = ((L % 2019) * ((L + 1) % 2019)) % 2019;
for (ll i = L; i <= R; ++i) {
for (ll j = i; j <= R; ++j) {
ll ij = ((i % 2019) * (j % 2019)) % 2019;
res = min(ij, res);
}
}
cout << res << endl;
}
|
#include <bits/stdtr1c++.h>
// typedef __int128 int128;
// typedef __float128 float128;
using namespace std;
using namespace rel_ops;
typedef long long ll;
typedef long double ld;
typedef complex<ld> pt;
typedef vector<pt> pol;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ld> vd;
typedef vector<vd> vvd;
typedef pair<ll, ll> pii;
typedef vector<pii> vpii;
#define pb push_back
int main() {
// freopen("B.in", "r", stdin);
ll L, R;
cin >> L >> R;
bool nf = true;
for (ll i = L; i <= R; ++i) {
if (i % 2019 == 0) {
cout << 0 << endl;
nf = false;
return 0;
}
}
ll res = ((L % 2019) * ((L + 1) % 2019)) % 2019;
for (ll i = L; i < R; ++i) {
for (ll j = i + 1; j <= R; ++j) {
ll ij = ((i % 2019) * (j % 2019)) % 2019;
res = min(ij, res);
}
}
cout << res << endl;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"control_flow.loop.for.initializer.change"
] | 790,161 | 790,162 | u317474337 | cpp |
p02983 | #include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define f(n) for (ll i = 0; i < n; i++)
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
ll l, r;
cin >> l >> r;
int m = l * (l + 1) % 2019;
for (ll i = l; i <= (l / 2019 + 1) * 2019 && i < r; i++)
for (ll j = l; j < i; j++)
if (i * j % 2019 < m)
m = i * j % 2019;
cout << m << '\n';
}
| #include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define f(n) for (ll i = 0; i < n; i++)
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
ll l, r;
cin >> l >> r;
int m = l * (l + 1) % 2019;
for (ll i = l; i <= (l / 2019 + 1) * 2019 && i <= r; i++)
for (ll j = l; j < i; j++)
if (i * j % 2019 < m)
m = i * j % 2019;
cout << m << '\n';
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,165 | 790,166 | u036597508 | cpp |
p02983 | #include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define f(n) for (ll i = 0; i < n; i++)
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
ll l, r;
cin >> l >> r;
int m = l * (l + 1) % 2019;
for (ll i = l; i < (l / 2019 + 1) * 2019 && i < r; i++)
for (ll j = l; j < i; j++)
if (i * j % 2019 < m)
m = i * j % 2019;
cout << m << '\n';
}
| #include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define f(n) for (ll i = 0; i < n; i++)
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
ll l, r;
cin >> l >> r;
int m = l * (l + 1) % 2019;
for (ll i = l; i <= (l / 2019 + 1) * 2019 && i <= r; i++)
for (ll j = l; j < i; j++)
if (i * j % 2019 < m)
m = i * j % 2019;
cout << m << '\n';
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,167 | 790,166 | u036597508 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define ll long long int
#define v(d_type) vector<d_type>
#define loop(i, s, n) for (int i = s; i < n; i++)
#define min(x, y) (x) > (y) ? (y) : (x)
#define max(x, y) (x) < (y) ? (y) : (x)
#define print_vec(X) loop(i, 0, X.size()) cout << X[i] << "\n"
int main() {
boost;
ll l, r, min = 4e18;
cin >> l >> r;
ll div_l = l / 2019;
ll div_r = r / 2019;
if (div_l != div_r)
cout << "0\n";
else {
loop(i, l, r) loop(j, i + 1, r) {
ll product = ((i % 2019) * (j % 2019)) % 2019;
if (product < min)
min = product;
}
cout << min << "\n";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define ll long long int
#define v(d_type) vector<d_type>
#define loop(i, s, n) for (int i = s; i < n; i++)
#define min(x, y) (x) > (y) ? (y) : (x)
#define max(x, y) (x) < (y) ? (y) : (x)
#define print_vec(X) loop(i, 0, X.size()) cout << X[i] << "\n"
int main() {
boost;
ll l, r, min = 2020;
cin >> l >> r;
ll div_l = l / 2019;
ll div_r = r / 2019;
if (div_l != div_r)
cout << "0\n";
else {
loop(i, l, r) loop(j, i + 1, r + 1) {
ll product = ((i % 2019) * (j % 2019)) % 2019;
if (product < min)
min = product;
}
cout << min << "\n";
}
return 0;
} | [
"literal.number.change",
"variable_declaration.value.change"
] | 790,168 | 790,169 | u554324289 | cpp |
p02983 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long int ll;
#define MAXSIZE 10000000;
bool comp(const pair<int, int> a, const pair<int, int> b) {
return a.second < b.second;
}
const int MAX = 510000;
const int MOD = 1000000007;
int main() {
ll L, R;
cin >> L >> R;
if ((R - L) >= 2019) {
cout << 0 << endl;
return 0;
} else {
ll minMod;
for (ll i = L; i <= R; i++) {
for (ll j = i + 1; j <= R; j++) {
minMod = min(minMod, (i * j) % 2019);
}
}
cout << minMod << endl;
}
return 0;
}
/*Syakutori
while(cin >>b && b)){
ll t = 1;
long long int ansS = 1,ansT=0;
long long int sum = 0;
for(ll s = 1;s < 50000000;s++){
while(t < 50000000 && sum+Rsum[t] < b){
sum += Rsum[t];
t++;
}
if(b == sum+Rsum[t]){
if(ansT - ansS < t-s){
ansS = s;
ansT = t;
}
cout <<ansS<<" "<<ansT-ansS + 1<<endl;
break;
}
if(t == s)++t;
else sum -= Rsum[s];
}
}
//priority_queue<long long int,vector<long long int>, greater<long long int>>
PQ;
//priority_queue<long long int> PQ1;
*/ | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long int ll;
#define MAXSIZE 10000000;
bool comp(const pair<int, int> a, const pair<int, int> b) {
return a.second < b.second;
}
const int MAX = 510000;
const int MOD = 1000000007;
int main() {
ll L, R;
cin >> L >> R;
if ((R - L) >= 2019) {
cout << 0 << endl;
} else {
ll minMod = 10000000;
for (ll i = L; i <= R; i++) {
for (ll j = i + 1; j <= R; j++) {
minMod = min(minMod, (i * j) % 2019);
}
}
cout << minMod << endl;
}
return 0;
}
/*Syakutori
while(cin >>b && b)){
ll t = 1;
long long int ansS = 1,ansT=0;
long long int sum = 0;
for(ll s = 1;s < 50000000;s++){
while(t < 50000000 && sum+Rsum[t] < b){
sum += Rsum[t];
t++;
}
if(b == sum+Rsum[t]){
if(ansT - ansS < t-s){
ansS = s;
ansT = t;
}
cout <<ansS<<" "<<ansT-ansS + 1<<endl;
break;
}
if(t == s)++t;
else sum -= Rsum[s];
}
}
//priority_queue<long long int,vector<long long int>, greater<long long int>>
PQ;
//priority_queue<long long int> PQ1;
*/ | [
"variable_declaration.value.change"
] | 790,184 | 790,185 | u180345531 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int l, r, c;
l = L % 2019;
r = R % 2019;
c = 2018;
if (l >= r) {
cout << 0 << endl;
} else {
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
if ((i * j) % 2019 <= c) {
c = (i * j) % 2019;
}
}
}
cout << c << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int l, r, c;
l = L % 2019;
r = R % 2019;
c = 2018;
if (l >= r || R - L > 673) {
cout << 0 << endl;
} else {
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
if ((i * j) % 2019 <= c) {
c = (i * j) % 2019;
}
}
}
cout << c << endl;
}
} | [
"control_flow.branch.if.condition.change"
] | 790,188 | 790,189 | u072774815 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, n, m) for (int i = (n); i < (m); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REPR(i, n) for (int i = (n); i >= 0; i--)
#define all(vec) vec.begin(), vec.end()
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
using vp = vector<P>;
using vpp = vector<PP>;
using vs = vector<string>;
#define fi first
#define se second
#define pb push_back
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <typename A, typename B>
istream &operator>>(istream &is, pair<A, B> &p) {
is >> p.fi >> p.se;
return is;
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
os << "(" << p.fi << "," << p.se << ")";
return os;
}
template <typename T> istream &operator>>(istream &is, vector<T> &t) {
REP(i, t.size()) is >> t[i];
return is;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &t) {
os << "{";
REP(i, t.size()) {
if (i)
os << ",";
os << t[i];
}
cout << "}";
return os;
}
const ll MOD = 1000000007LL;
const int INF = 1 << 30;
const ll LINF = 1LL << 60;
int main() {
int l, r;
cin >> l >> r;
if (r - l >= 2300) {
cout << 0 << endl;
} else {
ll ans = INF;
FOR(i, l, r) {
FOR(j, i + 1, r) { chmin(ans, 1ll * i * j % 2019); }
}
cout << ans << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, n, m) for (int i = (n); i < (m); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REPR(i, n) for (int i = (n); i >= 0; i--)
#define all(vec) vec.begin(), vec.end()
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
using vp = vector<P>;
using vpp = vector<PP>;
using vs = vector<string>;
#define fi first
#define se second
#define pb push_back
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <typename A, typename B>
istream &operator>>(istream &is, pair<A, B> &p) {
is >> p.fi >> p.se;
return is;
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
os << "(" << p.fi << "," << p.se << ")";
return os;
}
template <typename T> istream &operator>>(istream &is, vector<T> &t) {
REP(i, t.size()) is >> t[i];
return is;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &t) {
os << "{";
REP(i, t.size()) {
if (i)
os << ",";
os << t[i];
}
cout << "}";
return os;
}
const ll MOD = 1000000007LL;
const int INF = 1 << 30;
const ll LINF = 1LL << 60;
int main() {
ll l, r;
cin >> l >> r;
if (r - l >= 2300) {
cout << 0 << endl;
} else {
ll ans = INF;
FOR(i, l, r + 1) {
FOR(j, i + 1, r + 1) { chmin(ans, 1ll * i * j % 2019); }
}
cout << ans << endl;
}
return 0;
} | [
"variable_declaration.type.change"
] | 790,191 | 790,192 | u437391064 | cpp |
p02983 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repf(i, a, b) for (int i = (a); i < (b); i++)
#define repi(i, a, b) for (int i = (a); i <= (b); i++)
#define repr(i, a, b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define debug(x) cout << #x << " = " << (x) << endl;
#define SORT(x) sort(all(x));
#define RSORT(x) sort(rall(x));
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vi>;
using vd = vector<double>;
using vb = vector<bool>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;
const ll inf = 1ll << 29;
const ll mod = 1000000007;
const double eps = 1e-9;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int main() {
ll L, R;
cin >> L >> R;
R = min(R, L + 637);
ll ans = inf;
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
ans = min(ans, (i * j) % 2019);
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repf(i, a, b) for (int i = (a); i < (b); i++)
#define repi(i, a, b) for (int i = (a); i <= (b); i++)
#define repr(i, a, b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define debug(x) cout << #x << " = " << (x) << endl;
#define SORT(x) sort(all(x));
#define RSORT(x) sort(rall(x));
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vi>;
using vd = vector<double>;
using vb = vector<bool>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;
const ll inf = 1ll << 29;
const ll mod = 1000000007;
const double eps = 1e-9;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int main() {
ll L, R;
cin >> L >> R;
R = min(R, L + 673);
ll ans = inf;
for (ll i = L; i <= R - 1; i++) {
for (ll j = i + 1; j <= R; j++) {
ans = min(ans, (i * j) % 2019);
}
}
cout << ans << endl;
} | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 790,203 | 790,204 | u850516963 | cpp |
p02983 | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
r = min(r, l + 4038);
int ans = 2018;
for (ll i = l; i <= r; i++) {
for (ll j = l + 1; j <= r; j++) {
int x = (i * j) % 2019;
ans = min(ans, x);
}
}
cout << ans << endl;
return 0;
}
| #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
r = min(r, l + 4038);
int ans = 2018;
for (ll i = l; i <= r; i++) {
for (ll j = i + 1; j <= r; j++) {
int x = (i * j) % 2019;
ans = min(ans, x);
}
}
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,224 | 790,225 | u621551154 | cpp |
p02983 | #include <bits/stdc++.h>
template <typename TYPE, std::size_t SIZE>
std::size_t a_len(const TYPE (&array)[SIZE]) {
return SIZE;
}
using namespace std;
using ll = long long int;
using vi = vector<ll>;
#define REPS(a, i, n) for (ll(i) = a; (i) < (n); ++(i))
#define REP(i, n) REPS(0, i, n)
#define ALL(x) (x).begin(), (x).end()
const ll INF = 912345678;
int main() {
ll l, r;
cin >> l >> r;
const int m = 2019;
ll ans = INF;
REPS(l, i, min(r + 1, l + m + 1)) {
REPS(l + 1, j, min(r + 1, l + m + 1)) { ans = min((i * j) % m, ans); }
}
cout << ans << endl;
} | #include <bits/stdc++.h>
template <typename TYPE, std::size_t SIZE>
std::size_t a_len(const TYPE (&array)[SIZE]) {
return SIZE;
}
using namespace std;
using ll = long long int;
using vi = vector<ll>;
#define REPS(a, i, n) for (ll(i) = a; (i) < (n); ++(i))
#define REP(i, n) REPS(0, i, n)
#define ALL(x) (x).begin(), (x).end()
const ll INF = 912345678;
int main() {
ll l, r;
cin >> l >> r;
const int m = 2019;
ll ans = INF;
REPS(l, i, min(r, l + m + 1)) {
REPS(l + 1, j, min(r + 1, l + m + 1)) { ans = min((i * j) % m, ans); }
}
cout << ans << endl;
} | [
"expression.operation.binary.remove"
] | 790,236 | 790,237 | u368256474 | cpp |
p02983 | #include <bits/stdc++.h>
template <typename TYPE, std::size_t SIZE>
std::size_t a_len(const TYPE (&array)[SIZE]) {
return SIZE;
}
using namespace std;
using ll = long long int;
using vi = vector<ll>;
#define REPS(a, i, n) for (ll(i) = a; (i) < (n); ++(i))
#define REP(i, n) REPS(0, i, n)
#define ALL(x) (x).begin(), (x).end()
const ll INF = 912345678;
int main() {
ll l, r;
cin >> l >> r;
const int m = 2019;
ll ans = INF;
REPS(l, i, min(r + 1, l + m)) {
REPS(l + 1, j, min(r + 1, l + m)) { ans = min((i * j) % m, ans); }
}
cout << ans << endl;
} | #include <bits/stdc++.h>
template <typename TYPE, std::size_t SIZE>
std::size_t a_len(const TYPE (&array)[SIZE]) {
return SIZE;
}
using namespace std;
using ll = long long int;
using vi = vector<ll>;
#define REPS(a, i, n) for (ll(i) = a; (i) < (n); ++(i))
#define REP(i, n) REPS(0, i, n)
#define ALL(x) (x).begin(), (x).end()
const ll INF = 912345678;
int main() {
ll l, r;
cin >> l >> r;
const int m = 2019;
ll ans = INF;
REPS(l, i, min(r, l + m + 1)) {
REPS(l + 1, j, min(r + 1, l + m + 1)) { ans = min((i * j) % m, ans); }
}
cout << ans << endl;
} | [
"expression.operation.binary.remove"
] | 790,238 | 790,237 | u368256474 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l & 2019; i <= r % 2019; i++) {
for (int j = l & 2019; j <= r % 2019; j++) {
if (i == j)
continue;
ans = min(ans, (i * j) % 2019);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l % 2019; i <= r % 2019; i++) {
for (int j = l % 2019; j <= i; j++) {
if (i == j)
continue;
ans = min(ans, (i * j) % 2019);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| [
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change",
"identifier.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 790,242 | 790,243 | u355424600 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l & 2019; i <= r % 2019; i++) {
for (int j = l & 2019; j <= i; j++) {
if (i == j)
continue;
ans = min(ans, i * j);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l % 2019; i <= r % 2019; i++) {
for (int j = l % 2019; j <= i; j++) {
if (i == j)
continue;
ans = min(ans, (i * j) % 2019);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| [
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change",
"call.arguments.change",
"call.arguments.add"
] | 790,244 | 790,243 | u355424600 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l & 2019; i <= r % 2019; i++) {
for (int j = l & 2019; j <= r % 2019; j++) {
if (i == j)
continue;
ans = min(ans, (i * j) % 2019);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l % 2019; i <= r % 2019; i++) {
for (int j = l % 2019; j <= r % 2019; j++) {
if (i == j)
continue;
ans = min(ans, (i * j) % 2019);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| [
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,242 | 790,245 | u355424600 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l & 2019; i <= r % 2019; i++) {
for (int j = l & 2019; j <= r % 2019; j++) {
if (i == j)
continue;
ans = min(ans, i * j);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int ans = 2020;
int64_t l, r;
cin >> l >> r;
if ((l / 2019) == (r / 2019)) {
for (int i = l % 2019; i <= r % 2019; i++) {
for (int j = l % 2019; j <= r % 2019; j++) {
if (i == j)
continue;
ans = min(ans, (i * j) % 2019);
}
}
} else {
ans = 0;
}
// cout <<fixed<<setprecision(16)<< << endl;
cout << ans << endl;
// if(flag==1)cout << "Yes" <<endl;
// else cout << "No" <<endl;
return 0;
}
| [
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change",
"call.arguments.change",
"call.arguments.add"
] | 790,246 | 790,245 | u355424600 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
bool chk1[2019];
bool chk2[2019];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int l, r;
cin >> l >> r;
int ans = 2020;
for (int i = l; i <= r; i++) {
if (chk1[i % 2019])
break;
chk1[i % 2019] = true;
for (int j = 0; j < 2019; j++)
chk2[j] = false;
for (int j = i + 1; j <= r; j++) {
;
if (chk2[j % 2019])
break;
chk2[j % 2019] = true;
ans = min(ans, (i % 2019) * (j % 2019));
}
}
cout << ans << '\n';
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
bool chk1[2019];
bool chk2[2019];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int l, r;
cin >> l >> r;
int ans = 2020;
for (int i = l; i <= r; i++) {
if (chk1[i % 2019])
break;
chk1[i % 2019] = true;
for (int j = 0; j < 2019; j++)
chk2[j] = false;
for (int j = i + 1; j <= r; j++) {
;
if (chk2[j % 2019])
break;
chk2[j % 2019] = true;
ans = min(ans, ((i % 2019) * (j % 2019)) % 2019);
}
}
cout << ans << '\n';
return 0;
}
| [
"call.arguments.change",
"call.arguments.add"
] | 790,247 | 790,248 | u277427445 | cpp |
p02983 | #include <iostream>
typedef long long ll;
const ll MOD = 2019;
int main() {
ll L, R;
std::cin >> L >> R;
ll ans = MOD * MOD;
if (L / MOD != R / MOD) {
for (int i = L % MOD; i <= R % MOD; ++i) {
for (int j = i + 1; j <= R % MOD; ++j) {
ans = std::min(ans, i * j % MOD);
}
}
} else
ans = 0;
std::cout << ans << std::endl;
return 0;
}
| #include <iostream>
typedef long long ll;
const ll MOD = 2019;
int main() {
ll L, R;
std::cin >> L >> R;
ll ans = MOD * MOD;
if (L / MOD == R / MOD) {
for (int i = L % MOD; i <= R % MOD; ++i) {
for (int j = i + 1; j <= R % MOD; ++j) {
ans = std::min(ans, i * j % MOD);
}
}
} else
ans = 0;
std::cout << ans << std::endl;
return 0;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 790,251 | 790,252 | u047150897 | cpp |
p02983 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repr(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define all(x) (x).begin(), (x).end()
template <typename T> constexpr auto square(T x) { return (x) * (x); }
int main() {
unsigned long long L, R;
cin >> L >> R;
unsigned long long ans = (L * R) % 2019;
if (R - L >= 673)
ans = 0;
else {
for (unsigned long long i = 0; i < R; i++) {
for (unsigned long long j = i + 1; j < R + 1; j++) {
ans = min(ans, ((i * j) % 2019));
if (ans == 0)
break;
}
}
}
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repr(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define all(x) (x).begin(), (x).end()
template <typename T> constexpr auto square(T x) { return (x) * (x); }
int main() {
unsigned long long L, R;
cin >> L >> R;
unsigned long long ans = (L * R) % 2019;
if (R - L >= 673)
ans = 0;
else {
for (unsigned long long i = L; i < R; i++) {
for (unsigned long long j = i + 1; j < R + 1; j++) {
ans = min(ans, ((i * j) % 2019));
if (ans == 0)
break;
}
}
}
cout << ans << endl;
return 0;
} | [
"variable_declaration.value.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.initializer.change"
] | 790,269 | 790,270 | u464355268 | cpp |
p02983 | #include <algorithm>
#include <cstdio>
#define LL long long
using namespace std;
int main() {
LL L, R, i, j, k = 0, minval, answer;
scanf("%d %d", &L, &R);
if (R - L >= 2018) {
minval = 0;
} else {
answer = 2019; //余りが2019になることはないので、便宜的に設定
for (i = L; i <= R; i++) {
for (j = i + 1; j < R + 1; j++) {
answer = min(answer, (i * j) % 2019);
}
}
}
printf("%d\n", answer);
} | #include <algorithm>
#include <cstdio>
#define LL long long
using namespace std;
int main() {
LL L, R, i, j, k = 0, minval, answer;
scanf("%lld %lld", &L, &R);
if (R - L >= 2018) {
minval = 0;
} else {
answer = 2019; //余りが2019になることはないので、便宜的に設定
for (i = L; i <= R; i++) {
for (j = i + 1; j < R + 1; j++) {
answer = min(answer, (i * j) % 2019);
}
}
}
printf("%lld\n", answer);
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 790,273 | 790,274 | u402389525 | cpp |
p02983 | /*
author : s@if
*/
#include <bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll, ll>
#define PII pair<int, int>
#define ull unsigned long long
#define For(i, a, b) for (int i = a; i <= (int)b; i++)
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int Set(int N, int pos) { return N = N | (1 << pos); }
int fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};
int fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};
int hr[] = {-2, -2, -1, +1, +2, +2, -1, +1};
int hc[] = {+1, -1, +2, +2, -1, +1, -2, -2};
int dx[] = {+1, -1, +0, +0};
int dy[] = {+0, +0, +1, -1};
const int MAXN = (int)1e5 + 9;
int main() {
/* freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0); */
ll i, j, k, l, m, n, p, q, x, y, u, v, r, tc, t;
cin >> l >> r;
ll ans = 2018;
for (i = l, j = 0; i < r && j < 10000; i++, j++) {
for (k = i + 1, p = 0; k < r && p < 10000; k++, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
for (i = r, j = 0; i - 1 >= l && j < 10000; i--, j++) {
for (k = i - 1, p = 0; k > l && p < 10000; k--, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
cout << ans << endl;
// main();
return 0;
}
// read the question correctly (is y a vowel? what are the exact constraints?)
// look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
| /*
author : s@if
*/
#include <bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll, ll>
#define PII pair<int, int>
#define ull unsigned long long
#define For(i, a, b) for (int i = a; i <= (int)b; i++)
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int Set(int N, int pos) { return N = N | (1 << pos); }
int fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};
int fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};
int hr[] = {-2, -2, -1, +1, +2, +2, -1, +1};
int hc[] = {+1, -1, +2, +2, -1, +1, -2, -2};
int dx[] = {+1, -1, +0, +0};
int dy[] = {+0, +0, +1, -1};
const int MAXN = (int)1e5 + 9;
int main() {
/* freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0); */
ll i, j, k, l, m, n, p, q, x, y, u, v, r, tc, t;
cin >> l >> r;
ll ans = 2018;
for (i = l, j = 0; i < r && j < 10000; i++, j++) {
for (k = i + 1, p = 0; k <= r && p < 10000; k++, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
for (i = r, j = 0; i >= l && j < 10000; i--, j++) {
for (k = i - 1, p = 0; k >= l && p < 10000; k--, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
cout << ans << endl;
// main();
return 0;
}
// read the question correctly (is y a vowel? what are the exact constraints?)
// look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 790,278 | 790,279 | u253790619 | cpp |
p02983 | /*
author : s@if
*/
#include <bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll, ll>
#define PII pair<int, int>
#define ull unsigned long long
#define For(i, a, b) for (int i = a; i <= (int)b; i++)
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int Set(int N, int pos) { return N = N | (1 << pos); }
int fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};
int fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};
int hr[] = {-2, -2, -1, +1, +2, +2, -1, +1};
int hc[] = {+1, -1, +2, +2, -1, +1, -2, -2};
int dx[] = {+1, -1, +0, +0};
int dy[] = {+0, +0, +1, -1};
const int MAXN = (int)1e5 + 9;
int main() {
/* freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0); */
ll i, j, k, l, m, n, p, q, x, y, u, v, r, tc, t;
cin >> l >> r;
ll ans = 2018;
for (i = l, j = 0; i < r && j < 10000; i++, j++) {
for (k = i + 1, p = 0; k < r && p < 1000; k++, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
for (i = r, j = 0; i - 1 >= l && j < 10000; i--, j++) {
for (k = i - 1, p = 0; k > l && p < 1000; k--, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
cout << ans << endl;
// main();
return 0;
}
// read the question correctly (is y a vowel? what are the exact constraints?)
// look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
| /*
author : s@if
*/
#include <bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll, ll>
#define PII pair<int, int>
#define ull unsigned long long
#define For(i, a, b) for (int i = a; i <= (int)b; i++)
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int Set(int N, int pos) { return N = N | (1 << pos); }
int fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};
int fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};
int hr[] = {-2, -2, -1, +1, +2, +2, -1, +1};
int hc[] = {+1, -1, +2, +2, -1, +1, -2, -2};
int dx[] = {+1, -1, +0, +0};
int dy[] = {+0, +0, +1, -1};
const int MAXN = (int)1e5 + 9;
int main() {
/* freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0); */
ll i, j, k, l, m, n, p, q, x, y, u, v, r, tc, t;
cin >> l >> r;
ll ans = 2018;
for (i = l, j = 0; i < r && j < 10000; i++, j++) {
for (k = i + 1, p = 0; k <= r && p < 10000; k++, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
for (i = r, j = 0; i >= l && j < 10000; i--, j++) {
for (k = i - 1, p = 0; k >= l && p < 10000; k--, p++) {
m = (i * k) % 2019;
ans = min(ans, m);
}
}
cout << ans << endl;
// main();
return 0;
}
// read the question correctly (is y a vowel? what are the exact constraints?)
// look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"literal.number.change",
"expression.operation.binary.remove"
] | 790,280 | 790,279 | u253790619 | cpp |
p02983 | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define _CRT_SECURE_NO_DEPRECATE
using namespace std;
#define maxv 100005
#define che 1LL << 32
#define modi 1000000007
int main() {
ll a, b;
cin >> a >> b;
ll x = b / 2019;
ll y = (a - 1) / 2019;
if (x == y + 1)
cout << "0" << endl;
else {
ll i, j, ans = 2018;
a = a % 2019, b = b % 2019;
for (i = a; i <= b; i++) {
for (j = i + 1; j <= b; j++) {
ans = min(ans, (i * j) % 2019);
}
}
cout << ans << endl;
}
} | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define _CRT_SECURE_NO_DEPRECATE
using namespace std;
#define maxv 100005
#define che 1LL << 32
#define modi 1000000007
int main() {
ll a, b;
cin >> a >> b;
ll x = b / 2019;
ll y = (a - 1) / 2019;
if (x != y)
cout << "0" << endl;
else {
ll i, j, ans = 2018;
a = a % 2019, b = b % 2019;
for (i = a; i <= b; i++) {
for (j = i + 1; j <= b; j++) {
ans = min(ans, (i * j) % 2019);
}
}
cout << ans << endl;
}
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 790,283 | 790,284 | u941197780 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r;
cin >> l >> r;
long long mn = 2019;
// cout<<l<<" "<<r<<endl;
if (l / 256 != r / 256)
mn = 0;
else if (l % 2019 == 0 || r % 2019 == 0)
mn = 0;
else {
l %= 2019;
r %= 2019;
// cout<<l<<" "<<r<<endl;
for (long long i = l; i <= r; i++) {
for (long long j = i + 1; j <= r; j++) {
// cout<<i<<" "<<j<<endl;
long long temp = (i * j) % 2019;
if (mn > temp) {
mn = temp;
// cout<<i<<" "<<j<<" "<<mn<<endl;
}
}
}
}
cout << mn << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r;
cin >> l >> r;
long long mn = 2019;
// cout<<l<<" "<<r<<endl;
if (l / 2019 != r / 2019)
mn = 0;
else if (l % 2019 == 0 || r % 2019 == 0)
mn = 0;
else {
l %= 2019;
r %= 2019;
// cout<<l<<" "<<r<<endl;
for (long long i = l; i <= r; i++) {
for (long long j = i + 1; j <= r; j++) {
// cout<<i<<" "<<j<<endl;
long long temp = (i * j) % 2019;
if (mn > temp) {
mn = temp;
// cout<<i<<" "<<j<<" "<<mn<<endl;
}
}
}
}
cout << mn << endl;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 790,295 | 790,296 | u260815754 | cpp |
p02983 | // C.
#include <algorithm>
#include <iostream>
#include <sstream>
using namespace std;
typedef long long LL;
LL calc(LL a, LL b) {
LL r = 1LL << 32;
for (LL i = a; i < a; ++i) {
for (LL j = a + 1; j <= b; ++j) {
r = min(r, (i * j) % 2019);
if (!r) {
return r;
}
}
}
return r;
}
int main(int argc, char *argv[]) {
LL l, r;
cin >> l >> r;
LL ans = calc(l, r);
cout << ans << endl;
return 0;
}
| // C.
#include <algorithm>
#include <iostream>
#include <sstream>
using namespace std;
typedef long long LL;
LL calc(LL a, LL b) {
LL r = 1LL << 32;
for (LL i = a; i < b; ++i) {
for (LL j = a + 1; j <= b; ++j) {
r = min(r, (i * j) % 2019);
if (!r) {
return r;
}
}
}
return r;
}
int main(int argc, char *argv[]) {
LL l, r;
cin >> l >> r;
LL ans = calc(l, r);
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 790,297 | 790,298 | u586336940 | cpp |
p02983 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int l, r, i, j, min = 2020, imod = 2020, jmod = 2020;
cin >> l >> r;
for (i = l; i < (r - l + 1 > 2019 ? l + 2019 : r); i++) {
imod = i % 2019;
for (j = i + 1; j < (r - l + 1 > 2019 ? l + 2019 : r); j++) {
jmod = j % 2019;
min = ((imod * jmod) % 2019 > min ? min : (imod * jmod) % 2019);
}
}
cout << min << endl;
}
| #include <iostream>
#include <vector>
using namespace std;
int main() {
int l, r, i, j, min = 2020, imod = 2020, jmod = 2020;
cin >> l >> r;
for (i = l; i <= (r - l + 1 > 2019 ? l + 2019 : r); i++) {
imod = i % 2019;
for (j = i + 1; j <= (r - l + 1 > 2019 ? l + 2019 : r); j++) {
jmod = j % 2019;
min = ((imod * jmod) % 2019 > min ? min : (imod * jmod) % 2019);
}
}
cout << min << endl;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,299 | 790,300 | u067840456 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r, min = INT_MAX;
cin >> l >> r;
// l=l%2019;
// r=r%2019;
if (l >= r)
min = 0;
for (long long i = l; i <= r - 1; i++) {
for (long long j = i + 1; i <= r; i++) {
if (((i % 2019) * (j % 2019)) % 2019 < min)
min = ((i % 2019) * (j % 2019)) % 2019;
if (min == 0)
break;
}
if (min == 0)
break;
}
cout << min << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r, min = 20000;
cin >> l >> r;
// l=l%2019;
// r=r%2019;
if (l >= r)
min = 0;
for (long long i = l; i <= r - 1; i++) {
for (long long j = i + 1; j <= r; j++) {
if (((i % 2019) * (j % 2019)) % 2019 < min)
min = ((i % 2019) * (j % 2019)) % 2019;
if (min == 0)
break;
}
if (min == 0)
break;
}
cout << min << endl;
return 0;
} | [
"variable_declaration.value.change",
"identifier.replace.remove",
"literal.replace.add",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 790,304 | 790,305 | u082478673 | cpp |
p02983 | #include <stdio.h>
int main(void) {
int L, R, min = 2019;
scanf("%d %d", &L, &R);
if (R - L >= 2019) {
puts("0");
return 0;
}
for (int i = L; i < L + 2019 && i <= R; ++i) {
for (int j = L + 1; j <= L + 2019 && j <= R; ++j) {
int t = ((long long)i * j) % 2019;
if (min > t)
min = t;
}
}
printf("%d\n", min);
return 0;
}
| #include <stdio.h>
int main(void) {
int L, R, min = 2019;
scanf("%d %d", &L, &R);
if (R - L >= 2019) {
puts("0");
return 0;
}
for (int i = L; i <= L + 2019 && i <= R; ++i) {
for (int j = i + 1; j <= L + 2019 && j <= R; ++j) {
int t = ((long long)i * j) % 2019;
if (min > t)
min = t;
}
}
printf("%d\n", min);
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"identifier.change",
"control_flow.loop.for.initializer.change"
] | 790,312 | 790,313 | u299647642 | cpp |
p02983 | #include <stdio.h>
int main(void) {
int L, R, min = 2019;
scanf("%d %d", &L, &R);
if (R - L >= 2019) {
puts("0");
return 0;
}
for (int i = L; i < L + 2019 && i <= R; ++i) {
for (int j = L + 1; j <= L + 2019 && j <= R; ++j) {
int t = (i * j) % 2019;
if (min > t)
min = t;
}
}
printf("%d\n", min);
return 0;
}
| #include <stdio.h>
int main(void) {
int L, R, min = 2019;
scanf("%d %d", &L, &R);
if (R - L >= 2019) {
puts("0");
return 0;
}
for (int i = L; i <= L + 2019 && i <= R; ++i) {
for (int j = i + 1; j <= L + 2019 && j <= R; ++j) {
int t = ((long long)i * j) % 2019;
if (min > t)
min = t;
}
}
printf("%d\n", min);
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"identifier.change",
"control_flow.loop.for.initializer.change"
] | 790,314 | 790,313 | u299647642 | cpp |
p02983 | #include <iostream>
using namespace std;
int main() {
long L, R;
cin >> L >> R;
long ans = 2019;
if (R - L + 1 >= 2019) {
cout << 0 << endl;
} else {
for (long i = L; i <= R - 1; i++) {
for (long j = i + 1; j <= R; j++) {
ans = min(ans, i * j % 2019);
}
}
cout << ans * ans + ans << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
long L, R;
cin >> L >> R;
long ans = 2019;
if (R - L + 1 >= 2019) {
cout << 0 << endl;
} else {
for (long i = L; i <= R - 1; i++) {
for (long j = i + 1; j <= R; j++) {
ans = min(ans, i * j % 2019);
}
}
cout << ans << endl;
}
return 0;
} | [
"expression.operation.binary.remove"
] | 790,332 | 790,333 | u359856428 | cpp |
p02983 | #include <iostream>
using namespace std;
int main() {
long L, R;
cin >> L >> R;
long ans = 2019;
if (R - L + 1 >= 2019) {
cout << 0 << endl;
} else {
for (long i = L; i <= R - 1; i++) {
for (int j = i + 1; j <= R; j++) {
ans = min(ans, i * j % 2019);
}
}
cout << ans * ans + ans << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
long L, R;
cin >> L >> R;
long ans = 2019;
if (R - L + 1 >= 2019) {
cout << 0 << endl;
} else {
for (long i = L; i <= R - 1; i++) {
for (long j = i + 1; j <= R; j++) {
ans = min(ans, i * j % 2019);
}
}
cout << ans << endl;
}
return 0;
} | [
"control_flow.loop.for.initializer.change",
"variable_declaration.type.primitive.change",
"expression.operation.binary.remove"
] | 790,334 | 790,333 | u359856428 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
long l, r;
cin >> l >> r;
long t = 2019;
for (long i = l; i <= r; i++) {
for (long j = l; j <= r; j++) {
t = min(t, (i * j) % 2019);
if (t == 0) {
cout << t;
return 0;
}
}
}
cout << t;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long l, r;
cin >> l >> r;
long t = 2019;
for (long i = l; i <= r; i++) {
for (long j = i + 1; j <= r; j++) {
t = min(t, (i * j) % 2019);
if (t == 0) {
cout << t;
return 0;
}
}
}
cout << t;
return 0;
} | [
"control_flow.loop.for.initializer.change"
] | 790,341 | 790,342 | u719156378 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t L, R, tmp, mi = 2020;
cin >> L >> R;
for (int64_t i = L; i <= R - 1; i++) {
for (int64_t j = i + 1; j <= R; j++) {
tmp = (i % 2019) * (j % 2019);
if (tmp < mi)
mi = tmp;
if (mi == 0)
break;
}
if (mi == 0)
break;
}
cout << mi << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t L, R, tmp, mi = 2020;
cin >> L >> R;
for (int64_t i = L; i <= R - 1; i++) {
for (int64_t j = i + 1; j <= R; j++) {
tmp = ((i % 2019) * (j % 2019)) % 2019;
if (tmp < mi)
mi = tmp;
if (mi == 0)
break;
}
if (mi == 0)
break;
}
cout << mi << endl;
}
| [
"assignment.change"
] | 790,345 | 790,346 | u013150010 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t L, R, tmp, mi = 2020;
cin >> L >> R;
for (int64_t i = L; i <= R; i++) {
for (int64_t j = i + 1; j <= R; j++) {
tmp = (i % 2019) * (j % 2019);
if (tmp < mi)
mi = tmp;
if (mi == 0)
break;
}
if (mi == 0)
break;
}
cout << mi << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t L, R, tmp, mi = 2020;
cin >> L >> R;
for (int64_t i = L; i <= R - 1; i++) {
for (int64_t j = i + 1; j <= R; j++) {
tmp = ((i % 2019) * (j % 2019)) % 2019;
if (tmp < mi)
mi = tmp;
if (mi == 0)
break;
}
if (mi == 0)
break;
}
cout << mi << endl;
}
| [
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"assignment.change"
] | 790,347 | 790,346 | u013150010 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
// g++ -g -o yourexe yourfile.cpp
//./yourexe < yourinput.in > youroutput.out
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define M 2019
#define ll long long
#define ld long double
#define vi vector<ll>
#define pi pair<ll, ll>
#define vii vector<pi>
#define vvi vector<vi>
#define pb push_back
#define endl "\n"
#define REP(i, s, e) for (ll i = s; i < e; i++)
#define RREP(i, s, e) for (ll i = s; i > e; i--)
#define all(v) v.begin(), v.end()
#define part(v, s, e) v.begin() + s, v.begin() + e
#define print(v) \
for (auto i : v) \
cout << i << " ";
int main() {
fast;
ll l, r;
cin >> l >> r;
ll a = l % M, b = r % M;
if (a < b && r - l < M) {
ll m = LLONG_MAX, t;
REP(i, a, b) {
REP(j, i, b + 1) {
t = (i * j) % M;
m = min(m, t);
}
}
cout << m << endl;
} else
cout << 0 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// g++ -g -o yourexe yourfile.cpp
//./yourexe < yourinput.in > youroutput.out
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define M 2019
#define ll long long
#define ld long double
#define vi vector<ll>
#define pi pair<ll, ll>
#define vii vector<pi>
#define vvi vector<vi>
#define pb push_back
#define endl "\n"
#define REP(i, s, e) for (ll i = s; i < e; i++)
#define RREP(i, s, e) for (ll i = s; i > e; i--)
#define all(v) v.begin(), v.end()
#define part(v, s, e) v.begin() + s, v.begin() + e
#define print(v) \
for (auto i : v) \
cout << i << " ";
int main() {
fast;
ll l, r;
cin >> l >> r;
ll a = l % M, b = r % M;
if (a < b && r - l < M) {
ll m = LLONG_MAX, t;
REP(i, a, b) {
REP(j, i + 1, b + 1) {
t = (i * j) % M;
m = min(m, t);
}
}
cout << m << endl;
} else
cout << 0 << endl;
return 0;
}
| [
"expression.operation.binary.add"
] | 790,365 | 790,366 | u760200622 | cpp |
p02983 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
#define CHMAX(a, b) a = std::max(a, b)
#define CHMIN(a, b) a = std::min(a, b)
#define CHABS(a) a = std::abs(a)
#define COUT(a) std::cout << a << std::endl
#define CERR(a) std::cerr << a << std::endl
#define FOR(n) for (lli i = 0; i < n; i++)
using namespace std;
using lli = long long int;
using pll = pair<lli, lli>;
lli mod197 = 1000000007LL;
// ax + by = gcd(a,b) 最大公約数
template <typename T> T extgcd(T a, T b, T &x, T &y) {
T d = a;
if (b != 0) {
d = extgcd(b, a % b, y, x);
y -= (a / b) * x;
} else {
x = 1;
y = 0;
}
return d;
}
int main(void) {
lli L, R;
cin >> L >> R;
lli ans = 1000000000000;
for (lli i = L; i <= min(L + 2020, R); i++) {
for (lli j = i; j <= min(L + 2020, R); j++) {
CHMIN(ans, (i * j) % 2019);
}
}
COUT(ans);
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
#define CHMAX(a, b) a = std::max(a, b)
#define CHMIN(a, b) a = std::min(a, b)
#define CHABS(a) a = std::abs(a)
#define COUT(a) std::cout << a << std::endl
#define CERR(a) std::cerr << a << std::endl
#define FOR(n) for (lli i = 0; i < n; i++)
using namespace std;
using lli = long long int;
using pll = pair<lli, lli>;
lli mod197 = 1000000007LL;
// ax + by = gcd(a,b) 最大公約数
template <typename T> T extgcd(T a, T b, T &x, T &y) {
T d = a;
if (b != 0) {
d = extgcd(b, a % b, y, x);
y -= (a / b) * x;
} else {
x = 1;
y = 0;
}
return d;
}
int main(void) {
lli L, R;
cin >> L >> R;
lli ans = 1000000000000;
for (lli i = L; i <= min(L + 2020, R); i++) {
for (lli j = i + 1; j <= min(L + 2020, R); j++) {
CHMIN(ans, (i * j) % 2019);
}
}
COUT(ans);
return 0;
} | [
"control_flow.loop.for.initializer.change"
] | 790,383 | 790,384 | u155216115 | cpp |
p02983 | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
int ans = 2018;
r = min(r, l + 4038); // rのサイズが小さくなるため通常ループで計算可能になる
for (ll i = l; i < r + 1; i++) {
for (ll j = i + 1; i < r + 1; i++) {
int x = i * j % 2019;
ans = min(ans, x);
}
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
int ans = 2018;
r = min(r, l + 4038); // rのサイズが小さくなるため通常ループで計算可能になる
for (ll i = l; i < r + 1; i++) {
for (ll j = i + 1; j < r + 1; j++) {
int x = i * j % 2019;
ans = min(ans, x);
}
}
cout << ans << endl;
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 790,427 | 790,426 | u538853954 | cpp |
p02983 | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
int ans = 2018;
r = min(r, l + 4038); // rのサイズが小さくなるため通常ループで計算可能になる
for (ll i = l; i < r + 1; i++) {
for (ll j = i + 1; i < r + 1; i++) {
int x = i + j % 2019;
ans = min(ans, x);
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
int ans = 2018;
r = min(r, l + 4038); // rのサイズが小さくなるため通常ループで計算可能になる
for (ll i = l; i < r + 1; i++) {
for (ll j = i + 1; j < r + 1; j++) {
int x = i * j % 2019;
ans = min(ans, x);
}
}
cout << ans << endl;
}
| [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"expression.operator.arithmetic.change"
] | 790,428 | 790,426 | u538853954 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> lpair;
// const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define rREP(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x, n) \
for (ll i = 0; i < n; i++) { \
cout << (x[i]) << " "; \
} \
cout << endl;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int l, r;
cin >> l >> r;
if (r - l + 1 >= 2019) {
cout << 0 << endl;
} else {
int mod = 2019;
int min_num = 1e7;
REP(i, l, r + 1) {
REP(j, i + 1, r + 1) {
int tmpint = (i % mod) * (j % mod);
min_num = min(min_num, tmpint);
}
}
cout << min_num << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> lpair;
// const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define rREP(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x, n) \
for (ll i = 0; i < n; i++) { \
cout << (x[i]) << " "; \
} \
cout << endl;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int l, r;
cin >> l >> r;
if (r - l + 1 >= 2019) {
cout << 0 << endl;
} else {
int mod = 2019;
int min_num = 1e7;
REP(i, l, r + 1) {
REP(j, i + 1, r + 1) {
int tmpint = (i % mod) * (j % mod);
min_num = min(min_num, tmpint % mod);
}
}
cout << min_num << endl;
}
}
| [
"assignment.change"
] | 790,429 | 790,430 | u706730549 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
#ifdef jcg
assert(freopen("input.in", "r", stdin));
// assert(freopen("output.out", "w", stdout));
#endif
ios_base::sync_with_stdio(0);
cin.tie(0);
int L, R;
cin >> L >> R;
int ans = 2019;
for (int i = L; i < min(R, L + 2020); ++i)
for (int j = L; j < i; ++j)
ans = min(ans, (i % 2019) * (j % 2019) % 2019);
cout << ans << '\n';
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
#ifdef jcg
assert(freopen("input.in", "r", stdin));
// assert(freopen("output.out", "w", stdout));
#endif
ios_base::sync_with_stdio(0);
cin.tie(0);
int L, R;
cin >> L >> R;
int ans = 2019;
for (int i = L; i <= min(R, L + 2020); ++i)
for (int j = L; j < i; ++j)
ans = min(ans, (i % 2019) * (j % 2019) % 2019);
cout << ans << '\n';
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,442 | 790,443 | u428138331 | cpp |
p02983 | #include <stdio.h>
int main() {
int L, R, i, j;
scanf("%d%d", &L, &R);
int a = L / 2019 * 2019;
L -= a;
R -= a;
if (R > L + 2019 * 2)
R = L + 2019 * 2;
int min = 2019;
for (i = L; i < R; i++) {
for (j = i + 1; j < R; j++) {
if (i * j % 2019 < min) {
min = i * j % 2019;
}
}
}
printf("%d\n", min);
} | #include <stdio.h>
int main() {
int L, R, i, j;
scanf("%d%d", &L, &R);
int a = L / 2019 * 2019;
L -= a;
R -= a;
if (R > L + 2019 * 2)
R = L + 2019 * 2;
int min = 2019;
for (i = L; i <= R; i++) {
for (j = i + 1; j <= R; j++) {
if (i * j % 2019 < min) {
min = i * j % 2019;
}
}
}
printf("%d\n", min);
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,446 | 790,447 | u418535691 | cpp |
p02983 | #include <stdio.h>
typedef long long int llint;
int main() {
llint l, r;
scanf("%d%d", &l, &r);
llint answer = 2019;
r = r - l < 2019 ? r : l + 2019;
for (llint i = l; i <= r; i++) {
for (llint j = i + 1; j <= r; j++) {
llint a = (i * j) % 2019;
answer = a < answer ? a : answer;
// if(answer==0) {
// i=r+1;
// j=r+1;
// }
}
}
printf("%lld", answer);
} | #include <stdio.h>
typedef long long llint;
int main() {
int l, r;
scanf("%d %d", &l, &r);
llint answer = 2019;
r = r - l < 2019 ? r : l + 2019;
// if(r-l>2019*2) r=l+2019*2;
for (llint i = l; i <= r; i++) {
for (llint j = i + 1; j <= r; j++) {
llint a = (i * j) % 2019;
answer = a < answer ? a : answer;
// if(a<answer) answer=a;
}
}
printf("%d\n", answer);
} | [
"variable_declaration.type.narrow.change",
"variable_declaration.type.change",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 790,460 | 790,461 | u691912637 | cpp |
p02983 | #include <stdio.h>
typedef long long ll;
int main() {
ll l, r;
scanf("%d %d", &l, &r);
ll answer = 2018;
// r=r-l<2019?r:l+2019;
if (r - l > 2019 * 2)
r = l + 2019 * 2;
for (ll i = l; i <= r; i++) {
for (ll j = i + 1; j <= r; j++) {
ll a = (i * j) % 2019;
// answer=a<answer?a:answer;
if (a < answer)
answer = a;
}
}
printf("%d\n", answer);
} | #include <stdio.h>
typedef long long ll;
int main() {
int l, r;
scanf("%d %d", &l, &r);
ll answer = 2019;
// r=r-l<2019?r:l+2019;
if (r - l > 2019 * 2)
r = l + 2019 * 2;
for (ll i = l; i <= r; i++) {
for (ll j = i + 1; j <= r; j++) {
ll a = (i * j) % 2019;
// answer=a<answer?a:answer;
if (a < answer)
answer = a;
}
}
printf("%d\n", answer);
} | [
"variable_declaration.type.change",
"literal.number.change",
"variable_declaration.value.change"
] | 790,462 | 790,463 | u691912637 | cpp |
p02983 | #include <stdio.h>
typedef long long ll;
int main() {
ll l, r;
scanf("%d %d", &l, &r);
ll answer = 2018;
// r=r-l<2019?r:l+2019;
if (r - l > 2019 * 2)
r = l + 2019 * 2;
for (ll i = l; i <= r; i++) {
for (ll j = i + 1; j <= r; j++) {
ll a = (i * j) % 2019;
// answer=a<answer?a:answer;
if (a < answer)
answer = a;
}
}
printf("%d\n", answer);
} | #include <stdio.h>
typedef long long ll;
int main() {
int l, r;
scanf("%d %d", &l, &r);
ll answer = 2018;
// r=r-l<2019?r:l+2019;
if (r - l > 2019 * 2)
r = l + 2019 * 2;
for (ll i = l; i <= r; i++) {
for (ll j = i + 1; j <= r; j++) {
ll a = (i * j) % 2019;
// answer=a<answer?a:answer;
if (a < answer)
answer = a;
}
}
printf("%d\n", answer);
} | [
"variable_declaration.type.change"
] | 790,462 | 790,464 | u691912637 | cpp |
p02983 | #include <bits/stdc++.h>
#define l_ength size
const int inf = (1 << 30);
const int mod = 1000000007;
using ll = long long;
using namespace std;
int main() {
int l, r;
cin >> l >> r;
int p = l % 2019, q = r % 2019;
if (r - l + 1 >= 2019 || p >= q) {
cout << 0 << endl;
return 0;
}
int ans = inf;
for (int i = p; i <= q; ++i) {
for (int j = i + 1; j <= q; ++j) {
ans = min(i * j, ans);
}
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
#define l_ength size
const int inf = (1 << 30);
const int mod = 1000000007;
using ll = long long;
using namespace std;
int main() {
int l, r;
cin >> l >> r;
int p = l % 2019, q = r % 2019;
if (r - l + 1 >= 2019 || p >= q) {
cout << 0 << endl;
return 0;
}
int ans = 2019;
for (int i = p; i <= q; ++i) {
for (int j = i + 1; j <= q; ++j) {
ans = min((i * j) % 2019, ans);
}
}
cout << ans << endl;
return 0;
} | [
"variable_declaration.value.change",
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"assignment.change"
] | 790,465 | 790,466 | u268977772 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
if (r - l > 2018 || l % 2019 >= r % 2019) {
cout << "0";
return 0;
}
ll res = INT_MAX;
for (ll i = l; i <= r; i++) {
ll tmp;
for (ll j = l + 1; j <= r; j++) {
tmp = i * j % 2019;
res = min(res, tmp);
}
}
cout << res;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
if (r - l > 2018 || l % 2019 >= r % 2019) {
cout << "0";
return 0;
} else {
ll res = INT_MAX;
for (ll i = l; i <= r; i++) {
ll tmp;
for (ll j = i + 1; j <= r; j++) {
tmp = i * j % 2019;
res = min(res, tmp);
}
}
cout << res;
}
}
| [
"control_flow.branch.else.add",
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,469 | 790,470 | u710135612 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
if (r - l > 2018 || l % 2019 > r % 2019) {
cout << "0";
return 0;
}
ll res = INT_MAX;
for (ll i = l; i <= r; i++) {
ll tmp;
for (ll j = l + 1; j <= r; j++) {
tmp = i * j % 2019;
res = min(res, tmp);
}
}
cout << res;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll l, r;
cin >> l >> r;
if (r - l > 2018 || l % 2019 >= r % 2019) {
cout << "0";
return 0;
} else {
ll res = INT_MAX;
for (ll i = l; i <= r; i++) {
ll tmp;
for (ll j = i + 1; j <= r; j++) {
tmp = i * j % 2019;
res = min(res, tmp);
}
}
cout << res;
}
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.branch.else.add",
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,471 | 790,470 | u710135612 | cpp |
p02983 | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 2019;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop \
char nyaa; \
cin >> nyaa;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define per1(i, n) for (int i = n; i >= 1; i--)
#define Rep1(i, sta, n) for (int i = sta; i <= n; i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(), c.end()
#define pb push_back
void Yes() {
cout << "Yes" << endl;
exit(0);
}
void No() {
cout << "No" << endl;
exit(0);
}
int main() {
ll L, R;
ll ans = 0;
cin >> L >> R;
if (R - L + 1 >= 2019)
cout << 0 << endl;
else {
ll mini = INF;
for (ll i = L; i < R; i++) {
for (ll j = R; j > i; j--) {
ll Lm = i % mod;
ll Rm = j % mod;
ans = Lm * Rm;
mini = min(mini, ans);
}
}
cout << mini << endl;
}
}
| #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 2019;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop \
char nyaa; \
cin >> nyaa;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define per1(i, n) for (int i = n; i >= 1; i--)
#define Rep1(i, sta, n) for (int i = sta; i <= n; i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(), c.end()
#define pb push_back
void Yes() {
cout << "Yes" << endl;
exit(0);
}
void No() {
cout << "No" << endl;
exit(0);
}
int main() {
ll L, R;
ll ans = 0;
cin >> L >> R;
if (R - L + 1 >= 2019)
cout << 0 << endl;
else {
ll mini = INF;
for (ll i = L; i < R; i++) {
for (ll j = R; j > i; j--) {
ll Lm = i % mod;
ll Rm = j % mod;
ans = (Lm * Rm) % mod;
mini = min(mini, ans);
}
}
cout << mini << endl;
}
}
| [
"assignment.change"
] | 790,472 | 790,473 | u726501606 | cpp |
p02983 | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 2019;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop \
char nyaa; \
cin >> nyaa;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define per1(i, n) for (int i = n; i >= 1; i--)
#define Rep1(i, sta, n) for (int i = sta; i <= n; i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(), c.end()
#define pb push_back
void Yes() {
cout << "Yes" << endl;
exit(0);
}
void No() {
cout << "No" << endl;
exit(0);
}
int main() {
ll L, R;
ll ans = 0;
cin >> L >> R;
if (R - L + 1 >= 2019)
cout << 0 << endl;
else {
ll mini = INF;
for (int i = L; i < R; i++) {
for (int j = R; j > i; j--) {
ll Lm = i % mod;
ll Rm = j % mod;
ans = Lm * Rm;
mini = min(mini, ans);
}
}
cout << mini << endl;
}
}
| #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 2019;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop \
char nyaa; \
cin >> nyaa;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define per1(i, n) for (int i = n; i >= 1; i--)
#define Rep1(i, sta, n) for (int i = sta; i <= n; i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(), c.end()
#define pb push_back
void Yes() {
cout << "Yes" << endl;
exit(0);
}
void No() {
cout << "No" << endl;
exit(0);
}
int main() {
ll L, R;
ll ans = 0;
cin >> L >> R;
if (R - L + 1 >= 2019)
cout << 0 << endl;
else {
ll mini = INF;
for (ll i = L; i < R; i++) {
for (ll j = R; j > i; j--) {
ll Lm = i % mod;
ll Rm = j % mod;
ans = (Lm * Rm) % mod;
mini = min(mini, ans);
}
}
cout << mini << endl;
}
}
| [
"control_flow.loop.for.initializer.change",
"variable_declaration.type.change",
"assignment.change"
] | 790,474 | 790,473 | u726501606 | cpp |
p02983 | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
// 標準入力
ll l, r;
cin >> l >> r;
ll start = max(l, r - 2019);
// ループスタート(結果にはあまりの最大値である2018をいれておく)
int res = 2018;
for (ll i = start; i <= r; i++) {
for (ll j = start + 1; j <= r; j++) {
res = (res > i * j % 2019) ? i * j % 2019 : res;
}
}
cout << res << endl;
}
| #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
// 標準入力
ll l, r;
cin >> l >> r;
ll start = max(l, r - 2019);
// ループスタート(結果にはあまりの最大値である2018をいれておく)
int res = 2018;
for (ll i = start; i < r; i++) {
for (ll j = i + 1; j <= r; j++) {
res = (res > i * j % 2019) ? i * j % 2019 : res;
}
}
cout << res << endl;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"identifier.change",
"control_flow.loop.for.initializer.change"
] | 790,480 | 790,481 | u427681070 | cpp |
p02983 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
long int l, r;
cin >> l >> r;
long int ans = 400000000000;
for (long int i = l; i <= min(r, l + 2020); i++) {
for (long int j = l + 1; j <= min(r, l + 2020); j++) {
ans = min(ans, (i * j) % 2019);
}
}
cout << ans << "\n";
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
long long int l, r;
cin >> l >> r;
long long int ans = 400000000000;
for (long long int i = l; i <= min(r, l + 2020); i++) {
for (long long int j = i + 1; j <= min(r, l + 2020); j++) {
ans = min(ans, (i * j) % 2019);
}
}
cout << ans << "\n";
} | [
"variable_declaration.type.widen.change",
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,484 | 790,483 | u989928804 | cpp |
p02983 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
// freopen("a.inp","r",stdin);
int a, b, ans;
cin >> a >> b;
b = min(2019, b - a / 2019 * 2019);
a %= 2019;
for (int i = a; i < b; ++i)
for (int j = i + 1; j <= b; ++j)
ans = min(ans, (i * j) % 2019);
cout << ans;
}
| #include <cstdio>
#include <iostream>
using namespace std;
int main() {
// freopen("a.inp","r",stdin);
int a, b, ans = 2019;
cin >> a >> b;
b = min(2019, b - a / 2019 * 2019);
a %= 2019;
for (int i = a; i < b; ++i)
for (int j = i + 1; j <= b; ++j)
ans = min(ans, (i * j) % 2019);
cout << ans;
}
| [
"variable_declaration.value.change"
] | 790,505 | 790,506 | u241159494 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r;
cin >> l >> r;
if (r - l >= 2019)
cout << 0 << endl, exit(0);
l %= 2019;
r %= 2019;
if (l > r)
r += 2019;
int ans = 2019;
for (int i = l; i <= r; i++)
for (int j = l + 1; j <= r; j++) {
ans = min(ans, i * j % 2019);
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r;
cin >> l >> r;
if (r - l >= 2019)
cout << 0 << endl, exit(0);
l %= 2019;
r %= 2019;
if (l > r)
r += 2019;
int ans = 2019;
for (int i = l; i <= r; i++)
for (int j = i + 1; j <= r; j++) {
ans = min(ans, i * j % 2019);
}
cout << ans << endl;
}
| [
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,520 | 790,521 | u731175398 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r;
cin >> l >> r;
if (r - l >= 2019)
cout << 0 << endl, exit(0);
l %= 2019;
r %= 2019;
if (l > r)
r += 2019;
int ans = 2019;
for (int i = l; i <= r; i++)
for (int j = l; j <= r; j++) {
ans = min(ans, i * j % 2019);
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r;
cin >> l >> r;
if (r - l >= 2019)
cout << 0 << endl, exit(0);
l %= 2019;
r %= 2019;
if (l > r)
r += 2019;
int ans = 2019;
for (int i = l; i <= r; i++)
for (int j = i + 1; j <= r; j++) {
ans = min(ans, i * j % 2019);
}
cout << ans << endl;
}
| [
"control_flow.loop.for.initializer.change"
] | 790,522 | 790,521 | u731175398 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int L, R;
cin >> L >> R;
int min_mod = 2019;
long long int tmp;
long long int k1 = L / 2019;
long long int k2 = R / 2019;
if (k1 != k2)
min_mod = 0;
else {
for (long long int i = L; i <= R; ++i) {
for (long long int j = i + 1; j <= R; ++j) {
tmp = (i * j) % 2019;
if (tmp < min_mod)
min_mod = tmp;
}
}
cout << min_mod << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long int L, R;
cin >> L >> R;
int min_mod = 2019;
long long int tmp;
long long int k1 = L / 2019;
long long int k2 = R / 2019;
if (k1 != k2)
min_mod = 0;
else {
for (long long int i = L; i <= R; ++i) {
for (long long int j = i + 1; j <= R; ++j) {
tmp = (i * j) % 2019;
if (tmp < min_mod)
min_mod = tmp;
}
}
}
cout << min_mod << endl;
} | [] | 790,525 | 790,526 | u644546699 | cpp |
p02983 | #include <iostream>
#include <string>
#include <vector>
#define debug(var) \
do { \
std::cout << #var << " : "; \
view(var); \
} while (0)
template <typename T> void view(T e) { std::cout << e << std::endl; }
template <typename T> void view(const std::vector<T> &v) {
for (const auto &e : v) {
std::cout << e << " ";
}
std::cout << std::endl;
}
template <typename T> void view(const std::vector<std::vector<T>> &vv) {
for (const auto &v : vv) {
view(v);
}
}
using namespace std;
using ll = long long;
int main() {
int L, R;
cin >> L >> R;
int ans = 2019;
if (R - L >= 2019) {
ans = 0;
} else {
for (int i = L; i <= R; ++i) {
for (int j = i + 1; j <= R; ++j) {
int l = i % 2019;
int r = j % 2019;
ans = min(ans, l * r);
}
}
}
cout << ans << endl;
return 0;
} | #include <iostream>
#include <string>
#include <vector>
#define debug(var) \
do { \
std::cout << #var << " : "; \
view(var); \
} while (0)
template <typename T> void view(T e) { std::cout << e << std::endl; }
template <typename T> void view(const std::vector<T> &v) {
for (const auto &e : v) {
std::cout << e << " ";
}
std::cout << std::endl;
}
template <typename T> void view(const std::vector<std::vector<T>> &vv) {
for (const auto &v : vv) {
view(v);
}
}
using namespace std;
using ll = long long;
int main() {
int L, R;
cin >> L >> R;
int ans = 2019;
if (R - L >= 2019) {
ans = 0;
} else {
for (int i = L; i <= R; ++i) {
for (int j = i + 1; j <= R; ++j) {
int l = i % 2019;
int r = j % 2019;
ans = min(ans, (l * r) % 2019);
}
}
}
cout << ans << endl;
return 0;
} | [
"call.arguments.change",
"call.arguments.add"
] | 790,527 | 790,528 | u657541767 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
lli l, r;
cin >> l >> r;
if (l - r + 1 >= 2019) {
cout << 0 << endl;
return 0;
}
lli ans = 300000;
for (lli i = l; i <= r; i++) {
for (lli j = l + 1; j <= r; j++) {
ans = min(ans, (i * j) % 2019LL);
}
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
lli l, r;
cin >> l >> r;
if (r - l + 1 >= 2019) {
cout << 0 << endl;
return 0;
}
lli ans = 300000;
for (lli i = l; i <= r; i++) {
for (lli j = i + 1; j <= r; j++) {
ans = min(ans, (i * j) % 2019LL);
}
}
cout << ans << endl;
return 0;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change",
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,536 | 790,535 | u905270643 | cpp |
p02983 | #include <algorithm>
#include <iostream>
#include <string.h>
const long long INF = __LONG_LONG_MAX__;
using namespace std;
int main() {
long long L, R;
cin >> L >> R;
long long min = INF;
for (long long i = L; i <= R; i++) {
for (long long j = L + 1; j <= R; j++) {
if ((i * j) % 2019 < min) {
min = (i * j) % 2019;
}
if (min == 0)
break;
}
if (min == 0)
break;
}
cout << min << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <string.h>
const long long INF = __LONG_LONG_MAX__;
using namespace std;
int main() {
long long L, R;
cin >> L >> R;
long long min = INF;
for (long long i = L; i < R; i++) {
for (long long j = L + 1; j <= R; j++) {
if ((i * j) % 2019 < min) {
min = (i * j) % 2019;
}
if (min == 0)
break;
}
if (min == 0)
break;
}
cout << min << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 790,541 | 790,542 | u780084596 | cpp |
p02983 |
#include <bits/stdc++.h>
using namespace std;
/* g++ -g -fsanitize=address -lasan -std=c++11 -Dfoo_ */
/* freopen("input.txt", "rt", stdin); */
/* freopen("output.txt", "wt", stdout); */
#define ALL(c) (c).begin(), (c).end()
#define ALLR(c) (c).rbegin(), (c).rend()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a); i > (b); --i)
#define FOR_ALL(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define FOR_ALLR(i, c) \
for (__typeof((c).rbegin()) i = (c).rbegin(); i != (c).rend(); ++i)
#define SZ(array) (sizeof(array) / sizeof(array[0]))
#define lc(x) (x << 1) /* 2*x */
#define rc(x) (x << 1 | 1) /* 2*x+1 */
#define lowbit(x) (x & (-x)) /* 0b10100 -> 0b100 */
typedef long long LL;
typedef map<int, int> MII;
typedef pair<int, int> PII;
typedef set<int> SI;
typedef vector<bool> VB;
typedef vector<double> VD;
typedef vector<int> VI;
typedef vector<string> VS;
/* check if a key is in container C */
template <class C> inline bool in_(const typename C::key_type &k, const C &A) {
return A.find(k) != A.end();
}
inline bool in_(const string &s, const string &S) {
return S.find(s) != string::npos;
}
int main() {
#ifdef foo_
freopen("foo", "rt", stdin);
#endif
ios::sync_with_stdio(false);
int L, R;
while (cin >> L >> R) {
const int a = L % 2019;
VI A;
for (int i = 0; i <= min(2019, R - L + 1); i++)
A.push_back((a + i) % 2019);
int ans = 2018;
FOR(i, 0, A.size())
FOR(j, i + 1, A.size()) ans = min(ans, A[i] * A[j] % 2019);
cout << ans << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
/* g++ -g -fsanitize=address -lasan -std=c++11 -Dfoo_ */
/* freopen("input.txt", "rt", stdin); */
/* freopen("output.txt", "wt", stdout); */
#define ALL(c) (c).begin(), (c).end()
#define ALLR(c) (c).rbegin(), (c).rend()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a); i > (b); --i)
#define FOR_ALL(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define FOR_ALLR(i, c) \
for (__typeof((c).rbegin()) i = (c).rbegin(); i != (c).rend(); ++i)
#define SZ(array) (sizeof(array) / sizeof(array[0]))
#define lc(x) (x << 1) /* 2*x */
#define rc(x) (x << 1 | 1) /* 2*x+1 */
#define lowbit(x) (x & (-x)) /* 0b10100 -> 0b100 */
typedef long long LL;
typedef map<int, int> MII;
typedef pair<int, int> PII;
typedef set<int> SI;
typedef vector<bool> VB;
typedef vector<double> VD;
typedef vector<int> VI;
typedef vector<string> VS;
/* check if a key is in container C */
template <class C> inline bool in_(const typename C::key_type &k, const C &A) {
return A.find(k) != A.end();
}
inline bool in_(const string &s, const string &S) {
return S.find(s) != string::npos;
}
int main() {
#ifdef foo_
freopen("foo", "rt", stdin);
#endif
ios::sync_with_stdio(false);
int L, R;
while (cin >> L >> R) {
const int a = L % 2019;
VI A;
for (int i = 0; i <= min(2019, R - L); i++)
A.push_back((a + i) % 2019);
int ans = 2018;
FOR(i, 0, A.size())
FOR(j, i + 1, A.size()) ans = min(ans, A[i] * A[j] % 2019);
cout << ans << endl;
}
return 0;
}
| [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 790,553 | 790,554 | u668711082 | cpp |
p02983 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
auto ZERO = []() { return cout << 0 << endl, 0; };
if (R - L + 1 >= 2019)
ZERO();
int l = L % 2019, r = R % 2019;
if (l > r)
ZERO();
int ans = 2019;
for (int i = l; i < r; i++)
for (int j = i + 1; j <= r; j++) {
ans = min(ans, i * j % 2019);
}
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
auto ZERO = []() {
cout << 0 << endl;
exit(0);
};
if (R - L + 1 >= 2019)
ZERO();
int l = L % 2019, r = R % 2019;
if (l > r)
ZERO();
int ans = 2019;
for (int i = l; i < r; i++)
for (int j = i + 1; j <= r; j++) {
ans = min(ans, i * j % 2019);
}
cout << ans << endl;
return 0;
} | [
"control_flow.return.remove",
"io.output.change",
"call.add",
"call.arguments.change"
] | 790,573 | 790,574 | u624475441 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int A = L % 2019;
int a = L / 2019;
int B = R - (2019 * a);
int min = 2019 * 2019;
if (2019 - A <= B - A) {
min = 0;
cout << min << endl;
} else {
for (int i = A; i < B - 1; i++) {
for (int j = i + 1; j < B; j++) {
if (min > (i * j) % 2019) {
min = (i * j) % 2019;
}
}
}
cout << min << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int A = L % 2019;
int a = L / 2019;
int B = R - (2019 * a);
int min = 2019 * 2019;
if (2019 - A <= B - A) {
min = 0;
cout << min << endl;
} else {
for (int i = A; i < B; i++) {
for (int j = i + 1; j <= B; j++) {
if (min > (i * j) % 2019) {
min = (i * j) % 2019;
}
}
}
cout << min << endl;
}
}
| [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 790,575 | 790,576 | u816390432 | cpp |
p02983 | #include <algorithm>
#include <iostream>
#include <list>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
if ((R - L) >= 2019) {
cout << 0 << endl;
} else {
int ans = 2019;
for (int i = L; i < R; i++) {
int lmod = i % 2019;
for (int j = i + 1; j <= R; j++) {
int rmod = j % 2019;
int tmp = lmod * rmod;
if (tmp < ans) {
ans = tmp;
}
}
}
cout << ans << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <list>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
if ((R - L) >= 2019) {
cout << 0 << endl;
} else {
int ans = 2018;
for (int i = L; i < R; i++) {
int lmod = i % 2019;
for (int j = i + 1; j <= R; j++) {
int rmod = j % 2019;
int tmp = (lmod * rmod) % 2019;
if (tmp < ans) {
ans = tmp;
}
}
}
cout << ans << endl;
}
return 0;
} | [
"literal.number.change",
"variable_declaration.value.change"
] | 790,585 | 790,586 | u569272329 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 2019
int main() {
ll l, r;
cin >> l >> r;
ll ans = 2020;
for (ll i = l; i <= r; i++) {
for (ll j = l + 1; j <= r; j++) {
ans = min(ans, (i * j) % MOD);
if (ans == 0)
break;
}
if (ans == 0)
break;
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 2019
int main() {
ll l, r;
cin >> l >> r;
ll ans = 2020;
for (ll i = l; i <= r; i++) {
for (ll j = i + 1; j <= r; j++) {
ans = min(ans, (i * j) % MOD);
if (ans == 0)
break;
}
if (ans == 0)
break;
}
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change"
] | 790,587 | 790,588 | u935028161 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int c;
int prec;
int n, m;
for (int i = L; i < R; i++) {
for (int j = 1; j < R - i + 1; j++) {
n = i % 2019;
m = (i + j) % 2019;
c = (n * m) % 2019;
if ((i == L) && (j == 1)) {
prec = c;
} else {
if (c < prec) {
prec = c;
}
}
if (prec == 1)
break;
}
if (prec == 1)
break;
}
cout << prec << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int c;
int prec;
int n, m;
for (int i = L; i < R; i++) {
for (int j = 1; j < R - i + 1; j++) {
n = i % 2019;
m = (i + j) % 2019;
c = (n * m) % 2019;
if ((i == L) && (j == 1)) {
prec = c;
} else {
if (c < prec) {
prec = c;
}
}
if (prec == 0)
break;
}
if (prec == 0)
break;
}
cout << prec << endl;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 790,595 | 790,596 | u566571310 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r;
cin >> l >> r;
if (r - l + 1 >= 2019) {
cout << 0 << endl;
} else {
long long ans = 2019;
for (long long i = l; i < r; ++i) {
for (long long j = i + 1; j <= r; ++j) {
if ((i % 2019) * (j % 2019) < ans)
ans = (i % 2019) * (j % 2019);
}
}
cout << ans << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r;
cin >> l >> r;
if (r - l + 1 >= 2019) {
cout << 0 << endl;
} else {
long long ans = 2019;
for (long long i = l; i < r; ++i) {
for (long long j = i + 1; j <= r; ++j) {
if ((i % 2019) * (j % 2019) % 2019 < ans)
ans = (i % 2019) * (j % 2019) % 2019;
}
}
cout << ans << endl;
}
return 0;
} | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"assignment.change"
] | 790,598 | 790,599 | u604693716 | cpp |
p02983 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int l, r, n;
cin >> l, r;
n = r - l + 1;
if (n >= 2019) {
cout << 0 << endl;
return 0;
}
int A[2019];
A[0] = l % 2019;
for (int i = 1; i < n; i++) {
A[i] = A[i - 1] + 1;
}
int minv = 2020;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
minv = min(minv, A[i] * A[j] % 2019);
}
}
cout << minv << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int l, r, n;
cin >> l >> r;
n = r - l + 1;
if (n >= 2019) {
cout << 0 << endl;
return 0;
}
int A[2019];
A[0] = l % 2019;
for (int i = 1; i < n; i++) {
A[i] = A[i - 1] + 1;
}
int minv = 2020;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
minv = min(minv, A[i] * A[j] % 2019);
}
}
cout << minv << endl;
return 0;
} | [] | 790,604 | 790,605 | u806058793 | cpp |
p02983 | #include <algorithm> //min
#include <iostream>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int mod_min = 0;
R = min(R, L + 2020); // 2019周期でパターンが同じなので
for (int i = L; i < R; i++) {
for (int j = i + 1; j <= R; j++) {
int mod = ((i % 2019) * (j % 2019)) % 2019;
// cout << mod << "\n";
if (mod < mod_min) {
mod_min = mod;
}
}
}
cout << mod_min;
return 0;
} | #include <algorithm> //min
#include <iostream>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
//余りは最大でも2018
int mod_min = 2018;
//余りは2019周期でパターンが同じなのでRの範囲を縮める
R = min(R, L + 2019);
for (int i = L; i < R; i++) {
for (int j = i + 1; j <= R; j++) {
int mod = ((i % 2019) * (j % 2019)) % 2019;
// cout << mod << "\n";
if (mod < mod_min) {
mod_min = mod;
}
}
}
cout << mod_min;
return 0;
} | [
"literal.number.change",
"variable_declaration.value.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 790,619 | 790,620 | u725069695 | cpp |
p02983 | #include <algorithm> //min
#include <iostream>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int mod_min = 0;
R = min(R, L + 2020); // 2019周期でパターンが同じなので
for (int i = L; i < R; i++) {
for (int j = i + 1; j <= R; j++) {
int mod = ((i % 2019) * (j % 2019)) % 2019;
// cout << mod << "\n";
if (mod < mod_min) {
mod_min = mod;
}
}
}
cout << mod_min;
return 0;
} | #include <algorithm> //min
#include <iostream>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int mod_min = 2018; //余りはどんなに大きくても2018
R = min(R, L + 2020); // 2019周期でパターンが同じなので
for (int i = L; i < R; i++) {
for (int j = i + 1; j <= R; j++) {
int mod = ((i % 2019) * (j % 2019)) % 2019;
// cout << mod << "\n";
if (mod < mod_min) {
mod_min = mod;
}
}
}
cout << mod_min;
return 0;
} | [
"literal.number.change",
"variable_declaration.value.change"
] | 790,619 | 790,621 | u725069695 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r;
cin >> l >> r;
int mod = 2019;
if (r % mod == 0 || l % mod == 0 || r - l > mod) {
cout << 0 << endl;
return 0;
}
long long ans = mod;
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
ans = min(ans, 1LL * i * j * mod);
}
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long l, r;
cin >> l >> r;
int mod = 2019;
if (r % mod == 0 || l % mod == 0 || r - l > mod) {
cout << 0 << endl;
return 0;
}
long long ans = mod;
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
ans = min(ans, 1LL * i * j % mod);
}
}
cout << ans << endl;
return 0;
} | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 790,622 | 790,623 | u436741428 | cpp |
p02983 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int l, r, ans = 0, i, j, mod;
cin >> l >> r;
if (r - l > 672) {
ans = 0;
} else {
ans = 2019;
for (i = l + 1; i < r + 1; i++) {
for (j = 0; j < i; j++) {
mod = i * j % 2019;
if (ans > mod) {
ans = mod;
}
}
}
}
cout << ans << endl;
} | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
long long l, r, ans = 0, i, j, mod;
cin >> l >> r;
if (r - l > 1000) {
ans = 0;
} else {
ans = 2019;
for (i = l + 1; i < r + 1; i++) {
for (j = l; j < i; j++) {
mod = i * j % 2019;
if (ans > mod) {
ans = mod;
}
}
}
}
cout << ans << endl;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"literal.number.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.initializer.change"
] | 790,626 | 790,625 | u941705222 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r;
cin >> l >> r;
if (r - l >= 2018)
cout << "0" << endl;
else {
int m = INT_MAX;
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
int p = (l % 2019) * (r % 2019) % 2019;
if (p < m)
m = p;
}
}
cout << m << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int l, r;
cin >> l >> r;
if (r - l >= 2018)
cout << "0" << endl;
else {
int m = INT_MAX;
for (int i = l; i < r; i++) {
for (int j = i + 1; j <= r; j++) {
int p = (i % 2019) * (j % 2019) % 2019;
if (p < m)
m = p;
}
}
cout << m << endl;
}
} | [
"identifier.change",
"expression.operation.binary.change"
] | 790,630 | 790,631 | u200252727 | cpp |
p02983 | #include <iostream>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int m = 2019;
int LP = L % 2019, RP = R % 2019;
if (L / 2019 == R / 2019) {
cout << 0 << endl;
return 0;
}
for (int i = LP; i <= RP; ++i) {
for (int j = i + 1; j <= RP; ++j) {
m = min(m, i * j % 2019);
}
}
cout << m << endl;
}
| #include <iostream>
using namespace std;
int main() {
int L, R;
cin >> L >> R;
int m = 2019;
int LP = L % 2019, RP = R % 2019;
if (L / 2019 != R / 2019) {
cout << 0 << endl;
return 0;
}
for (int i = LP; i <= RP; ++i) {
for (int j = i + 1; j <= RP; ++j) {
m = min(m, i * j % 2019);
}
}
cout << m << endl;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 790,648 | 790,649 | u889423178 | cpp |
p02983 | #include <algorithm>
#include <iostream>
#define MOD 673
using namespace std;
typedef long long ll;
int main(void) {
ll l, r, ans = 0, i, j;
cin >> l >> r;
if (r - l < 2)
ans = ((r % 2019) * (l % 2019)) % 2019;
else if (r - l < 672) {
ans = 2019;
for (i = l; i < r; i++) {
for (j = i + 1; j <= r; j++)
ans = min(ans, ((i + 1) % 2019) * (i % 2019) % 2019);
}
}
cout << ans << "\n";
return 0;
} | #include <algorithm>
#include <iostream>
#define MOD 673
using namespace std;
typedef long long ll;
int main(void) {
ll l, r, ans = 0, i, j;
cin >> l >> r;
if (r - l < 2)
ans = ((r % 2019) * (l % 2019)) % 2019;
else if (r - l < 672) {
ans = 2019;
for (i = l; i < r; i++) {
for (j = i + 1; j <= r; j++)
ans = min(ans, (i % 2019) * (j % 2019) % 2019);
}
}
cout << ans << "\n";
return 0;
} | [
"call.arguments.change",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 790,659 | 790,660 | u583354994 | cpp |
p02983 | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = n - 1; i >= 0; i--)
#define REPS(i, n) for (int i = n; i > 0; i--)
#define INF (int)(1123456789)
#define LINF (long long int)(112345678901234567)
#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))
#define all(v) v.begin(), v.end()
int main(void) {
ll L, R, ans;
cin >> L >> R;
ans = 2019;
if (R - L >= 2018) {
ans = 0;
} else {
ll L1 = L % 2019;
ll R1 = R % 2019;
for (ll i = L1; i < L1 + R - L; i++) {
for (ll j = 1; j < R - L - i + 1; j++) {
if (ans > (i * (i + j)) % 2019) {
ans = (i * (i + j)) % 2019;
}
}
}
}
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = n - 1; i >= 0; i--)
#define REPS(i, n) for (int i = n; i > 0; i--)
#define INF (int)(1123456789)
#define LINF (long long int)(112345678901234567)
#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))
#define all(v) v.begin(), v.end()
int main(void) {
ll L, R, ans;
cin >> L >> R;
ans = 2019;
if (R - L >= 2018) {
ans = 0;
} else {
ll L1 = L % 2019;
ll R1 = R % 2019;
for (ll i = L1; i < L1 + R - L; i++) {
for (ll j = 1; j < L1 + R - L - i + 1; j++) {
if (ans > (i * (i + j)) % 2019) {
ans = (i * (i + j)) % 2019;
}
}
}
}
cout << ans << endl;
return 0;
}
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 790,661 | 790,662 | u127344197 | cpp |
p02983 | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = n - 1; i >= 0; i--)
#define REPS(i, n) for (int i = n; i > 0; i--)
#define INF (int)(1123456789)
#define LINF (long long int)(112345678901234567)
#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))
#define all(v) v.begin(), v.end()
int main(void) {
ll L, R, ans;
cin >> L >> R;
ans = 2019;
if (R - L >= 2018) {
ans = 0;
} else {
ll L1 = L % 2019;
ll R1 = R % 2019;
for (ll i = L1; i < L1 + R - L; i++) {
for (ll j = 1; j < R - L + 1; j++) {
if (ans > (i * (i + j)) % 2019) {
ans = (i * (i + j)) % 2019;
}
}
}
}
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = n - 1; i >= 0; i--)
#define REPS(i, n) for (int i = n; i > 0; i--)
#define INF (int)(1123456789)
#define LINF (long long int)(112345678901234567)
#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))
#define all(v) v.begin(), v.end()
int main(void) {
ll L, R, ans;
cin >> L >> R;
ans = 2019;
if (R - L >= 2018) {
ans = 0;
} else {
ll L1 = L % 2019;
ll R1 = R % 2019;
for (ll i = L1; i < L1 + R - L; i++) {
for (ll j = 1; j < L1 + R - L - i + 1; j++) {
if (ans > (i * (i + j)) % 2019) {
ans = (i * (i + j)) % 2019;
}
}
}
}
cout << ans << endl;
return 0;
}
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 790,663 | 790,662 | u127344197 | cpp |
p02983 | #include <bits/stdc++.h>
#include <numeric>
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG true
#define LL long long
#define MOD 1000000007
// cout << (c)?"Yay!":":(" << endl;
// sort(a.begin(), a.end(), std::greater<int>());
using namespace std;
int main() {
int l, r;
cin >> l >> r;
set<int> zigoku;
vector<long long> cand;
for (long long int i = l; i <= min(r, l + 3000); i++) {
cand.push_back(i % 2019);
}
rep(i, cand.size()) {
REP(j, i + 1, cand.size()) { zigoku.insert(cand[i] * cand[j]); }
}
cout << (*zigoku.begin() % 2019) << endl;
return 0;
}
| #include <bits/stdc++.h>
#include <numeric>
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG true
#define LL long long
#define MOD 1000000007
// cout << (c)?"Yay!":":(" << endl;
// sort(a.begin(), a.end(), std::greater<int>());
using namespace std;
int main() {
int l, r;
cin >> l >> r;
set<int> zigoku;
vector<long long> cand;
for (long long int i = l; i <= min(r, l + 3000); i++) {
cand.push_back(i % 2019);
}
rep(i, cand.size()) {
REP(j, i + 1, cand.size()) { zigoku.insert((cand[i] * cand[j]) % 2019); }
}
cout << (*zigoku.begin() % 2019) << endl;
return 0;
}
| [
"call.arguments.change",
"call.arguments.add"
] | 790,664 | 790,665 | u393086221 | cpp |
p02983 | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
long long l, r, ans = 2019, i, j;
cin >> l >> r;
if (r - l >= 2019) {
cout << 0 << endl;
} else {
for (i = l; i < r; i++) {
for (j = l + 1; j <= r; j++) {
ans = min(ans, ((l % 2019) * (r % 2019)) % 2019);
}
}
cout << ans << endl;
}
}
| #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
long long l, r, ans = 2019, i, j;
cin >> l >> r;
if (r - l >= 2019) {
cout << 0 << endl;
} else {
for (i = l; i < r; i++) {
for (j = l + 1; j <= r; j++) {
ans = min(ans, ((i % 2019) * (j % 2019)) % 2019);
}
}
cout << ans << endl;
}
}
| [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 790,673 | 790,674 | u401900157 | cpp |
p02983 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
// Your code here!
long long int l, r;
int ama = 2020000;
cin >> l >> r;
if (r - l >= 2019)
cout << 0 << endl;
else {
l = l % 2019;
r = r % 2019;
if (l < r) {
for (int i = l; i <= r - 1; i++) {
for (int j = i + 1; j <= r; j++) {
ama = min((i * j) % 2019, ama);
if (ama == 0)
break;
}
}
} else if (l > r) {
for (int i = r; i <= l - 1; i++) {
for (int j = i + 1; j <= l; j++) {
ama = min((i * j) % 2019, ama);
if (ama == 0)
break;
}
}
} else {
int i = l, j = r;
ama = min((i * j) % 2019, ama);
}
}
cout << ama << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
// Your code here!
long long int l, r;
int ama = 2020000;
cin >> l >> r;
if (r - l >= 2019)
cout << 0 << endl;
else {
l = l % 2019;
r = r % 2019;
if (l < r) {
for (int i = l; i <= r - 1; i++) {
for (int j = i + 1; j <= r; j++) {
ama = min((i * j) % 2019, ama);
if (ama == 0)
break;
}
}
} else if (l > r) {
for (int i = r; i <= l - 1; i++) {
for (int j = i + 1; j <= l; j++) {
ama = min((i * j) % 2019, ama);
if (ama == 0)
break;
}
}
} else {
int i = l, j = r;
ama = min((i * j) % 2019, ama);
}
cout << ama << endl;
}
}
| [] | 790,675 | 790,676 | u098700286 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.