Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
9 values
p02983
#include <bits/stdc++.h> using namespace std; void solve() { int n = 2019; int x, y; cin >> x >> y; if (y - x >= n - 1) { cout << 0; return; } int res = 2018; for (int i = x; i <= y; i++) { for (int j = x + 1; j <= y; j++) { int u = i % n, v = j % n; int tmp = u * v % n; res = min(res, tmp); } } cout << res; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); solve(); cout << endl; }
#include <bits/stdc++.h> using namespace std; void solve() { int n = 2019; int x, y; cin >> x >> y; if (y - x >= n - 1) { cout << 0; return; } int res = 2018; for (int i = x; i <= y; i++) { for (int j = i + 1; j <= y; j++) { int u = i % n, v = j % n; int tmp = u * v % n; res = min(res, tmp); } } cout << res; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); solve(); cout << endl; }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,304
791,305
u031986221
cpp
p02983
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> #define mp make_pair #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(c) c.begin(), c.end() #define pb push_back #define fi first #define se second #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define mod 2019 using namespace std; ll l, r; ll ans1, ans2; ll ans3, ans4; int main() { cin >> l >> r; ans1 = l % mod; ans2 = r % mod; if (r - l <= mod - ans1) return cout << 0 << endl, 0; if (ans1 > ans2) ans2 += mod; ll ans = (ll)1e9 + 7; for (int i = ans1; i <= ans2; i++) for (int j = i + 1; j <= ans2; j++) ans = min(ans, (ll)i * j % mod); cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> #define mp make_pair #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(c) c.begin(), c.end() #define pb push_back #define fi first #define se second #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define mod 2019 using namespace std; ll l, r; ll ans1, ans2; ll ans3, ans4; int main() { cin >> l >> r; ans1 = l % mod; ans2 = r % mod; if (r - l >= mod - ans1) return cout << 0 << endl, 0; if (ans1 > ans2) ans2 += mod; ll ans = (ll)1e9 + 7; for (int i = ans1; i <= ans2; i++) for (int j = i + 1; j <= ans2; j++) ans = min(ans, (ll)i * j % mod); cout << ans << endl; return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,306
791,307
u824132304
cpp
p02983
#include <bits/stdc++.h> #include <cmath> #include <stdlib.h> using namespace std; int main() { long int L, R; cin >> L >> R; long int ans = 2019; long int l = (L - 1) / 2019, r = R / 2019; if (r > l) ans = 0; else { long int Lm = L % 2019, Rm = R % 2019; for (int i = Lm; i < Rm; i++) { for (int j = i + 1; j <= Rm; j++) { if (i * j % 2019 < ans) ans = i * j; } } } cout << ans << endl; }
#include <bits/stdc++.h> #include <cmath> #include <stdlib.h> using namespace std; int main() { long long L, R; cin >> L >> R; long long ans = 2019; long long l = (L - 1) / 2019, r = R / 2019; if (r > l) ans = 0; else { long long Lm = L % 2019, Rm = R % 2019; for (int i = Lm; i < Rm; i++) { for (int j = i + 1; j <= Rm; j++) { if (i * j % 2019 < ans) ans = i * j % 2019; } } } cout << ans << endl; }
[ "variable_declaration.type.primitive.change", "assignment.change" ]
791,310
791,311
u951952491
cpp
p02983
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define ll long long #define pii pair<int, int> #define mp make_pair #define fi first #define se second #define inf 0x7fffffff using namespace std; int main() { int i, j, k, n, m; ll x, y; cin >> x >> y; if (y - x > 3000) { printf("0"); return 0; } ll ans = 2020; for (i = x; i <= y; i++) { for (j = i + 1; j <= y; j++) { ans = min(ans, 1ll * (i % 2019ll) * (j % 2019ll)); } } printf("%d", ans); }
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define ll long long #define pii pair<int, int> #define mp make_pair #define fi first #define se second #define inf 0x7fffffff using namespace std; int main() { int i, j, k, n, m; ll x, y; cin >> x >> y; if (y - x > 3000) { printf("0"); return 0; } ll ans = 2020; for (i = x; i <= y; i++) { for (j = i + 1; j <= y; j++) { ans = min(ans, 1ll * (i % 2019ll) * (j % 2019ll) % 2019ll); } } printf("%d", ans); }
[ "assignment.change" ]
791,316
791,317
u742987397
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main() { long long L, R; cin >> L >> R; map<long long, long long> mp; for (long long i = L; i <= min(L + 4038, R); i++) { mp[i % 2019]++; } long long x = 2019; for (auto p : mp) { if (p.second == 2) { x = min(x, p.first * p.first); } } for (auto p : mp) { for (auto q : mp) { if (p.first != q.first) x = min(p.first * q.first, x); } } cout << x << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long L, R; cin >> L >> R; map<long long, long long> mp; for (long long i = L; i <= min(L + 4038, R); i++) { mp[i % 2019]++; } long long x = 2019; for (auto p : mp) { if (p.second == 2) { x = min(x, p.first * p.first % 2019); } } for (auto p : mp) { for (auto q : mp) { if (p.first != q.first) x = min(p.first * q.first % 2019, x); } } cout << x << endl; }
[ "assignment.change" ]
791,318
791,319
u546943614
cpp
p02983
/* 8b d8 888888888888 88b d88 ad88888ba Y8, ,8P 88 ,d 888b d888 d8" "8b Y8, ,8P 88 88 88`8b d8'88 "" a8P "8aa8" ,adPPYba, 88 88 88 8b,dPPYba, 88 88 ,adPPYba, MM88MMM 88 `8b d8' 88 ,adPPYba, ,a8P" `88' a8" "8a 88 88 88 88P' "Y8 88 88 I8[ "" 88 88 `8b d8' 88 a8P_____88 d8" 88 8b d8 88 88 88 88 88 88 `"Y8ba, 88 88 `8b d8' 88 8PP""""""" "" 88 "8a, ,a8" "8a, ,a88 88 88 "8a, ,a88 aa ]8I 88, 88 `888' 88 "8b, ,aa aa 88 `"YbbdP"' `"YbbdP'Y8 88 88 `"YbbdP'Y8 `"YbbdP"' "Y888 88 `8' 88 `"Ybbd8"' 88 */ #include <bits/stdc++.h> using namespace std; long long l, r; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); cin >> l >> r; if ((r - l >= 2019) || ((l % 2019) > (r % 2019))) cout << 0 << '\n'; else { l %= 2019; r %= 2019; long long ans = 1e18; for (long long i = l; i <= r; i++) { for (long long j = i + 1; j <= r; j++) { ans = min(ans, i * j); } } cout << ans << '\n'; } return 0; }
/* 8b d8 888888888888 88b d88 ad88888ba Y8, ,8P 88 ,d 888b d888 d8" "8b Y8, ,8P 88 88 88`8b d8'88 "" a8P "8aa8" ,adPPYba, 88 88 88 8b,dPPYba, 88 88 ,adPPYba, MM88MMM 88 `8b d8' 88 ,adPPYba, ,a8P" `88' a8" "8a 88 88 88 88P' "Y8 88 88 I8[ "" 88 88 `8b d8' 88 a8P_____88 d8" 88 8b d8 88 88 88 88 88 88 `"Y8ba, 88 88 `8b d8' 88 8PP""""""" "" 88 "8a, ,a8" "8a, ,a88 88 88 "8a, ,a88 aa ]8I 88, 88 `888' 88 "8b, ,aa aa 88 `"YbbdP"' `"YbbdP'Y8 88 88 `"YbbdP'Y8 `"YbbdP"' "Y888 88 `8' 88 `"Ybbd8"' 88 */ #include <bits/stdc++.h> using namespace std; long long l, r; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); cin >> l >> r; if ((r - l >= 2019) || ((l % 2019) > (r % 2019))) cout << 0 << '\n'; else { l %= 2019; r %= 2019; long long ans = 1e18; for (long long i = l; i <= r; i++) { for (long long j = i + 1; j <= r; j++) { ans = min(ans, (i * j) % 2019); } } cout << ans << '\n'; } return 0; }
[ "call.arguments.change", "call.arguments.add" ]
791,320
791,321
u267710757
cpp
p02983
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> //#include <boost/lexical_cast.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> using namespace std; using namespace __gnu_pbds; #define int long long #define pb push_back #define mp make_pair #define endl '\n' #define PI acos(-1) #define bitcount(a) __builtin_popcountll(a) #define P pair<int, int> typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; long mod = 1e9 + 7; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int l, r; cin >> l >> r; int ans = ((l % 2019) * ((l + 1) % 2019)) % 2019; for (int i = l; i <= r && i <= 2200; i++) { int temp; for (int j = i + 1; j <= i + 1 + 2200 && j <= r; j++) { temp = ((i % 2019) * (j % 2019)) % 2019; ans = min(ans, temp); } } cout << ans; return 0; }
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> //#include <boost/lexical_cast.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> using namespace std; using namespace __gnu_pbds; #define int long long #define pb push_back #define mp make_pair #define endl '\n' #define PI acos(-1) #define bitcount(a) __builtin_popcountll(a) #define P pair<int, int> typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; long mod = 1e9 + 7; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int l, r; cin >> l >> r; int ans = ((l % 2019) * ((l + 1) % 2019)) % 2019; for (int i = l; i <= r && i <= l + 2200; i++) { int temp; for (int j = i + 1; j <= i + 1 + 2200 && j <= r; j++) { temp = ((i % 2019) * (j % 2019)) % 2019; ans = min(ans, temp); } } cout << ans; return 0; }
[ "control_flow.loop.for.condition.change" ]
791,322
791,323
u258323901
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define LL long long #define FOR(INDEX, START, END) for (LL INDEX = (START); INDEX < (END); ++INDEX) #define REP(INDEX, COUNT) for (LL INDEX = 0; INDEX < (COUNT); ++INDEX) int main() { LL L, R; cin >> L >> R; LL ans = -1; FOR(i, L, min<>(L + 2020, R)) { LL m = i % 2019; FOR(j, i + 1, min<>(i + 1 + 2020, R + 1)) { LL n = j % 2019; LL v = m * n; if (ans == -1) { ans = v; } else { ans = min<>(ans, v); } } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define LL long long #define FOR(INDEX, START, END) for (LL INDEX = (START); INDEX < (END); ++INDEX) #define REP(INDEX, COUNT) for (LL INDEX = 0; INDEX < (COUNT); ++INDEX) int main() { LL L, R; cin >> L >> R; LL ans = -1; FOR(i, L, min<>(L + 2020, R)) { LL m = i % 2019; FOR(j, i + 1, min<>(i + 1 + 2020, R + 1)) { LL n = j % 2019; LL v = (m * n) % 2019; if (ans == -1) { ans = v; } else { ans = min<>(ans, v); } } } cout << ans << endl; return 0; }
[ "assignment.change" ]
791,328
791,329
u658243311
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main() { long long L, R; cin >> L; cin >> R; long A; A = 2019; for (long i = L; i < min(L + 2019, R); i++) { for (long j = L + 1; j < min(L + 2020, R); j++) { if (i != j) { A = min(A, i % 2019 * j % 2019); } } } cout << A; }
#include <bits/stdc++.h> using namespace std; int main() { long long L, R; cin >> L; cin >> R; long A; A = 2019; for (long i = L; i < min(L + 2019, R); i++) { for (long j = L + 1; j < min(L + 2020, R + 1); j++) { if (i != j) { A = min(A, i % 2019 * j % 2019); } } } cout << A; }
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
791,336
791,337
u628597699
cpp
p02983
#include <bits/stdc++.h> using namespace std; inline void prep() { cin.tie(0); cin.sync_with_stdio(0); }; // printf("%.12lf\n",mid); // __builtin_popcount(int) count 1's in binary // get decimal pert of number /* double intpart; double thiss = modf((double)(n*m)/(double)k, &intpart); */ // round = (int)(num+.5) int mod = 1000000007; long long mymod(long long num) { if (num < 0 && !(abs(num) % mod == 0)) { if (mod == 1) { return 0; } return mod - abs(num) % mod; } else { return num % mod; } } double eps = .000000001; // fill w/ doubles fill_n(valss, 51, 20000000000LL); int main() { prep(); long long l, r; cin >> l >> r; int minl = 1000000; int bar = min(l + 2019, r); for (long long i = l; i < bar; i++) { for (long long j = i + 1; j < bar; j++) { int res = (i * j) % 2019; minl = min(minl, res); } } cout << minl; return 0; } // in dp problems think: up until here, intervals, or "what if there's 1, // 2, 3..." in math problems write out equations also in math problems to change // multiplication/division to addition/subtraction use logs, add/subtract // something to make the multiplication easier (like if it's 3*f(x)+2, change it // to 3*(f(x)+1)-1) if checked the logic check for bugs (like sorting wrong way // or not putting a break in a loop) if n is 10^7 try brute force if the // operations are simple if can't do dp do brute force/greedy to save time don't // copy maps/vectors into variables if it already exists if wrong on decimal // problem, check if program rounds or if you can round to a certain amt of // decimals if decimals too, if can subtract instead of divide in recursion // looking math problems look at things from the point of view of both sides // (the start and the end sections of the recursion) think about how many // possible answers there are to the problem try to set the answer to the // problem and see if it's possible (like w/ binary search) if it makes it // easier use +1 indexing think twice when writing things down that you're going // to use later for conversions think if you can compute them w/ only one // conversion if the problem involves two things moving at the same time, see if // you can generalise it to just one thing moving (590/B) (1117/C) if nt think // primes see if you can do a pattern of steps to achieve something (1148/C) // (1119/C) if sub-interval requirements, try to reduce problem into prefix // array problem (pairwise numbers) (1174/D) think from the end of the problem // (if this is the result, what is an attribute of it?) if repeating action, if // good for debugging use function read problems twice, think about problem, // even if have solution keep thinking about a more optimal one for uva see // constraints, check if have to use getline (there's spaces in input) if // permutations, see if you can just iterate over numbers (like if it's a perm // of 10 numbers) for geom check if it could be on inside/outside if // intersections stop just assuming things (like on the problem where you just // thought that there couldn't be 3 2's because 3 is odd) obviously, check // problems solved by users occasionally to see if you should switch problems if // # of sols are small precalculate if question is asking to find an optimal // place, don't focus on finding the place, use what other things they give you // to precalculate it (593/B) (Uva rat attack) if a constraint looks purposely // small try to use it if can, change vector<bool> to bitset if brute force, try // meet in middle if using dfs and using visited, after visit node, mark as not // visited and keep vis global if it's one of those creative problems, try to // make the most/least possible, try to use very small example to prove things // what are we forced to do because of the problem's constraints? (like if it's // graph and 1s time lim, is probably only 1 traverse of dfs and not n) if // greedy, look at an observation like "they have to be as far out as they can" // or "it's optimal to always put them here" for example if you think about // binary search, don't just drop the idea quickly if it's a minutes/seconds // question, convert everything to seconds try to avoid decimals for bisection // don't use a last good variable if it's one of those problems where there's a // lot of cases, go through the code again and see if there's a scenario you // didn't think of if trying to maximize something, before categorizing/matching // positives/negatives or evens/odds try only sorting when trying to find bugs, // don't try input, look at code try not to categorize things (ex: if it's in // front of this, it's this, and if it's in back of this, it's that) for // simulation problems, to make it easier, see if you can use set to see if // something's there if interval prob, also think about brute forcing intervals // instead of prefix array avoid division at all costs max 2d sum => n^3 = // iterate through columns + greedy if trying to find optimal way to move // something, try looking at things you aren't moving initializing list is // linear brute force subsequence => queue if dp + order doesn't matter + limit // on different kinds, put the different kinds in separate bins if dp, work // through recursive and check for logic flaws and places where something could // surpass array size for ceil, be careful if you think it's an int but it has a // little decimal left write neater, don't do long lines with "coin change" dp // try to avoid ind (it creates more edge cases). plus, don't assume you have an // infinite amt of everything try reaching the end goal and then check the // requirement (last resort) (like if it says to do # of things at a time to // reach the goal) (AtcoderBC E) for graph problems write it out a lot to find // better solutions for math ones, try writing simpler formulas esp. in // combinatorics unsorted doesn't mean it's decreasing smh be slow, write things // down, read statement twice & look at examples before thinking in graph // problems, see if it mentions that there can be 2 edges betw to verts or not, // or if it's disconnected use fabs and eps when using bitset be aware it goes // backwards for bipartite, for each area mark all as vis, try starting from 2 // nodes, mark nodes as vis before start for uva read output requirements twice // use log2(double) // if doing intervals and using list before, go straight to recursive (1189 C)
#include <bits/stdc++.h> using namespace std; inline void prep() { cin.tie(0); cin.sync_with_stdio(0); }; // printf("%.12lf\n",mid); // __builtin_popcount(int) count 1's in binary // get decimal pert of number /* double intpart; double thiss = modf((double)(n*m)/(double)k, &intpart); */ // round = (int)(num+.5) int mod = 1000000007; long long mymod(long long num) { if (num < 0 && !(abs(num) % mod == 0)) { if (mod == 1) { return 0; } return mod - abs(num) % mod; } else { return num % mod; } } double eps = .000000001; // fill w/ doubles fill_n(valss, 51, 20000000000LL); int main() { prep(); long long l, r; cin >> l >> r; int minl = 1000000; int bar = min(l + 2019, r); for (long long i = l; i <= bar; i++) { for (long long j = i + 1; j <= bar; j++) { int res = (i * j) % 2019; minl = min(minl, res); } } cout << minl; return 0; } // in dp problems think: up until here, intervals, or "what if there's 1, // 2, 3..." in math problems write out equations also in math problems to change // multiplication/division to addition/subtraction use logs, add/subtract // something to make the multiplication easier (like if it's 3*f(x)+2, change it // to 3*(f(x)+1)-1) if checked the logic check for bugs (like sorting wrong way // or not putting a break in a loop) if n is 10^7 try brute force if the // operations are simple if can't do dp do brute force/greedy to save time don't // copy maps/vectors into variables if it already exists if wrong on decimal // problem, check if program rounds or if you can round to a certain amt of // decimals if decimals too, if can subtract instead of divide in recursion // looking math problems look at things from the point of view of both sides // (the start and the end sections of the recursion) think about how many // possible answers there are to the problem try to set the answer to the // problem and see if it's possible (like w/ binary search) if it makes it // easier use +1 indexing think twice when writing things down that you're going // to use later for conversions think if you can compute them w/ only one // conversion if the problem involves two things moving at the same time, see if // you can generalise it to just one thing moving (590/B) (1117/C) if nt think // primes see if you can do a pattern of steps to achieve something (1148/C) // (1119/C) if sub-interval requirements, try to reduce problem into prefix // array problem (pairwise numbers) (1174/D) think from the end of the problem // (if this is the result, what is an attribute of it?) if repeating action, if // good for debugging use function read problems twice, think about problem, // even if have solution keep thinking about a more optimal one for uva see // constraints, check if have to use getline (there's spaces in input) if // permutations, see if you can just iterate over numbers (like if it's a perm // of 10 numbers) for geom check if it could be on inside/outside if // intersections stop just assuming things (like on the problem where you just // thought that there couldn't be 3 2's because 3 is odd) obviously, check // problems solved by users occasionally to see if you should switch problems if // # of sols are small precalculate if question is asking to find an optimal // place, don't focus on finding the place, use what other things they give you // to precalculate it (593/B) (Uva rat attack) if a constraint looks purposely // small try to use it if can, change vector<bool> to bitset if brute force, try // meet in middle if using dfs and using visited, after visit node, mark as not // visited and keep vis global if it's one of those creative problems, try to // make the most/least possible, try to use very small example to prove things // what are we forced to do because of the problem's constraints? (like if it's // graph and 1s time lim, is probably only 1 traverse of dfs and not n) if // greedy, look at an observation like "they have to be as far out as they can" // or "it's optimal to always put them here" for example if you think about // binary search, don't just drop the idea quickly if it's a minutes/seconds // question, convert everything to seconds try to avoid decimals for bisection // don't use a last good variable if it's one of those problems where there's a // lot of cases, go through the code again and see if there's a scenario you // didn't think of if trying to maximize something, before categorizing/matching // positives/negatives or evens/odds try only sorting when trying to find bugs, // don't try input, look at code try not to categorize things (ex: if it's in // front of this, it's this, and if it's in back of this, it's that) for // simulation problems, to make it easier, see if you can use set to see if // something's there if interval prob, also think about brute forcing intervals // instead of prefix array avoid division at all costs max 2d sum => n^3 = // iterate through columns + greedy if trying to find optimal way to move // something, try looking at things you aren't moving initializing list is // linear brute force subsequence => queue if dp + order doesn't matter + limit // on different kinds, put the different kinds in separate bins if dp, work // through recursive and check for logic flaws and places where something could // surpass array size for ceil, be careful if you think it's an int but it has a // little decimal left write neater, don't do long lines with "coin change" dp // try to avoid ind (it creates more edge cases). plus, don't assume you have an // infinite amt of everything try reaching the end goal and then check the // requirement (last resort) (like if it says to do # of things at a time to // reach the goal) (AtcoderBC E) for graph problems write it out a lot to find // better solutions for math ones, try writing simpler formulas esp. in // combinatorics unsorted doesn't mean it's decreasing smh be slow, write things // down, read statement twice & look at examples before thinking in graph // problems, see if it mentions that there can be 2 edges betw to verts or not, // or if it's disconnected use fabs and eps when using bitset be aware it goes // backwards for bipartite, for each area mark all as vis, try starting from 2 // nodes, mark nodes as vis before start for uva read output requirements twice // use log2(double) // if doing intervals and using list before, go straight to recursive (1189 C)
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
791,338
791,339
u381394404
cpp
p02983
// Written By NewbieChd #include <algorithm> #include <cctype> #include <cstdio> using namespace std; const int BUF = 1000000; char buf[BUF], *p1, *p2; inline char getChar() { return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, BUF, stdin), p1 == p2) ? EOF : *p1++; } inline int read() { register int f = 0; char c; while (!isdigit(c = getChar())) { } do f = f * 10 + (c ^ 48); while (isdigit(c = getChar())); return f; } const int maxN = 5003, yyb = 2019; int main() { int L = read(), R = read(), i, j; if (R - L + 1 >= yyb) { printf("0\n"); return 0; } int ans = 1e9; L %= yyb, R %= yyb; if (L < R) { for (i = L; i < R; ++i) for (j = i + 1; j <= R; ++j) ans = min(ans, i * j); printf("%d\n", ans); } else printf("0\n"); return 0; }
// Written By NewbieChd #include <algorithm> #include <cctype> #include <cstdio> using namespace std; const int BUF = 1000000; char buf[BUF], *p1, *p2; inline char getChar() { return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, BUF, stdin), p1 == p2) ? EOF : *p1++; } inline int read() { register int f = 0; char c; while (!isdigit(c = getChar())) { } do f = f * 10 + (c ^ 48); while (isdigit(c = getChar())); return f; } const int maxN = 5003, yyb = 2019; int main() { int L = read(), R = read(), i, j; if (R - L + 1 >= yyb) { printf("0\n"); return 0; } int ans = 1e9; L %= yyb, R %= yyb; if (L < R) { for (i = L; i < R; ++i) for (j = i + 1; j <= R; ++j) ans = min(ans, i * j % yyb); printf("%d\n", ans); } else printf("0\n"); return 0; }
[ "assignment.change" ]
791,340
791,341
u305668100
cpp
p02983
#include <iostream> #include <vector> using namespace std; typedef long long ll; const ll MOD = 2019; int main() { cin.tie(0); ios::sync_with_stdio(false); ll L, R; cin >> L >> R; vector<ll> num; for (ll i = L; i <= min(L + 5000, R); i++) { num.push_back(i % MOD); } ll ans = 2019; for (int i = 0; i < num.size(); i++) { for (int j = 1; j < num.size(); j++) { ans = min(ans, (num[i] * num[j]) % MOD); } } cout << ans << endl; return 0; }
#include <iostream> #include <vector> using namespace std; typedef long long ll; const ll MOD = 2019; int main() { cin.tie(0); ios::sync_with_stdio(false); ll L, R; cin >> L >> R; vector<ll> num; for (ll i = L; i <= min(L + 5000, R); i++) { num.push_back(i % MOD); } ll ans = 2019; for (int i = 0; i < num.size(); i++) { for (int j = i + 1; j < num.size(); j++) { ans = min(ans, (num[i] * num[j]) % MOD); } } cout << ans << endl; return 0; }
[ "control_flow.loop.for.initializer.change" ]
791,358
791,359
u134519179
cpp
p02983
#include <bits/stdc++.h> using namespace std; using ll = long long; using db = double; #define fi first #define se second #define pb push_back #define all(v) (v).begin(), (v).end() #define siz(v) (ll)(v).size() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define repn(i, n) for (ll i = 0; i <= (ll)(n); i++) typedef pair<int, int> P; typedef pair<ll, ll> PL; const ll mod = 1000000007; const ll INF = 1000000099; // cin.tie(0); // ios::sync_with_stdio(false); signed main() { ll l, r, ans = 2020; cin >> l >> r; if (r - l >= 2018) { cout << 0 << endl; } else { for (int i = l; i < r; i++) { for (int j = i + 1; j <= r; j++) { if (ans > (i % 2019) * (j % 2019)) ans = (i % 2019) * (j % 2019); } } cout << ans << endl; } }
#include <bits/stdc++.h> using namespace std; using ll = long long; using db = double; #define fi first #define se second #define pb push_back #define all(v) (v).begin(), (v).end() #define siz(v) (ll)(v).size() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define repn(i, n) for (ll i = 0; i <= (ll)(n); i++) typedef pair<int, int> P; typedef pair<ll, ll> PL; const ll mod = 1000000007; const ll INF = 1000000099; // cin.tie(0); // ios::sync_with_stdio(false); signed main() { ll l, r, ans = 2020; cin >> l >> r; if (r - l >= 2018) { cout << 0 << endl; } else { for (int i = l; i < r; i++) { for (int j = i + 1; j <= r; j++) { if (ans > (i % 2019) * (j % 2019) % 2019) ans = (i % 2019) * (j % 2019) % 2019; } } cout << ans << endl; } }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "assignment.change" ]
791,363
791,364
u317711717
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define endl "\n" typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; int ans = 2018; if (r - l + 1 <= 2019) { for (int i = l; i <= r; i++) { for (int j = i + 1; j <= r; j++) { ans = min(ans, ((i % 2019) * (j % 2019))); } } cout << ans << endl; } else { cout << 0 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; #define endl "\n" typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; int ans = 2018; if (r - l + 1 <= 2019) { 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; } else { cout << 0 << endl; } return 0; }
[ "call.arguments.change" ]
791,379
791,380
u155344619
cpp
p02983
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<vector<int>> vvi; template <class T> int dx[4] = {1, -1, 0, 0}; int dy[4] = {0, 0, 1, -1}; ll gcd(ll a, ll b) { if (a % b == 0) return (b); else return (gcd(b, a % b)); } ll lcm(ll a, ll b) { return a * b / gcd(a, b); } vector<int> bfs(vvi L, int S) { // List,Start vector<int> v(L.size(), -1); v[S] = 0; queue<int> q; q.push(S); while (!q.empty()) { int a = q.front(); q.pop(); for (int x : L[a]) { if (v[x] == -1) { v[x] = v[a] + 1; q.push(x); } } } return v; } void initialize() { cin.tie(nullptr); ios_base::sync_with_stdio(false); // cout << fixed << setprecision(15); } ///////////////////////////////////////// int main() { initialize(); int L, R; cin >> L >> R; if (R - L >= 2019) { cout << "0" << endl; return 0; } if (R / 2019 - L / 2019 > 0) { cout << "0" << endl; return 0; } R = R % 2019; L = L % 2019; if (R - L < 0) { cout << "0" << endl; return 0; } int ans = 2018; for (int i = L; i < R; i++) for (int j = i + 1; j <= L; j++) { ans = min(ans, i * j % 2019); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<vector<int>> vvi; template <class T> int dx[4] = {1, -1, 0, 0}; int dy[4] = {0, 0, 1, -1}; ll gcd(ll a, ll b) { if (a % b == 0) return (b); else return (gcd(b, a % b)); } ll lcm(ll a, ll b) { return a * b / gcd(a, b); } vector<int> bfs(vvi L, int S) { // List,Start vector<int> v(L.size(), -1); v[S] = 0; queue<int> q; q.push(S); while (!q.empty()) { int a = q.front(); q.pop(); for (int x : L[a]) { if (v[x] == -1) { v[x] = v[a] + 1; q.push(x); } } } return v; } void initialize() { cin.tie(nullptr); ios_base::sync_with_stdio(false); // cout << fixed << setprecision(15); } ///////////////////////////////////////// int main() { initialize(); int L, R; cin >> L >> R; if (R - L >= 2019) { cout << "0" << endl; return 0; } if (R / 2019 - L / 2019 > 0) { cout << "0" << endl; return 0; } R = R % 2019; L = L % 2019; if (R - L < 0) { cout << "0" << endl; return 0; } int ans = 2018; 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; }
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "call.arguments.change" ]
791,381
791,382
u944316525
cpp
p02983
#include <iostream> #include <math.h> using namespace std; int main() { int l, r, ans = 999999999; cin >> l >> r; for (int i = l; i <= r && i <= i + 2500; i++) for (int j = i + 1; j <= r && j <= j + 2500; j++) ans = min(ans, (i % 2019) * (j % 2019)); cout << ans << endl; }
#include <iostream> #include <math.h> using namespace std; int main() { int l, r, ans = 999999999; cin >> l >> r; for (int i = l; i <= r && i <= l + 2500; i++) for (int j = i + 1; j <= r && j <= l + 2500; j++) ans = min(ans, ((i % 2019) * (j % 2019) % 2019)); cout << ans << endl; }
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "call.arguments.change" ]
791,387
791,386
u230078189
cpp
p02983
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <set> #include <string.h> #include <string> #include <vector> using namespace std; int main() { long long int L, R, kake, ans = 2222; cin >> L >> R; for (int i = L; i <= R; i++) { for (int j = L + 1; j <= R; j++) { kake = i * j; if (kake % 2019 < ans) { ans = kake % 2019; } if (ans == 0) break; } if (ans == 0) break; } cout << ans; }
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <set> #include <string.h> #include <string> #include <vector> using namespace std; int main() { long long int L, R, kake, ans = 2222; cin >> L >> R; for (long long int i = L; i <= R; i++) { for (long long int j = i + 1; j <= R; j++) { kake = i * j; if (kake % 2019 < ans) { ans = kake % 2019; } if (ans == 0) break; } if (ans == 0) break; } cout << ans; }
[ "control_flow.loop.for.initializer.change", "identifier.change", "expression.operation.binary.change" ]
791,390
791,391
u444349080
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main() { int L, R; cin >> L >> R; int m = ((L % 2019) * (R % 2019)) % 2019; for (int i = L; i < min(L + 2019, R); i++) { int l = i % 2019; for (int j = i + 1; j < min(i + 2019, R + 1); j++) { int r = j % 2019; m = min(m, l * r); } } cout << m << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R; cin >> L >> R; int m = ((L % 2019) * (R % 2019)) % 2019; for (int i = L; i < min(L + 2019, R); i++) { int l = i % 2019; for (int j = i + 1; j < min(i + 2019, R + 1); j++) { int r = j % 2019; m = min(m, (l * r) % 2019); } } cout << m << endl; }
[ "call.arguments.change", "call.arguments.add" ]
791,392
791,393
u157677852
cpp
p02983
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <queue> #include <stdio.h> #include <string> #include <vector> using namespace std; #define rep(i, x) for (int i = 0; i < x; i++) #define SORT(x) sort(x.begin(), x.end()) #define FIND(x, target) find(x.begin(), x.end(), target) #define pb(x) push_back(x) #define int long long #define NUM 1000000007 struct _chunk { int name; int nextNum; vector<int> next; }; int factorial(int num1, int num2) { int sum = 1; for (int i = num1 + 1; i <= num1 + num2; ++i) { sum *= i; } for (int i = num2; i >= 1; --i) { sum /= i; } return sum; } signed main(void) { int L, R; cin >> L >> R; int l = L % 2019; int r = R % 2019; // there's 2019*k if (R - L + 1 >= 2019) { cout << 0 << endl; } else if (l >= r) { cout << 0 << endl; } else { int min = 2018; for (int i = l; i <= r; i++) { for (int j = l + 1; j <= r; j++) { int tmp = i * j % 2019; if (tmp < min) { min = tmp; } } } cout << min << endl; } return 0; }
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <queue> #include <stdio.h> #include <string> #include <vector> using namespace std; #define rep(i, x) for (int i = 0; i < x; i++) #define SORT(x) sort(x.begin(), x.end()) #define FIND(x, target) find(x.begin(), x.end(), target) #define pb(x) push_back(x) #define int long long #define NUM 1000000007 struct _chunk { int name; int nextNum; vector<int> next; }; int factorial(int num1, int num2) { int sum = 1; for (int i = num1 + 1; i <= num1 + num2; ++i) { sum *= i; } for (int i = num2; i >= 1; --i) { sum /= i; } return sum; } signed main(void) { int L, R; cin >> L >> R; int l = L % 2019; int r = R % 2019; // there's 2019*k if (R - L + 1 >= 2019) { cout << 0 << endl; } else if (l >= r) { cout << 0 << endl; } else { int min = 2018; for (int i = l; i < r; i++) { for (int j = i + 1; j <= r; j++) { int tmp = (i * j) % 2019; if (tmp < min) { min = tmp; } } } cout << min << endl; } return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,396
791,397
u785975381
cpp
p02983
#define _USE_MATH_DEFINES #include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; #define MOD 1000000007 #define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++) #define REP(i, n) rep(i, 0, n) #define FOR(i, c) \ for (decltype((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define ll long long #define ull unsigned long long #define all(hoge) (hoge).begin(), (hoge).end() typedef pair<ll, ll> P; const long long INF = 1LL << 60; typedef vector<ll> Array; typedef vector<Array> Matrix; // priority_queue<ll> max;//大きい順 // priority_queue<ll, Array, greater<ll>> min;//小さい順 /*firstについては昇順 secondについては降順 sort(all(wh), [&](P x, P y) { if (x.first == y.first)return x.second > y.second; return x.first < y.first; }); */ template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } // substr 文字列取り出し // upper_bound // ある値より大きい一番左のイテレータを返す、lowerは以上(setに対して使うとO(N)なので、setのメンバ関数を使う // stoi struct Edge { //グラフ ll to, cap, rev; Edge(ll _to, ll _cap, ll _rev) { to = _to; cap = _cap; rev = _rev; } }; typedef vector<Edge> Edges; typedef vector<Edges> Graph; void add_edge(Graph &G, ll from, ll to, ll cap, bool revFlag, ll revCap) { //最大フロー求める Ford-fulkerson G[from].push_back(Edge(to, cap, (ll)G[to].size())); if (revFlag) G[to].push_back(Edge( from, revCap, (ll)G[from].size() - 1)); //最小カットの場合逆辺は0にする } ll max_flow_dfs(Graph &G, ll v, ll t, ll f, vector<bool> &used) { if (v == t) return f; used[v] = true; for (int i = 0; i < G[v].size(); ++i) { Edge &e = G[v][i]; if (!used[e.to] && e.cap > 0) { ll d = max_flow_dfs(G, e.to, t, min(f, e.cap), used); if (d > 0) { e.cap -= d; G[e.to][e.rev].cap += d; return d; } } } return 0; } //二分グラフの最大マッチングを求めたりも出来る また二部グラフの最大独立集合は頂点数-最大マッチングのサイズ ll max_flow(Graph &G, ll s, ll t) // O(V(V+E)) { ll flow = 0; for (;;) { vector<bool> used(G.size()); REP(i, used.size()) used[i] = false; ll f = max_flow_dfs(G, s, t, INF, used); if (f == 0) { return flow; } flow += f; } } void BellmanFord(Graph &G, ll s, Array &d, Array &negative) { // O(|E||V|) d.resize(G.size()); negative.resize(G.size()); REP(i, d.size()) d[i] = INF; REP(i, d.size()) negative[i] = false; d[s] = 0; REP(k, G.size() - 2) { REP(i, G.size()) { REP(j, G[i].size()) { if (d[G[i][j].to] > d[i] + G[i][j].cap) { d[G[i][j].to] = d[i] + G[i][j].cap; } } } } REP(k, G.size() - 2) { REP(i, G.size()) { REP(j, G[i].size()) { if (d[G[i][j].to] > d[i] + G[i][j].cap) { d[G[i][j].to] = d[i] + G[i][j].cap; negative[G[i][j].to] = true; } if (negative[i] == true) negative[G[i][j].to] = true; } } } } void Dijkstra(Graph &G, ll s, Array &d) { // O(|E|log|V|) d.resize(G.size()); REP(i, d.size()) d[i] = INF; d[s] = 0; priority_queue<P, vector<P>, greater<P>> q; q.push(make_pair(0, s)); while (!q.empty()) { P a = q.top(); q.pop(); if (d[a.second] < a.first) continue; REP(i, G[a.second].size()) { Edge e = G[a.second][i]; if (d[e.to] > d[a.second] + e.cap) { d[e.to] = d[a.second] + e.cap; q.push(make_pair(d[e.to], e.to)); } } } } void WarshallFloyd(Graph &G, Matrix &d) { // O(V^3) d.resize(G.size()); REP(i, d.size()) d[i].resize(G.size()); REP(i, d.size()) { REP(j, d[i].size()) { d[i][j] = INF; } } REP(i, G.size()) { REP(j, G[i].size()) { d[i][G[i][j].to] = G[i][j].cap; } } REP(i, G.size()) { REP(j, G.size()) { REP(k, G.size()) { chmin(d[j][k], d[j][i] + d[i][k]); } } } } bool tsort(Graph &graph, vector<int> &order) { //トポロジカルソートO(E+V) int n = graph.size(), k = 0; Array in(n); for (auto &es : graph) for (auto &e : es) in[e.to]++; priority_queue<ll, Array, greater<ll>> que; REP(i, n) if (in[i] == 0) que.push(i); while (que.size()) { int v = que.top(); que.pop(); order.push_back(v); for (auto &e : graph[v]) if (--in[e.to] == 0) que.push(e.to); } if (order.size() != n) return false; else return true; } class UnionFind { vector<int> data; ll num; public: UnionFind(int size) : data(size, -1), num(size) {} bool unionSet(int x, int y) { // xとyの集合を統合する x = root(x); y = root(y); if (x != y) { if (data[y] < data[x]) swap(x, y); data[x] += data[y]; data[y] = x; } num -= (x != y); return x != y; } bool findSet(int x, int y) { // xとyが同じ集合か返す return root(x) == root(y); } int root(int x) { // xのルートを返す return data[x] < 0 ? x : data[x] = root(data[x]); } int size(int x) { // xの集合のサイズを返す return -data[root(x)]; } int numSet() { //集合の数を返す return num; } }; class SumSegTree { private: int _sum(int a, int b, int k, int l, int r) { if (r <= a || b <= l) return 0; // 交差しない if (a <= l && r <= b) return dat[k]; // a,l,r,bの順で完全に含まれる else { int s1 = _sum(a, b, 2 * k + 1, l, (l + r) / 2); // 左の子 int s2 = _sum(a, b, 2 * k + 2, (l + r) / 2, r); // 右の子 return s1 + s2; } } public: int n, height; vector<int> dat; // 初期化(_nは最大要素数) SumSegTree(int _n) { n = 1; height = 1; while (n < _n) { n *= 2; height++; } dat = vector<int>(2 * n - 1, 0); } // 場所i(0-indexed)にxを足す void add(int i, int x) { i += n - 1; // i番目の葉ノードへ dat[i] += x; while (i > 0) { // 下から上がっていく i = (i - 1) / 2; dat[i] += x; } } // 区間[a,b)の総和。ノードk=[l,r)に着目している。 int sum(int a, int b) { return _sum(a, b, 0, 0, n); } }; class RmqTree { private: ll _find(ll a, ll b, ll k, ll l, ll r) { if (r <= a || b <= l) return INF; // 交差しない if (a <= l && r <= b) return dat[k]; // a,l,r,bの順で完全に含まれる else { ll s1 = _find(a, b, 2 * k + 1, l, (l + r) / 2); // 左の子 ll s2 = _find(a, b, 2 * k + 2, (l + r) / 2, r); // 右の子 return min(s1, s2); } } public: ll n, height; vector<ll> dat; // 初期化(_nは最大要素数) RmqTree(ll _n) { n = 1; height = 1; while (n < _n) { n *= 2; height++; } dat = vector<ll>(2 * n - 1, INF); } // 場所i(0-indexed)をxにする void update(ll i, ll x) { i += n - 1; // i番目の葉ノードへ dat[i] = x; while (i > 0) { // 下から上がっていく i = (i - 1) / 2; dat[i] = min(dat[i * 2 + 1], dat[i * 2 + 2]); } } // 区間[a,b)の最小値。ノードk=[l,r)に着目している。 ll find(ll a, ll b) { return _find(a, b, 0, 0, n); } }; //約数求める //約数 void divisor(ll n, vector<ll> &ret) { for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(ret.begin(), ret.end()); } vector<ll> lis_fast(const vector<ll> &a) { //最長部分増加列 const ll n = a.size(); vector<ll> A(n, INT_MAX); vector<ll> id(n); for (int i = 0; i < n; ++i) { id[i] = distance(A.begin(), lower_bound(A.begin(), A.end(), a[i])); A[id[i]] = a[i]; } ll m = *max_element(id.begin(), id.end()); vector<ll> b(m + 1); for (int i = n - 1; i >= 0; --i) if (id[i] == m) b[m--] = a[i]; return b; } ll ModPow(ll x, ll n) { ll res = 1LL; while (n > 0) { if (n & 1) res = res * x % MOD; x = x * x % MOD; n >>= 1; } return res; } // nCrとか class Combination { public: Array fact; Array inv; ll mod; ll mod_inv(ll x) { ll n = mod - 2LL; ll res = 1LL; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n >>= 1; } return res; } ll nCr(ll n, ll r) { return ((fact[n] * inv[r] % mod) * inv[n - r]) % mod; } ll nPr(ll n, ll r) { return (fact[n] * inv[n - r]) % mod; } ll nHr(ll n, ll r) { return nCr(r + n - 1, r); } Combination(ll n, ll _mod) { mod = _mod; fact.resize(n + 1); fact[0] = 1; REP(i, n) { fact[i + 1] = (fact[i] * (i + 1LL)) % mod; } inv.resize(n + 1); REP(i, n + 1) { inv[i] = mod_inv(fact[i]); } } }; ll gcd(ll m, ll n) { if (n == 0) return m; return gcd(n, m % n); } // gcd ll lcm(ll m, ll n) { return m / gcd(m, n) * n; } Matrix mIdentity(ll n) { Matrix A(n, Array(n)); for (int i = 0; i < n; ++i) A[i][i] = 1; return A; } Matrix mMul(const Matrix &A, const Matrix &B) { Matrix C(A.size(), Array(B[0].size())); for (int i = 0; i < C.size(); ++i) for (int j = 0; j < C[i].size(); ++j) for (int k = 0; k < A[i].size(); ++k) (C[i][j] += (A[i][k] % MOD) * (B[k][j] % MOD)) %= MOD; return C; } // O( n^3 log e ) Matrix mPow(const Matrix &A, ll e) { return e == 0 ? mIdentity(A.size()) : e % 2 == 0 ? mPow(mMul(A, A), e / 2) : mMul(A, mPow(A, e - 1)); } int main() { ios::sync_with_stdio(false); cin.tie(0); ll l, r; cin >> l >> r; if (r - l >= 2018) { cout << 0; } else { ll ans = INF; for (int i = l; i < r; i++) { for (int j = i + 1; j <= r; j++) { ll tl = i % 2019; ll tr = j % 2019; chmin(ans, tl * tr); } } cout << ans; } return 0; }
#define _USE_MATH_DEFINES #include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; #define MOD 1000000007 #define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++) #define REP(i, n) rep(i, 0, n) #define FOR(i, c) \ for (decltype((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define ll long long #define ull unsigned long long #define all(hoge) (hoge).begin(), (hoge).end() typedef pair<ll, ll> P; const long long INF = 1LL << 60; typedef vector<ll> Array; typedef vector<Array> Matrix; // priority_queue<ll> max;//大きい順 // priority_queue<ll, Array, greater<ll>> min;//小さい順 /*firstについては昇順 secondについては降順 sort(all(wh), [&](P x, P y) { if (x.first == y.first)return x.second > y.second; return x.first < y.first; }); */ template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } // substr 文字列取り出し // upper_bound // ある値より大きい一番左のイテレータを返す、lowerは以上(setに対して使うとO(N)なので、setのメンバ関数を使う // stoi struct Edge { //グラフ ll to, cap, rev; Edge(ll _to, ll _cap, ll _rev) { to = _to; cap = _cap; rev = _rev; } }; typedef vector<Edge> Edges; typedef vector<Edges> Graph; void add_edge(Graph &G, ll from, ll to, ll cap, bool revFlag, ll revCap) { //最大フロー求める Ford-fulkerson G[from].push_back(Edge(to, cap, (ll)G[to].size())); if (revFlag) G[to].push_back(Edge( from, revCap, (ll)G[from].size() - 1)); //最小カットの場合逆辺は0にする } ll max_flow_dfs(Graph &G, ll v, ll t, ll f, vector<bool> &used) { if (v == t) return f; used[v] = true; for (int i = 0; i < G[v].size(); ++i) { Edge &e = G[v][i]; if (!used[e.to] && e.cap > 0) { ll d = max_flow_dfs(G, e.to, t, min(f, e.cap), used); if (d > 0) { e.cap -= d; G[e.to][e.rev].cap += d; return d; } } } return 0; } //二分グラフの最大マッチングを求めたりも出来る また二部グラフの最大独立集合は頂点数-最大マッチングのサイズ ll max_flow(Graph &G, ll s, ll t) // O(V(V+E)) { ll flow = 0; for (;;) { vector<bool> used(G.size()); REP(i, used.size()) used[i] = false; ll f = max_flow_dfs(G, s, t, INF, used); if (f == 0) { return flow; } flow += f; } } void BellmanFord(Graph &G, ll s, Array &d, Array &negative) { // O(|E||V|) d.resize(G.size()); negative.resize(G.size()); REP(i, d.size()) d[i] = INF; REP(i, d.size()) negative[i] = false; d[s] = 0; REP(k, G.size() - 2) { REP(i, G.size()) { REP(j, G[i].size()) { if (d[G[i][j].to] > d[i] + G[i][j].cap) { d[G[i][j].to] = d[i] + G[i][j].cap; } } } } REP(k, G.size() - 2) { REP(i, G.size()) { REP(j, G[i].size()) { if (d[G[i][j].to] > d[i] + G[i][j].cap) { d[G[i][j].to] = d[i] + G[i][j].cap; negative[G[i][j].to] = true; } if (negative[i] == true) negative[G[i][j].to] = true; } } } } void Dijkstra(Graph &G, ll s, Array &d) { // O(|E|log|V|) d.resize(G.size()); REP(i, d.size()) d[i] = INF; d[s] = 0; priority_queue<P, vector<P>, greater<P>> q; q.push(make_pair(0, s)); while (!q.empty()) { P a = q.top(); q.pop(); if (d[a.second] < a.first) continue; REP(i, G[a.second].size()) { Edge e = G[a.second][i]; if (d[e.to] > d[a.second] + e.cap) { d[e.to] = d[a.second] + e.cap; q.push(make_pair(d[e.to], e.to)); } } } } void WarshallFloyd(Graph &G, Matrix &d) { // O(V^3) d.resize(G.size()); REP(i, d.size()) d[i].resize(G.size()); REP(i, d.size()) { REP(j, d[i].size()) { d[i][j] = INF; } } REP(i, G.size()) { REP(j, G[i].size()) { d[i][G[i][j].to] = G[i][j].cap; } } REP(i, G.size()) { REP(j, G.size()) { REP(k, G.size()) { chmin(d[j][k], d[j][i] + d[i][k]); } } } } bool tsort(Graph &graph, vector<int> &order) { //トポロジカルソートO(E+V) int n = graph.size(), k = 0; Array in(n); for (auto &es : graph) for (auto &e : es) in[e.to]++; priority_queue<ll, Array, greater<ll>> que; REP(i, n) if (in[i] == 0) que.push(i); while (que.size()) { int v = que.top(); que.pop(); order.push_back(v); for (auto &e : graph[v]) if (--in[e.to] == 0) que.push(e.to); } if (order.size() != n) return false; else return true; } class UnionFind { vector<int> data; ll num; public: UnionFind(int size) : data(size, -1), num(size) {} bool unionSet(int x, int y) { // xとyの集合を統合する x = root(x); y = root(y); if (x != y) { if (data[y] < data[x]) swap(x, y); data[x] += data[y]; data[y] = x; } num -= (x != y); return x != y; } bool findSet(int x, int y) { // xとyが同じ集合か返す return root(x) == root(y); } int root(int x) { // xのルートを返す return data[x] < 0 ? x : data[x] = root(data[x]); } int size(int x) { // xの集合のサイズを返す return -data[root(x)]; } int numSet() { //集合の数を返す return num; } }; class SumSegTree { private: int _sum(int a, int b, int k, int l, int r) { if (r <= a || b <= l) return 0; // 交差しない if (a <= l && r <= b) return dat[k]; // a,l,r,bの順で完全に含まれる else { int s1 = _sum(a, b, 2 * k + 1, l, (l + r) / 2); // 左の子 int s2 = _sum(a, b, 2 * k + 2, (l + r) / 2, r); // 右の子 return s1 + s2; } } public: int n, height; vector<int> dat; // 初期化(_nは最大要素数) SumSegTree(int _n) { n = 1; height = 1; while (n < _n) { n *= 2; height++; } dat = vector<int>(2 * n - 1, 0); } // 場所i(0-indexed)にxを足す void add(int i, int x) { i += n - 1; // i番目の葉ノードへ dat[i] += x; while (i > 0) { // 下から上がっていく i = (i - 1) / 2; dat[i] += x; } } // 区間[a,b)の総和。ノードk=[l,r)に着目している。 int sum(int a, int b) { return _sum(a, b, 0, 0, n); } }; class RmqTree { private: ll _find(ll a, ll b, ll k, ll l, ll r) { if (r <= a || b <= l) return INF; // 交差しない if (a <= l && r <= b) return dat[k]; // a,l,r,bの順で完全に含まれる else { ll s1 = _find(a, b, 2 * k + 1, l, (l + r) / 2); // 左の子 ll s2 = _find(a, b, 2 * k + 2, (l + r) / 2, r); // 右の子 return min(s1, s2); } } public: ll n, height; vector<ll> dat; // 初期化(_nは最大要素数) RmqTree(ll _n) { n = 1; height = 1; while (n < _n) { n *= 2; height++; } dat = vector<ll>(2 * n - 1, INF); } // 場所i(0-indexed)をxにする void update(ll i, ll x) { i += n - 1; // i番目の葉ノードへ dat[i] = x; while (i > 0) { // 下から上がっていく i = (i - 1) / 2; dat[i] = min(dat[i * 2 + 1], dat[i * 2 + 2]); } } // 区間[a,b)の最小値。ノードk=[l,r)に着目している。 ll find(ll a, ll b) { return _find(a, b, 0, 0, n); } }; //約数求める //約数 void divisor(ll n, vector<ll> &ret) { for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(ret.begin(), ret.end()); } vector<ll> lis_fast(const vector<ll> &a) { //最長部分増加列 const ll n = a.size(); vector<ll> A(n, INT_MAX); vector<ll> id(n); for (int i = 0; i < n; ++i) { id[i] = distance(A.begin(), lower_bound(A.begin(), A.end(), a[i])); A[id[i]] = a[i]; } ll m = *max_element(id.begin(), id.end()); vector<ll> b(m + 1); for (int i = n - 1; i >= 0; --i) if (id[i] == m) b[m--] = a[i]; return b; } ll ModPow(ll x, ll n) { ll res = 1LL; while (n > 0) { if (n & 1) res = res * x % MOD; x = x * x % MOD; n >>= 1; } return res; } // nCrとか class Combination { public: Array fact; Array inv; ll mod; ll mod_inv(ll x) { ll n = mod - 2LL; ll res = 1LL; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n >>= 1; } return res; } ll nCr(ll n, ll r) { return ((fact[n] * inv[r] % mod) * inv[n - r]) % mod; } ll nPr(ll n, ll r) { return (fact[n] * inv[n - r]) % mod; } ll nHr(ll n, ll r) { return nCr(r + n - 1, r); } Combination(ll n, ll _mod) { mod = _mod; fact.resize(n + 1); fact[0] = 1; REP(i, n) { fact[i + 1] = (fact[i] * (i + 1LL)) % mod; } inv.resize(n + 1); REP(i, n + 1) { inv[i] = mod_inv(fact[i]); } } }; ll gcd(ll m, ll n) { if (n == 0) return m; return gcd(n, m % n); } // gcd ll lcm(ll m, ll n) { return m / gcd(m, n) * n; } Matrix mIdentity(ll n) { Matrix A(n, Array(n)); for (int i = 0; i < n; ++i) A[i][i] = 1; return A; } Matrix mMul(const Matrix &A, const Matrix &B) { Matrix C(A.size(), Array(B[0].size())); for (int i = 0; i < C.size(); ++i) for (int j = 0; j < C[i].size(); ++j) for (int k = 0; k < A[i].size(); ++k) (C[i][j] += (A[i][k] % MOD) * (B[k][j] % MOD)) %= MOD; return C; } // O( n^3 log e ) Matrix mPow(const Matrix &A, ll e) { return e == 0 ? mIdentity(A.size()) : e % 2 == 0 ? mPow(mMul(A, A), e / 2) : mMul(A, mPow(A, e - 1)); } int main() { ios::sync_with_stdio(false); cin.tie(0); ll l, r; cin >> l >> r; if (r - l >= 2018) { cout << 0; } else { ll ans = INF; for (int i = l; i < r; i++) { for (int j = i + 1; j <= r; j++) { ll tl = i % 2019; ll tr = j % 2019; chmin(ans, ((tl * tr) % 2019)); } } cout << ans; } return 0; }
[ "call.arguments.add" ]
791,400
791,401
u051493691
cpp
p02983
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <stack> #include <vector> #define repd(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) typedef long long ll; using namespace std; int inputValue() { int a; cin >> a; return a; }; void inputArray(int *p, int a){rep(i, a){cin >> p[i]; } } ; void inputVector(vector<int> *p, int a) { rep(i, a) { int input; cin >> input; p->push_back(input); } } int main() { ll L, R; cin >> L >> R; if (R - L > 673) { cout << 0 << endl; return 0; } if (L % 673 > R % 673) { cout << 0 << endl; return 0; } int i, j; int x = L % 673; int y = R % 673; int ans = 2019; int tmp = 0; for (i = x; i < y; i++) { for (j = i + 1; j <= y; j++) { tmp = (i * j) % 673; if (tmp < ans) { ans = tmp; } } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <stack> #include <vector> #define repd(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) typedef long long ll; using namespace std; int inputValue() { int a; cin >> a; return a; }; void inputArray(int *p, int a){rep(i, a){cin >> p[i]; } } ; void inputVector(vector<int> *p, int a) { rep(i, a) { int input; cin >> input; p->push_back(input); } } int main() { ll L, R; cin >> L >> R; if (R - L > 673) { cout << 0 << endl; return 0; } if (L % 673 > R % 673) { cout << 0 << endl; return 0; } int i, j; int x = L % 2019; int y = R % 2019; int ans = 2019; int tmp = 0; for (i = x; i < y; i++) { for (j = i + 1; j <= y; j++) { tmp = (i * j) % 2019; if (tmp < ans) { ans = tmp; } } } cout << ans << endl; return 0; }
[ "literal.number.change", "expression.operation.binary.change", "assignment.value.change" ]
791,404
791,405
u530223066
cpp
p02983
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; const int mod = 1e9 + 7; typedef long long ll; int main() { ll l, r; cin >> l >> r; ll i, j; ll min = 100000; if (r - l > 2019) min = 0; else if (r - l <= 2019) for (i = l; i < r; i++) for (j = i + 1; j <= r; j++) { if (min > (l * j) % 2019) min = l * j % 2019; } cout << min << endl; return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; const int mod = 1e9 + 7; typedef long long ll; int main() { ll l, r; cin >> l >> r; ll i, j; ll min = 100000; if (r - l > 2019) min = 0; else if (r - l <= 2019) for (i = l; i < r; i++) for (j = i + 1; j <= r; j++) { if (min > (i * j) % 2019) min = i * j % 2019; } cout << min << endl; return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change", "assignment.value.change", "expression.operation.binary.change" ]
791,410
791,411
u220212997
cpp
p02983
#include <bits/stdc++.h> using namespace std; using Int = long long; signed main() { Int l, r; cin >> l >> r; if (r - l >= 55) { cout << 0 << endl; } else { Int min = 2019; for (Int i = l; i < r; i++) { for (Int j = i + 1; j <= r; j++) { Int tmp = (i * j) % 2019; if (min > tmp) min = tmp; } } cout << min << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; using Int = long long; signed main() { Int l, r; cin >> l >> r; if (r - l >= 2019) { cout << 0 << endl; } else { Int min = 2019; for (Int i = l; i < r; i++) { for (Int j = i + 1; j <= r; j++) { Int tmp = (i * j) % 2019; if (min > tmp) min = tmp; } } cout << min << endl; } return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
791,428
791,429
u148215098
cpp
p02983
#include <bits/stdc++.h> using namespace std; int a[4500]; int main() { int l, r; cin >> l >> r; int x = min(r - l + 1, 4038); for (int i = 1; i <= x; i++) { a[i] = (i - 1 + l) % 2019; } int minn = 9999; for (int i = 1; i <= x; i++) { for (int j = i + 1; j <= x; j++) { // cout<<"i:"<<i<<"j:"<<j; minn = min(minn, (a[i] % 2019) * (a[j] % 2019)); // cout<<"minn:"<<minn<<endl; } } // cout<<x<<endl; cout << minn; return 0; }
#include <bits/stdc++.h> using namespace std; int a[4500]; int main() { int l, r; cin >> l >> r; int x = min(r - l + 1, 4038); for (int i = 1; i <= x; i++) { a[i] = (i - 1 + l) % 2019; } int minn = 9999; for (int i = 1; i <= x; i++) { for (int j = i + 1; j <= x; j++) { // cout<<"i:"<<i<<"j:"<<j; minn = min(minn, ((a[i] % 2019) * (a[j] % 2019)) % 2019); // cout<<"minn:"<<minn<<endl; } } // cout<<x<<endl; cout << minn; return 0; }
[ "call.arguments.change", "call.arguments.add" ]
791,430
791,431
u261868146
cpp
p02983
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <math.h> #include <stack> #include <string> #include <vector> //#include<stdlib.h> using namespace std; int main() { int l, m, n, r, p, s = 2019; cin >> l >> m; n = m % 2019; r = l % 2019; if (((m - l) > 2019) || (n < r)) { s = 0; } else { for (int a = r; a < n; a++) { for (int b = a + 1; b < n; b++) { p = (a * b) % 2019; if (p < s) { s = p; } } } } cout << s; return 0; }
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <math.h> #include <stack> #include <string> #include <vector> //#include<stdlib.h> using namespace std; int main() { int l, m, n, r, p, s = 2019; cin >> l >> m; n = m % 2019; r = l % 2019; if (((m - l) > 2019) || (n < r)) { s = 0; } else { for (int a = r; a <= n; a++) { for (int b = a + 1; b <= n; b++) { p = ((a * b) % 2019); if (p < s) { s = p; } } } } cout << s; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,442
791,443
u468506413
cpp
p02983
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; // const int MOD=998244353; const long long LINF = 1e18; using namespace std; #define int long long // template // main signed main() { int L, R; cin >> L >> R; int ans = LINF; if (R - L > 2020) cout << 0 << endl; else { 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; }
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; // const int MOD=998244353; const long long LINF = 1e18; using namespace std; #define int long long // template // main signed main() { int L, R; cin >> L >> R; int ans = LINF; if (R - L > 2020) cout << 0 << endl; else { 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; } }
[]
791,444
791,445
u942774736
cpp
p02983
#include <algorithm> #include <fstream> #include <iostream> #include <limits> #include <math.h> #include <numeric> #include <set> #include <stdio.h> #include <stdlib.h> #include <string> #include <type_traits> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define out(str) cout << str << endl #define ALL(a) (a).begin(), (a).end() #define INF (1 << 29) 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; } ll L, R, mini = 10000; ll co(ll a, ll b) { if (a > b) return b; else return a; } int main() { cin >> L >> R; if (R - L >= 2018) out(0); else { repi(i, L, R + 1) repi(j, L + 1, R + 1) mini = co(mini, ((i % 2019) * (j % 2019)) % 2019); out(mini); } }
#include <algorithm> #include <fstream> #include <iostream> #include <limits> #include <math.h> #include <numeric> #include <set> #include <stdio.h> #include <stdlib.h> #include <string> #include <type_traits> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define out(str) cout << str << endl #define ALL(a) (a).begin(), (a).end() #define INF (1 << 29) 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; } ll L, R, mini = 10000; ll co(ll a, ll b) { if (a > b) return b; else return a; } int main() { cin >> L >> R; if (R - L >= 2018) out(0); else { repi(i, L, R + 1) repi(j, i + 1, R + 1) mini = co(mini, ((i % 2019) * (j % 2019)) % 2019); out(mini); } }
[ "assignment.variable.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
791,461
791,462
u190907730
cpp
p02983
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <vector> using namespace std; typedef long long ll; //#define MOD 1000000007 #define MOD 2019 int main() { ll L, R; cin >> L >> R; ll ans, r, l; if (R - L >= MOD) { ans = 0; } else { r = R % MOD; l = L % MOD; if (l >= r) { ans = 0; } else { ans = MOD; for (ll i = l; i < r; i++) { for (ll j = i + 1; j < r; j++) { ans = min(ans, i * j % MOD); } } } } cout << ans << endl; return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <vector> using namespace std; typedef long long ll; //#define MOD 1000000007 #define MOD 2019 int main() { ll L, R; cin >> L >> R; ll ans, r, l; if (R - L >= MOD) { ans = 0; } else { r = R % MOD; l = L % MOD; if (l >= r) { ans = 0; } else { ans = MOD; for (ll i = l; i < r; i++) { for (ll j = i + 1; j <= r; j++) { ans = min(ans, i * j % MOD); } } } } cout << ans << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,466
791,467
u878967567
cpp
p02983
#include <iostream> #include <limits> using namespace std; int main() { long long int l, r; cin >> l >> r; int a1 = numeric_limits<int>::max(); for (long long int i = l; i < min(r, l + 2019); ++i) { for (long long int j = l + 1; j <= min(r, l + 2019); ++j) { int a = (i % 2019) * (j % 2019); if (a < a1) a1 = a; } } cout << a1 << endl; }
#include <iostream> #include <limits> using namespace std; int main() { long long int l, r; cin >> l >> r; int a1 = numeric_limits<int>::max(); for (long long int i = l; i < min(r, l + 2018); ++i) { for (long long int j = l + 1; j <= min(r, l + 2018); ++j) { int a = (i % 2019) * (j % 2019) % 2019; if (a < a1) a1 = a; } } cout << a1 << endl; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "call.arguments.change", "expression.operation.binary.change" ]
791,476
791,477
u488731967
cpp
p02983
#include <stdio.h> int main() { int l, r; scanf("%d %d", &l, &r); int l_quot = l / 2019, l_remain = l % 2019; int r_quot = r / 2019, r_remain = r % 2019; // l_quot <= r_quot // l_remain < r_remain?? int min = (l_remain * r_remain) % 2019; if (l_quot == r_quot) { for (int i = l_remain; i < r_remain - 1; i++) { for (int j = i + 1; j < r_remain; j++) { int cross = (i * j) % 2019; if (cross < min) { min = cross; } } } } else { min = 0; } printf("%d", min); }
#include <stdio.h> int main() { int l, r; scanf("%d %d", &l, &r); int l_quot = l / 2019, l_remain = l % 2019; int r_quot = r / 2019, r_remain = r % 2019; // l_quot <= r_quot // l_remain < r_remain?? int min = (l_remain * r_remain) % 2019; if (l_quot == r_quot) { for (int i = l_remain; i < r_remain; i++) { for (int j = i + 1; j < r_remain + 1; j++) { int cross = (i * j) % 2019; if (cross < min) { min = cross; } } } } else { min = 0; } printf("%d", min); }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove", "control_flow.branch.if.condition.change", "misc.off_by_one" ]
791,480
791,481
u805668940
cpp
p02983
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { int l, r; scanf("%d %d", &l, &r); ll ans = LLONG_MAX; for (ll i = l; i <= l + 2019 && i <= r; i++) for (ll j = l + 1; j - l <= 2020 && j <= r; j++) { // if (ans > i * j % 2019) // printf("%lld %lld %lld\n", i, j, i * j % 2019); ans = min(ans, i * j % 2019); } printf("%lld\n", ans); return 0; }
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { int l, r; scanf("%d %d", &l, &r); ll ans = LLONG_MAX; for (ll i = l; i <= l + 2019 && i <= r; i++) for (ll j = i + 1; j - l <= 2020 && j <= r; j++) { // if (ans > i * j % 2019) // printf("%lld %lld %lld\n", i, j, i * j % 2019); ans = min(ans, i * j % 2019); } printf("%lld\n", ans); return 0; }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,484
791,485
u516461055
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; #define BIG_NUM 2000000000 #define MOD 1000000007 #define EPS 0.000000001 int main() { LL l, r; cin >> l >> r; LL min1, min2; min1 = min2 = 2020; LL res = BIG_NUM; int rW = min(r, l + 2020); for (LL i = l; i < rW; i++) { for (LL j = i + 1; j <= rW; j++) { res = min(res, (i % 2019) * (j % 2019)); } } cout << res << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; #define BIG_NUM 2000000000 #define MOD 1000000007 #define EPS 0.000000001 int main() { LL l, r; cin >> l >> r; LL min1, min2; min1 = min2 = 2020; LL res = BIG_NUM; int rW = min(r, l + 2020); for (LL i = l; i < rW; i++) { for (LL j = i + 1; j <= rW; j++) { res = min(res, ((i % 2019) * (j % 2019)) % 2019); } } cout << res << endl; return 0; }
[ "call.arguments.change", "call.arguments.add" ]
791,486
791,487
u400497478
cpp
p02983
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { ll L, R; const ll mod = 2019; cin >> L >> R; if (R - L >= 2018) { cout << 0 << endl; return 0; } ll Lm = L % mod; ll Rm = R % mod; // if(Lm >= Rm) { // cout << 0 << endl; // return 0; // } if (Lm > Rm) Rm += 2019; ll ans = 2018; for (int i = Lm; i <= Rm; i++) { for (int j = Lm + 1; j <= Rm; j++) { ll tmp = i * j % mod; if (tmp < 0) tmp += mod; if (ans > tmp) ans = tmp; } } cout << ans << endl; return 0; }
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { ll L, R; const ll mod = 2019; cin >> L >> R; if (R - L > 2019) { cout << 0 << endl; return 0; } ll Lm = L % mod; ll Rm = R % mod; // if(Lm >= Rm) { // cout << 0 << endl; // return 0; // } if (Lm > Rm) Rm += 2019; ll ans = 2018; for (int i = Lm; i <= Rm; i++) { for (int j = i + 1; j <= Rm; j++) { ll tmp = i * j % mod; if (tmp < 0) tmp += mod; if (ans > tmp) ans = tmp; } } cout << ans << endl; return 0; }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,488
791,489
u017293723
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll L, R; cin >> L >> R; if (L % 2019 == 0 || (L / 2019 != R / 2019)) { cout << 0 << endl; } else { ll ans = 1e18; for (ll i = L; i <= R; i++) { for (ll j = L + 1; j <= R; j++) { ll sum = i * j % 2019; ans = min(ans, sum); } } cout << ans << endl; } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll L, R; cin >> L >> R; if (L % 2019 == 0 || (L / 2019 != R / 2019)) { cout << 0 << endl; } else { ll ans = 1e18; for (ll i = L; i <= R; i++) { for (ll j = i + 1; j <= R; j++) { ll sum = i * j % 2019; ans = min(ans, sum); } } cout << ans << endl; } }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,506
791,507
u646566089
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long LL; template <class T> inline void read(T &x) { x = 0; char c = getchar(); bool f = 0; for (; !isdigit(c); c = getchar()) f ^= c == '-'; for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48); x = f ? -x : x; } template <class T> inline void write(T x) { if (x < 0) { putchar('-'); x = -x; } T y = 1; int len = 1; for (; y <= x / 10; y *= 10) ++len; for (; len; --len, x %= y, y /= 10) putchar(x / y + 48); } int l, r; int main() { read(l), read(r); if (r - l >= 2019) { puts("0"); return 0; } else { int ans = (l % 2019) * (r % 2019); for (int i = l; i <= r; ++i) for (int j = i + 1; j <= r; ++j) ans = min(ans, (i % 2019) * (j % 2019)); write(ans); putchar('\n'); } return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long LL; template <class T> inline void read(T &x) { x = 0; char c = getchar(); bool f = 0; for (; !isdigit(c); c = getchar()) f ^= c == '-'; for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48); x = f ? -x : x; } template <class T> inline void write(T x) { if (x < 0) { putchar('-'); x = -x; } T y = 1; int len = 1; for (; y <= x / 10; y *= 10) ++len; for (; len; --len, x %= y, y /= 10) putchar(x / y + 48); } int l, r; int main() { read(l), read(r); if (r - l >= 2019) { puts("0"); return 0; } else { int ans = (l % 2019) * (r % 2019) % 2019; for (int i = l; i <= r; ++i) for (int j = i + 1; j <= r; ++j) ans = min(ans, (i % 2019) * (j % 2019) % 2019); write(ans); putchar('\n'); } return 0; }
[ "assignment.change" ]
791,510
791,511
u083092461
cpp
p02983
/* C */ #include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; #define MOD 2019 int main() { long long int l, r; cin >> l >> r; long long int mini = 2147483647; if (l / MOD == r / MOD) { l = l % MOD, r = r % MOD; for (long long int i = l; i < r; ++i) { for (long long int j = i + 1; j <= r; ++j) { mini = min((i % MOD) * (j % MOD), mini); } } } else { mini = 0; } cout << mini << endl; }
/* C */ #include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; #define MOD 2019 int main() { long long int l, r; cin >> l >> r; long long int mini = 2019; if (l / MOD == r / MOD) { l = l % MOD, r = r % MOD; for (long long int i = l; i < r; ++i) { for (long long int j = i + 1; j <= r; ++j) { mini = min(((i % MOD) * (j % MOD)) % MOD, mini); } } } else { mini = 0; } cout << mini << endl; }
[ "literal.number.change", "variable_declaration.value.change", "call.arguments.change", "assignment.change" ]
791,514
791,515
u147762850
cpp
p02983
/***************************************************** *****************************************************/ #include <bits/stdc++.h> #define MAX 9223372036854775807 #define endl "\n" #define ll long long #define int long long #define pb push_back #define pf push_front #define F first #define S second #define ppf pop_front #define mp make_pair #define ip pair<int, int> #define loop(i, n) for (int i = 0; i < n; i++) #define fast \ ios::sync_with_stdio(0); \ cin.tie(NULL); \ cout.tie(NULL) using namespace std; const ll MOD = 1e9 + 7; const ll SZ = 107; const ll N = 1e6 + 1; const ll inf = 1e8; int pwr(int x, int y) { ll r = 1LL; while (y) { if (y & 1) r = (r * x) % MOD; y >>= 1; x = (x * x) % MOD; } return r % MOD; } int inv(int x) { return pwr(x, MOD - 2); } void solve() { int l, r; cin >> l >> r; int MOD = 2019; if (r - l >= MOD) cout << 0; else { int ans = r * (r - 1); for (int i = l; i <= r; i++) { for (int j = l + 1; j <= r; j++) { ans = min(ans, (i * j) % MOD); } } cout << ans; } } signed main() { // #ifndef ONLINE_JUDGE // freopen("ladders_and_snakes_sample_input.txt", "r", stdin); // freopen("output.txt", "w", stdout); // #endif int t = 1; // cin >>t; for (int tt = 1; tt <= t; tt++) { // cout<<"Case #"<<tt<<": "; solve(); } return 0; } /***************************** ****************************/
/***************************************************** *****************************************************/ #include <bits/stdc++.h> #define MAX 9223372036854775807 #define endl "\n" #define ll long long #define int long long #define pb push_back #define pf push_front #define F first #define S second #define ppf pop_front #define mp make_pair #define ip pair<int, int> #define loop(i, n) for (int i = 0; i < n; i++) #define fast \ ios::sync_with_stdio(0); \ cin.tie(NULL); \ cout.tie(NULL) using namespace std; const ll MOD = 1e9 + 7; const ll SZ = 107; const ll N = 1e6 + 1; const ll inf = 1e8; int pwr(int x, int y) { ll r = 1LL; while (y) { if (y & 1) r = (r * x) % MOD; y >>= 1; x = (x * x) % MOD; } return r % MOD; } int inv(int x) { return pwr(x, MOD - 2); } void solve() { int l, r; cin >> l >> r; int MOD = 2019; if (r - l >= MOD) cout << 0; else { int ans = r * (r - 1); for (int i = l; i <= r; i++) { for (int j = i + 1; j <= r; j++) { ans = min(ans, (i * j) % MOD); } } cout << ans; } } signed main() { // #ifndef ONLINE_JUDGE // freopen("ladders_and_snakes_sample_input.txt", "r", stdin); // freopen("output.txt", "w", stdout); // #endif int t = 1; // cin >>t; for (int tt = 1; tt <= t; tt++) { // cout<<"Case #"<<tt<<": "; solve(); } return 0; } /***************************** ****************************/
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,516
791,517
u483366732
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long int ll; ll MOD = 1000000007; ll INFL = 1ll << 60; ll INF = 1 << 28; // ==================================================================== int main() { ll l, r; cin >> l >> r; ll ans = INF; for (ll i = l; i < l + 2100 && i <= r; i++) { for (ll j = l + 1; j < l + 2100 && j <= r; j++) { ans = min(ans, ((i % 2019) * (j % 2019)) % 2019); } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; ll MOD = 1000000007; ll INFL = 1ll << 60; ll INF = 1 << 28; // ==================================================================== int main() { ll l, r; cin >> l >> r; ll ans = INF; for (ll i = l; i < l + 2100 && i < r; i++) { for (ll j = i + 1; j < l + 2100 && j <= r; j++) { ans = min(ans, ((i % 2019) * (j % 2019)) % 2019); } } cout << ans << 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" ]
791,520
791,521
u561186440
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long int ll; ll MOD = 1000000007; ll INFL = 1ll << 60; ll INF = 1 << 28; // ==================================================================== int main() { ll l, r; cin >> l >> r; ll ans = INF; for (ll i = l; i < l + 2100 && i <= r; i++) { for (ll j = l + 1; j < l + 2100 && j <= r; j++) { ans = min(ans, (i % 2019 * j % 2019) % 2019); } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; ll MOD = 1000000007; ll INFL = 1ll << 60; ll INF = 1 << 28; // ==================================================================== int main() { ll l, r; cin >> l >> r; ll ans = INF; for (ll i = l; i < l + 2100 && i < r; i++) { for (ll j = i + 1; j < l + 2100 && j <= r; j++) { ans = min(ans, ((i % 2019) * (j % 2019)) % 2019); } } cout << ans << 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", "call.arguments.change" ]
791,522
791,521
u561186440
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; const ll INF = LLONG_MAX; int main() { ll l, r; cin >> l >> r; ll mi = INF; if (r - l == 1) { cout << (l * r) % 2019 << endl; } else if ((r / 2019 - (l - 1) / 2019) > 0) { cout << 0 << endl; } else { for (ll i = (l % 2019); i < (r % 2019); i++) { for (ll j = i + 1; j < (r % 2019); j++) { mi = min(mi, (i * j) % 2019); } } cout << mi << endl; } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; const ll INF = LLONG_MAX; int main() { ll l, r; cin >> l >> r; ll mi = INF; if (r - l == 1) { cout << (l * r) % 2019 << endl; } else if ((r / 2019 - (l - 1) / 2019) > 0) { cout << 0 << endl; } else { for (ll i = (l % 2019); i < (r % 2019); i++) { for (ll j = i + 1; j <= (r % 2019); j++) { mi = min(mi, (i * j) % 2019); } } cout << mi << endl; } }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,531
791,532
u850894780
cpp
p02983
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ███████████ // ██╬╬╬╬╬████╬╬████╬╬╬╬╬██ // █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██ // ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██ // ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██ // ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████ // █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ // ██████████████ // ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████ // ███████ █████ // ███████████████████ #include "bits/stdc++.h" using namespace std; #define MOD 1000000007 //#define MOD 998244353 const double EPS = 1e-9; #define INF (1LL << 60) #define D double #define fs first #define sc second #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b - 1); i >= (a); --i) #define REP(i, n) FOR(i, 0, (n)) #define RREP(i, n) RFOR(i, 0, (n)) #define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr) #define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #define debug(x) cout << #x << " = " << (x) << endl; #define SP << " " << typedef pair<int, int> P; typedef vector<int> vec; typedef vector<vector<int>> mat; signed main() { ios::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; bool f = false; FOR(i, l, r + 1) { if (i % 2019 == 0) { f = true; break; } } if (f) cout << 0 << endl; else { int ans = 2019; FOR(i, l, r) { FOR(j, i + 1, r + 1) ans = min(ans, l % 2019 * r % 2019); } cout << ans << endl; } return 0; }
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ███████████ // ██╬╬╬╬╬████╬╬████╬╬╬╬╬██ // █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██ // ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██ // ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██ // ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████ // █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ // ██████████████ // ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████ // ███████ █████ // ███████████████████ #include "bits/stdc++.h" using namespace std; #define MOD 1000000007 //#define MOD 998244353 const double EPS = 1e-9; #define INF (1LL << 60) #define D double #define fs first #define sc second #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b - 1); i >= (a); --i) #define REP(i, n) FOR(i, 0, (n)) #define RREP(i, n) RFOR(i, 0, (n)) #define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr) #define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #define debug(x) cout << #x << " = " << (x) << endl; #define SP << " " << typedef pair<int, int> P; typedef vector<int> vec; typedef vector<vector<int>> mat; signed main() { ios::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; bool f = false; FOR(i, l, r + 1) { if (i % 2019 == 0) { f = true; break; } } if (f) cout << 0 << endl; else { int ans = 2019; FOR(i, l, r) { FOR(j, i + 1, r + 1) ans = min(ans, i % 2019 * j % 2019); } cout << ans << endl; } return 0; }
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
791,545
791,546
u239493918
cpp
p02983
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vvi = vector<vi>; using vvl = vector<vl>; const int INF = 1 << 28; const ll MOD = 1000000007; template <class T> bool chmax(T &a, const T &b) { return (a < b) ? (a = b, 1) : 0; } template <class T> bool chmin(T &a, const T &b) { return (b < a) ? (a = b, 1) : 0; } int main() { ll l, r; cin >> l >> r; ll modl = l % 2019; ll modr = r % 2019; ll ldiv = l / 2019; ll rdiv = r / 2019; if (ldiv < rdiv) { cout << 0 << "\n"; } else { // ldiv == rdiv ll mini = 2018; for (ll i = l; i <= r; ++i) { for (ll j = l + 1; j <= r; ++j) { ll mult = (i * j) % 2019; chmin(mini, mult); } } cout << mini << "\n"; } return 0; }
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vvi = vector<vi>; using vvl = vector<vl>; const int INF = 1 << 28; const ll MOD = 1000000007; template <class T> bool chmax(T &a, const T &b) { return (a < b) ? (a = b, 1) : 0; } template <class T> bool chmin(T &a, const T &b) { return (b < a) ? (a = b, 1) : 0; } int main() { ll l, r; cin >> l >> r; ll modl = l % 2019; ll modr = r % 2019; ll ldiv = l / 2019; ll rdiv = r / 2019; if (ldiv < rdiv) { cout << 0 << "\n"; } else { // ldiv == rdiv ll mini = INF; for (ll i = l; i < r; ++i) { for (ll j = i + 1; j <= r; ++j) { ll mult = (i * j) % 2019; chmin(mini, mult); } } cout << mini << "\n"; } return 0; }
[ "variable_declaration.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,547
791,548
u756088996
cpp
p02983
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i, a, b) for (ll i = (a); i < (b); ++i) #define per(i, a, b) for (ll i = b - 1LL; i >= (a); --i) #define clr(a, b) memset((a), (b), sizeof(a)) #define ctos(c) string(1, c) #define print(x) cout << #x << " = " << x << endl; #define MOD 1000000007 int main() { ll l, r; cin >> l >> r; rep(i, l, r + 1) { if (i % 2019 == 0) { cout << 0 << endl; return 0; } } ll mn = 4000000000000000010LL; rep(i, l, r + 1) { rep(j, l + 1, r + 1) { ll a = i * j; mn = min(mn, a % 2019); } } cout << mn << endl; return 0; }
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i, a, b) for (ll i = (a); i < (b); ++i) #define per(i, a, b) for (ll i = b - 1LL; i >= (a); --i) #define clr(a, b) memset((a), (b), sizeof(a)) #define ctos(c) string(1, c) #define print(x) cout << #x << " = " << x << endl; #define MOD 1000000007 int main() { ll l, r; cin >> l >> r; rep(i, l, r + 1) { if (i % 2019 == 0) { cout << 0 << endl; return 0; } } ll mn = 4000000000000000010LL; rep(i, l, r + 1) { rep(j, i + 1, r + 1) { ll a = i * j; mn = min(mn, a % 2019); } } cout << mn << endl; return 0; }
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
791,553
791,554
u764076797
cpp
p02983
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; typedef vector<cd> vcd; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; // check the limits, dummy int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll L, R; cin >> L >> R; if ((L - 1) / 2019 != R / 2019) { cout << 0 << endl; return 0; } L = L % 2019; R = R % 2019; int ans = 2018; FOR(i, L, R + 1) { FOR(j, L + 1, R + 1) { ans = min(ans, (i * j) % 2019); } } cout << ans << endl; return 0; } // read the question correctly (ll vs int) // template by bqi343
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; typedef vector<cd> vcd; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; // check the limits, dummy int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll L, R; cin >> L >> R; if ((L - 1) / 2019 != R / 2019) { cout << 0 << endl; return 0; } L = L % 2019; R = R % 2019; int ans = 2018; FOR(i, L, R + 1) { FOR(j, i + 1, R + 1) { ans = min(ans, (i * j) % 2019); } } cout << ans << endl; return 0; } // read the question correctly (ll vs int) // template by bqi343
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
791,557
791,558
u956400481
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { ll L, R; cin >> L >> R; if (R - L >= 2019) cout << 0; else { ll m = 2019 * 2019; for (ll i = L; i < R; i++) for (ll j = i + 1; j < R; j++) m = min(m, i * j % 2019); cout << m; } }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { ll L, R; cin >> L >> R; if (R - L >= 2019) cout << 0; else { ll m = 2018; for (ll i = L; i <= R; i++) for (ll j = i + 1; j <= R; j++) m = min(m, i * j % 2019); cout << m; } }
[ "literal.number.change", "variable_declaration.value.change", "expression.operation.binary.change", "expression.operation.binary.remove", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,562
791,563
u441296840
cpp
p02983
#include <bits/stdc++.h> #define il inline #define vd void typedef long long ll; il ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int main() { #ifdef XZZSB freopen("in.in", "r", stdin); freopen("out.out", "w", stdout); #endif int L = gi(), R = gi(), ans = 2019; R = std::min(R, L + 2019 * 2); for (int i = L; i <= R; ++i) for (int j = L + 1; j <= R; ++j) ans = std::min(0ll + ans, 1ll * i * j % 2019); printf("%d\n", ans); return 0; }
#include <bits/stdc++.h> #define il inline #define vd void typedef long long ll; il ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int main() { #ifdef XZZSB freopen("in.in", "r", stdin); freopen("out.out", "w", stdout); #endif int L = gi(), R = gi(), ans = 2019; R = std::min(R, L + 2019 * 2); for (int i = L; i <= R; ++i) for (int j = i + 1; j <= R; ++j) ans = std::min(0ll + ans, 1ll * i * j % 2019); printf("%d\n", ans); return 0; }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,585
791,586
u713368169
cpp
p02983
#include <bits/stdc++.h> #define il inline #define vd void typedef long long ll; il ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int main() { #ifdef XZZSB freopen("in.in", "r", stdin); freopen("out.out", "w", stdout); #endif int L = gi(), R = gi(), ans = 2019; R = std::min(R, L + 2019); for (int i = L; i <= R; ++i) for (int j = L + 1; j <= R; ++j) ans = std::min(0ll + ans, 1ll * i * j % 2019); printf("%d\n", ans); return 0; }
#include <bits/stdc++.h> #define il inline #define vd void typedef long long ll; il ll gi() { ll x = 0, f = 1; char ch = getchar(); while (!isdigit(ch)) f ^= ch == '-', ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar(); return f ? x : -x; } int main() { #ifdef XZZSB freopen("in.in", "r", stdin); freopen("out.out", "w", stdout); #endif int L = gi(), R = gi(), ans = 2019; R = std::min(R, L + 2019 * 2); for (int i = L; i <= R; ++i) for (int j = i + 1; j <= R; ++j) ans = std::min(0ll + ans, 1ll * i * j % 2019); printf("%d\n", ans); return 0; }
[ "assignment.change", "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,587
791,586
u713368169
cpp
p02983
#include <bits/stdc++.h> #define fo(i, w, n) for (int i = (int)w; i < (int)n; i++) #define qi queue<int> #define vi vector<int> #define ll long long #define pb push_back #define lb lower_bound #define ub upper_bound #define pii pair<int, int> #define mp make_pair #define all(a) (a).begin(), (a).end() #define fi first #define se second #define prq priority_queue #define foreach(it, c) \ for (__typeof((c).begin()) it = c.begin(); it != c.end(); it++) using namespace std; inline ll read() { ll x = 0; int f = 1; char c = getchar(); for (; !isdigit(c); c = getchar()) if (c == '-') f = -f; for (; isdigit(c); c = getchar()) x = x * 10 + (c - '0'); return x * f; } int main() { // freopen("a.in","r",stdin); // freopen("a.out","w",stdout); int l, r, ans = 1e9; cin >> l >> r; fo(i, l, min(l + 2020, r + 1)) fo(j, l, min(l + 4040, r + 1)) if (i < j) ans = min(ans, (i % 2019) * (j % 2019)); cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define fo(i, w, n) for (int i = (int)w; i < (int)n; i++) #define qi queue<int> #define vi vector<int> #define ll long long #define pb push_back #define lb lower_bound #define ub upper_bound #define pii pair<int, int> #define mp make_pair #define all(a) (a).begin(), (a).end() #define fi first #define se second #define prq priority_queue #define foreach(it, c) \ for (__typeof((c).begin()) it = c.begin(); it != c.end(); it++) using namespace std; inline ll read() { ll x = 0; int f = 1; char c = getchar(); for (; !isdigit(c); c = getchar()) if (c == '-') f = -f; for (; isdigit(c); c = getchar()) x = x * 10 + (c - '0'); return x * f; } int main() { // freopen("a.in","r",stdin); // freopen("a.out","w",stdout); int l, r, ans = 1e9; cin >> l >> r; fo(i, l, min(l + 2020, r + 1)) fo(j, l, min(l + 4040, r + 1)) if (i < j) ans = min(ans, (i % 2019) * (j % 2019) % 2019); cout << ans << endl; return 0; }
[ "assignment.change" ]
791,601
791,602
u535589138
cpp
p02983
#pragma optimization_level 3 #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #include <bits/stdc++.h> #define F first #define S second #define vec vector #define ms multiset #define pb push_back #define pll pair<ll, ll> #define pdd pair<ld, ld> #define pq priority_queue #define umap unordered_map #define uset unordered_set #define pii pair<int, int> #define pnn pair<Node *, Node *> #define uid uniform_int_distribution #define FILE \ ifstream in("board.in"); \ ofstream out("board.out"); #define fast \ cin.tie(0); \ cout.tie(0); \ cin.sync_with_stdio(0); \ cout.sync_with_stdio(0); using namespace std; typedef string str; typedef long long ll; typedef long double ld; mt19937 rnd(chrono::steady_clock::now() .time_since_epoch() .count()); // uid<int> u1(5, 10); u1(rnd); int main() { fast; ll l, r, o = 30000; cin >> l >> r; for (int q = 0; q < 3000 && l < r; l++, q++) { for (ll w = 0, u = l + 1; w < 3000 && u <= r; w++, u++) o = min(o, (l % 2019) * (u % 2019)); } cout << o; }
#pragma optimization_level 3 #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #include <bits/stdc++.h> #define F first #define S second #define vec vector #define ms multiset #define pb push_back #define pll pair<ll, ll> #define pdd pair<ld, ld> #define pq priority_queue #define umap unordered_map #define uset unordered_set #define pii pair<int, int> #define pnn pair<Node *, Node *> #define uid uniform_int_distribution #define FILE \ ifstream in("board.in"); \ ofstream out("board.out"); #define fast \ cin.tie(0); \ cout.tie(0); \ cin.sync_with_stdio(0); \ cout.sync_with_stdio(0); using namespace std; typedef string str; typedef long long ll; typedef long double ld; mt19937 rnd(chrono::steady_clock::now() .time_since_epoch() .count()); // uid<int> u1(5, 10); u1(rnd); int main() { fast; ll l, r, o = 30000; cin >> l >> r; for (int q = 0; q < 3000 && l < r; l++, q++) { for (ll w = 0, u = l + 1; w < 3000 && u <= r; w++, u++) o = min(o, ((l % 2019) * (u % 2019)) % 2019); } cout << o; }
[ "call.arguments.change", "call.arguments.add" ]
791,605
791,606
u896034488
cpp
p02983
#pragma optimization_level 3 #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #include <bits/stdc++.h> #define F first #define S second #define vec vector #define ms multiset #define pb push_back #define pll pair<ll, ll> #define pdd pair<ld, ld> #define pq priority_queue #define umap unordered_map #define uset unordered_set #define pii pair<int, int> #define pnn pair<Node *, Node *> #define uid uniform_int_distribution #define FILE \ ifstream in("board.in"); \ ofstream out("board.out"); #define fast \ cin.tie(0); \ cout.tie(0); \ cin.sync_with_stdio(0); \ cout.sync_with_stdio(0); using namespace std; typedef string str; typedef long long ll; typedef long double ld; mt19937 rnd(chrono::steady_clock::now() .time_since_epoch() .count()); // uid<int> u1(5, 10); u1(rnd); int main() { fast; ll l, r, o = 30000; cin >> l >> r; for (int q = 0; q < 3000 && l < r; l++, q++) { for (int w = 0, u = l + 1; w < 3000 && u <= r; w++, u++) o = min(o, (l % 2019) * (u % 2019)); } cout << o; }
#pragma optimization_level 3 #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #include <bits/stdc++.h> #define F first #define S second #define vec vector #define ms multiset #define pb push_back #define pll pair<ll, ll> #define pdd pair<ld, ld> #define pq priority_queue #define umap unordered_map #define uset unordered_set #define pii pair<int, int> #define pnn pair<Node *, Node *> #define uid uniform_int_distribution #define FILE \ ifstream in("board.in"); \ ofstream out("board.out"); #define fast \ cin.tie(0); \ cout.tie(0); \ cin.sync_with_stdio(0); \ cout.sync_with_stdio(0); using namespace std; typedef string str; typedef long long ll; typedef long double ld; mt19937 rnd(chrono::steady_clock::now() .time_since_epoch() .count()); // uid<int> u1(5, 10); u1(rnd); int main() { fast; ll l, r, o = 30000; cin >> l >> r; for (int q = 0; q < 3000 && l < r; l++, q++) { for (ll w = 0, u = l + 1; w < 3000 && u <= r; w++, u++) o = min(o, ((l % 2019) * (u % 2019)) % 2019); } cout << o; }
[ "control_flow.loop.for.initializer.change", "variable_declaration.type.change", "call.arguments.change", "call.arguments.add" ]
791,607
791,606
u896034488
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll l, r; int main() { cin >> l >> r; if (r - l + 1 >= 2019) { cout << 0 << endl; return 0; } ll ans = 1e18; for (ll i = l; i <= r; i++) for (ll j = l + 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; ll l, r; int main() { cin >> l >> r; if (r - l + 1 >= 2019) { cout << 0 << endl; return 0; } ll ans = 1e18; for (ll i = l; i <= r; i++) for (ll j = i + 1; j <= r; j++) ans = min(ans, i * j % 2019); cout << ans << endl; return 0; }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,612
791,613
u011129112
cpp
p02983
#include <algorithm> #include <bitset> #include <cassert> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; void solve() { int l, r; cin >> l >> r; if (r - l <= 5000) { ll ret = 5050; for (int x = l; x <= r; x++) { for (ll y = l + 1; y <= r; y++) { ret = min(ret, (x * y) % 2019); } } cout << ret << "\n"; } else { cout << "0\n"; } } void casesolve() { int t; cin >> t; for (int i = 1; i <= t; i++) { cout << "Case #" << i << " "; solve(); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); solve(); // casesolve(); }
#include <algorithm> #include <bitset> #include <cassert> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; void solve() { int l, r; cin >> l >> r; if (r - l <= 5000) { ll ret = 5050; for (int x = l; x <= r; x++) { for (ll y = x + 1; y <= r; y++) { ret = min(ret, (x * y) % 2019); } } cout << ret << "\n"; } else { cout << "0\n"; } } void casesolve() { int t; cin >> t; for (int i = 1; i <= t; i++) { cout << "Case #" << i << " "; solve(); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); solve(); // casesolve(); }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,618
791,619
u109256064
cpp
p02983
#include <algorithm> #include <bitset> #include <cassert> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; void solve() { int l, r; cin >> l >> r; if (r - l <= 3000) { ll ret = 5050; for (int x = l; x <= r; x++) { for (ll y = l + 1; y <= r; y++) { ret = min(ret, (x * y) % 2019); } } cout << ret << "\n"; } else { cout << "0\n"; } } void casesolve() { int t; cin >> t; for (int i = 1; i <= t; i++) { cout << "Case #" << i << " "; solve(); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); solve(); // casesolve(); }
#include <algorithm> #include <bitset> #include <cassert> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; void solve() { int l, r; cin >> l >> r; if (r - l <= 5000) { ll ret = 5050; for (int x = l; x <= r; x++) { for (ll y = x + 1; y <= r; y++) { ret = min(ret, (x * y) % 2019); } } cout << ret << "\n"; } else { cout << "0\n"; } } void casesolve() { int t; cin >> t; for (int i = 1; i <= t; i++) { cout << "Case #" << i << " "; solve(); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); solve(); // casesolve(); }
[ "literal.number.change", "control_flow.branch.if.condition.change", "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,620
791,619
u109256064
cpp
p02983
#include <bits/stdc++.h> // this code is written by Itst using namespace std; int main() { int L, R; cin >> L >> R; if (R - L > 2019) { puts("0"); return 0; } long long Mn = 1e9; for (int i = L; i <= R; ++i) for (int j = L + 1; j <= R; ++j) Mn = min(Mn, 1ll * i * j % 2019); cout << Mn << endl; return 0; }
#include <bits/stdc++.h> // this code is written by Itst using namespace std; int main() { int L, R; cin >> L >> R; if (R - L > 2019) { puts("0"); return 0; } long long Mn = 1e9; for (int i = L; i <= R; ++i) for (int j = i + 1; j <= R; ++j) Mn = min(Mn, 1ll * i * j % 2019); cout << Mn << endl; return 0; }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,630
791,631
u563201135
cpp
p02983
#include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #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 long long ul; typedef unsigned int ui; const ll mod = 998244353; const ll INF = mod * mod; 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 pair<ll, ll> LP; typedef vector<int> vec; typedef vector<string> svec; typedef long double ld; typedef pair<ld, ld> LDP; const ld eps = 1e-8; void solve() { int l, r; cin >> l >> r; int d = (l + 2018) / 2019; d *= 2019; if (l <= d && d <= r) { cout << 0 << endl; return; } else { int ans = mod; Rep1(i, l, r) { Rep1(j, i + 1, r) { int le = i % 2019; int ri = j % 2019; ans = min(ans, le * ri) % 2019; } } cout << ans << endl; } } signed main() { ios::sync_with_stdio(false); cin.tie(0); // cout << fixed << setprecision(10); // init(); solve(); // stop return 0; }
#include <algorithm> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #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 long long ul; typedef unsigned int ui; const ll mod = 998244353; const ll INF = mod * mod; 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 pair<ll, ll> LP; typedef vector<int> vec; typedef vector<string> svec; typedef long double ld; typedef pair<ld, ld> LDP; const ld eps = 1e-8; void solve() { int l, r; cin >> l >> r; int d = (l + 2018) / 2019; d *= 2019; if (l <= d && d <= r) { cout << 0 << endl; return; } else { int ans = mod; Rep1(i, l, r) { Rep1(j, i + 1, r) { int le = i % 2019; int ri = j % 2019; ans = min(ans, le * ri % 2019); } } cout << ans << endl; } } signed main() { ios::sync_with_stdio(false); cin.tie(0); // cout << fixed << setprecision(10); // init(); solve(); // stop return 0; }
[ "call.arguments.change" ]
791,632
791,633
u294531924
cpp
p02983
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned int; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using tuplis = pair<ll, pll>; using tuplis2 = pair<pll, ll>; template <class T> using pq = priority_queue<T, vector<T>, greater<T>>; const ll LINF = 0x1fffffffffffffff; const ll MINF = numeric_limits<ll>::max() / 1000000000; const int INF = 0x3fffffff; const ll MOD = 1000000007; const ll MODD = 998244353; const ld DINF = numeric_limits<ld>::infinity(); const ld EPS = 1e-9; const vector<ll> four{0, 1, 0, -1, 0}; #define _overload4(_1, _2, _3, _4, name, ...) name #define _overload3(_1, _2, _3, name, ...) name #define _rep1(n) for (ll i = 0; i < n; ++i) #define _rep2(i, n) for (ll i = 0; i < n; ++i) #define _rep3(i, a, b) for (ll i = a; i < b; ++i) #define _rep4(i, a, b, c) for (ll i = a; i < b; i += c) #define rep(...) \ _overload4(__VA_ARGS__, _rep4, _rep3, _rep2, _rep1)(__VA_ARGS__) #define _rrep1(n) for (ll i = n - 1; i >= 0; i--) #define _rrep2(i, n) for (ll i = n - 1; i >= 0; i--) #define _rrep3(i, a, b) for (ll i = b - 1; i >= a; i--) #define _rrep4(i, a, b, c) for (ll i = a + (b - a - 1) / c * c; i >= a; i -= c) #define rrep(...) \ _overload4(__VA_ARGS__, _rrep4, _rrep3, _rrep2, _rrep1)(__VA_ARGS__) #define each(i, a) for (auto &i : a) #define sum(...) accumulate(range(__VA_ARGS__), 0LL) #define dsum(...) accumulate(range(__VA_ARGS__), double(0)) #define _range(i) (i).begin(), (i).end() #define _range2(i, k) (i).begin(), (i).begin() + k #define _range3(i, a, b) (i).begin() + a, (i).begin() + b #define range(...) \ _overload3(__VA_ARGS__, _range3, _range2, _range)(__VA_ARGS__) #define _rrange(i) (i).rbegin(), (i).rend() #define _rrange2(i, k) (i).rbegin(), (i).rbegin() + k #define _rrange3(i, a, b) (i).rbegin() + a, (i).rbegin() + b #define rrange(...) \ _overload3(__VA_ARGS__, _rrange3, _rrange2, _rrange)(__VA_ARGS__) #define elif else if #define unless(a) if (!(a)) #define fi first #define se second #define mp make_pair #define mt make_tuple #define INT(...) \ int __VA_ARGS__; \ in(__VA_ARGS__) #define LL(...) \ ll __VA_ARGS__; \ in(__VA_ARGS__) #define ULL(...) \ ull __VA_ARGS__; \ in(__VA_ARGS__) #define STR(...) \ string __VA_ARGS__; \ in(__VA_ARGS__) #define CHR(...) \ char __VA_ARGS__; \ in(__VA_ARGS__) #define DBL(...) \ double __VA_ARGS__; \ in(__VA_ARGS__) #define vec(type, name, ...) vector<type> name(__VA_ARGS__) #define VEC(type, name, size) \ vector<type> name(size); \ in(name) #define vv(type, name, h, ...) \ vector<vector<type>> name(h, vector<type>(__VA_ARGS__)) #define VV(type, name, h, ...) \ vector<vector<type>> name(h, vector<type>(__VA_ARGS__)); \ in(name) #define vvv(type, name, h, w, ...) \ vector<vector<vector<type>>> name( \ h, vector<vector<type>>(w, vector<type>(__VA_ARGS__))) inline constexpr ll gcd(ll a, ll b) { if (!a || !b) return 0; while (b) { ll c = b; b = a % b; a = c; } return a; } inline constexpr ll lcm(ll a, ll b) { if (!a || !b) return 0; return a * b / gcd(a, b); } template <class T> inline constexpr T min(vector<T> &v) { return *min_element(range(v)); } inline char min(string &v) { return *min_element(range(v)); } template <class T> inline constexpr T max(vector<T> &v) { return *max_element(range(v)); } inline char max(string &v) { return *max_element(range(v)); } inline constexpr ll intpow(ll a, ll b) { ll ans = 1; for (ll i = 1; b; i *= 2) { if (b & i) { b ^= i; ans *= a; } a *= a; } return ans; } inline constexpr ll modpow(ll a, ll b, ll mod = MOD) { ll ans = 1; for (ll i = 1; b; i *= 2) { if (b & i) { b ^= i; ans *= a; ans %= mod; } a *= a; a %= mod; } return ans; } template <typename T> inline constexpr bool chmin(T &mn, const T &cnt) { if (mn > cnt) { mn = cnt; return 1; } else return 0; } template <typename T> inline constexpr bool chmax(T &mx, const T &cnt) { if (mx < cnt) { mx = cnt; return 1; } else return 0; } template <class T> unordered_map<T, ll> press(vector<T> &a) { auto b = a; sort(range(b)); b.erase(unique(range(b)), b.end()); unordered_map<T, ll> ans; rep(b.size()) ans[b[i]] = i; each(i, a) i = ans[i]; return ans; } template <class T> map<T, ll> press_map(vector<T> &a) { auto b = a; sort(range(b)); b.erase(unique(range(b)), b.end()); map<T, ll> ans; rep(b.size()) ans[b[i]] = i; each(i, a) i = ans[i]; return ans; } inline int scan() { return getchar(); } inline void scan(int &a) { scanf("%d", &a); } inline void scan(unsigned &a) { scanf("%u", &a); } inline void scan(long &a) { scanf("%ld", &a); } inline void scan(long long &a) { scanf("%lld", &a); } inline void scan(unsigned long long &a) { scanf("%llu", &a); } inline void scan(char &a) { cin >> a; } inline void scan(float &a) { scanf("%f", &a); } inline void scan(double &a) { scanf("%lf", &a); } inline void scan(long double &a) { scanf("%Lf", &a); } inline void scan(vector<bool> &vec) { for (unsigned i = 0; i < vec.size(); i++) { int a; scan(a); vec[i] = a; } } inline void scan(string &a) { cin >> a; } template <class T> inline void scan(vector<T> &vec); template <class T, size_t size> inline void scan(array<T, size> &vec); template <class T, class L> inline void scan(pair<T, L> &p); template <class T, size_t size> inline void scan(T (&vec)[size]); template <class T> inline void scan(vector<T> &vec) { for (auto &i : vec) scan(i); } template <class T, size_t size> inline void scan(array<T, size> &vec) { for (auto &i : vec) scan(i); } template <class T, class L> inline void scan(pair<T, L> &p) { scan(p.first); scan(p.second); } template <class T, size_t size> inline void scan(T (&vec)[size]) { for (auto &i : vec) scan(i); } template <class T> inline void scan(T &a) { cin >> a; } inline void in() {} template <class Head, class... Tail> inline void in(Head &head, Tail &...tail) { scan(head); in(tail...); } inline void print() { putchar('\n'); } inline void print(const bool &a) { printf("%d", a); } inline void print(const int &a) { printf("%d", a); } inline void print(const unsigned &a) { printf("%u", a); } inline void print(const long &a) { printf("%ld", a); } inline void print(const long long &a) { printf("%lld", a); } inline void print(const unsigned long long &a) { printf("%llu", a); } inline void print(const char &a) { printf("%c", a); } inline void print(const char a[]) { printf("%s", a); } inline void print(const float &a) { printf("%.10f", a); } inline void print(const double &a) { printf("%.10f", a); } inline void print(const long double &a) { printf("%.10Lf", a); } template <class T> void print(const vector<T> &vec); template <class T, size_t size> void print(const array<T, size> &vec); template <class T, class L> void print(const pair<T, L> &p); template <class T, size_t size> inline void print(const T (&vec)[size]); template <class T> void print(const vector<T> &vec) { print(vec[0]); for (auto i = vec.begin(); ++i != vec.end();) { putchar(' '); print(*i); } } template <class T, size_t size> void print(const array<T, size> &vec) { print(vec[0]); for (auto i = vec.begin(); ++i != vec.end();) { putchar(' '); print(*i); } } template <class T, class L> void print(const pair<T, L> &p) { print(p.first); putchar(' '); print(p.second); } template <class T, size_t size> inline void print(const T (&vec)[size]) { print(vec[0]); for (auto i = vec; ++i != end(vec);) { putchar(' '); print(*i); } } template <class T> inline void print(const T &a) { cout << a; } inline int out() { putchar('\n'); return 0; } template <class T> inline int out(const T &t) { print(t); putchar('\n'); return 0; } template <class Head, class... Tail> inline int out(const Head &head, const Tail &...tail) { print(head); putchar(' '); out(tail...); return 0; } template <class T> inline void err(T t) { cerr << t << '\n'; } inline void err() { cerr << '\n'; } inline int first(const bool &i) { return out(i ? "first" : "second"); } inline int yes(const bool &i) { return out(i ? "yes" : "no"); } inline int Yes(const bool &i) { return out(i ? "Yes" : "No"); } inline int YES(const bool &i) { return out(i ? "YES" : "NO"); } inline int Yay(const bool &i) { return out(i ? "Yay!" : ":("); } inline int Possible(const bool &i) { return out(i ? "Possible" : "Impossible"); } inline int POSSIBLE(const bool &i) { return out(i ? "POSSIBLE" : "IMPOSSIBLE"); } inline void Case(ll i) { printf("Case #%lld: ", i); } int main() { LL(l, r); if (r - l + 1 >= 2019) return out(0); ll ans = LINF; rep(i, l, r + 1) rep(j, l, r + 1) chmin(ans, i * j % 2019); out(ans); }
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned int; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using tuplis = pair<ll, pll>; using tuplis2 = pair<pll, ll>; template <class T> using pq = priority_queue<T, vector<T>, greater<T>>; const ll LINF = 0x1fffffffffffffff; const ll MINF = numeric_limits<ll>::max() / 1000000000; const int INF = 0x3fffffff; const ll MOD = 1000000007; const ll MODD = 998244353; const ld DINF = numeric_limits<ld>::infinity(); const ld EPS = 1e-9; const vector<ll> four{0, 1, 0, -1, 0}; #define _overload4(_1, _2, _3, _4, name, ...) name #define _overload3(_1, _2, _3, name, ...) name #define _rep1(n) for (ll i = 0; i < n; ++i) #define _rep2(i, n) for (ll i = 0; i < n; ++i) #define _rep3(i, a, b) for (ll i = a; i < b; ++i) #define _rep4(i, a, b, c) for (ll i = a; i < b; i += c) #define rep(...) \ _overload4(__VA_ARGS__, _rep4, _rep3, _rep2, _rep1)(__VA_ARGS__) #define _rrep1(n) for (ll i = n - 1; i >= 0; i--) #define _rrep2(i, n) for (ll i = n - 1; i >= 0; i--) #define _rrep3(i, a, b) for (ll i = b - 1; i >= a; i--) #define _rrep4(i, a, b, c) for (ll i = a + (b - a - 1) / c * c; i >= a; i -= c) #define rrep(...) \ _overload4(__VA_ARGS__, _rrep4, _rrep3, _rrep2, _rrep1)(__VA_ARGS__) #define each(i, a) for (auto &i : a) #define sum(...) accumulate(range(__VA_ARGS__), 0LL) #define dsum(...) accumulate(range(__VA_ARGS__), double(0)) #define _range(i) (i).begin(), (i).end() #define _range2(i, k) (i).begin(), (i).begin() + k #define _range3(i, a, b) (i).begin() + a, (i).begin() + b #define range(...) \ _overload3(__VA_ARGS__, _range3, _range2, _range)(__VA_ARGS__) #define _rrange(i) (i).rbegin(), (i).rend() #define _rrange2(i, k) (i).rbegin(), (i).rbegin() + k #define _rrange3(i, a, b) (i).rbegin() + a, (i).rbegin() + b #define rrange(...) \ _overload3(__VA_ARGS__, _rrange3, _rrange2, _rrange)(__VA_ARGS__) #define elif else if #define unless(a) if (!(a)) #define fi first #define se second #define mp make_pair #define mt make_tuple #define INT(...) \ int __VA_ARGS__; \ in(__VA_ARGS__) #define LL(...) \ ll __VA_ARGS__; \ in(__VA_ARGS__) #define ULL(...) \ ull __VA_ARGS__; \ in(__VA_ARGS__) #define STR(...) \ string __VA_ARGS__; \ in(__VA_ARGS__) #define CHR(...) \ char __VA_ARGS__; \ in(__VA_ARGS__) #define DBL(...) \ double __VA_ARGS__; \ in(__VA_ARGS__) #define vec(type, name, ...) vector<type> name(__VA_ARGS__) #define VEC(type, name, size) \ vector<type> name(size); \ in(name) #define vv(type, name, h, ...) \ vector<vector<type>> name(h, vector<type>(__VA_ARGS__)) #define VV(type, name, h, ...) \ vector<vector<type>> name(h, vector<type>(__VA_ARGS__)); \ in(name) #define vvv(type, name, h, w, ...) \ vector<vector<vector<type>>> name( \ h, vector<vector<type>>(w, vector<type>(__VA_ARGS__))) inline constexpr ll gcd(ll a, ll b) { if (!a || !b) return 0; while (b) { ll c = b; b = a % b; a = c; } return a; } inline constexpr ll lcm(ll a, ll b) { if (!a || !b) return 0; return a * b / gcd(a, b); } template <class T> inline constexpr T min(vector<T> &v) { return *min_element(range(v)); } inline char min(string &v) { return *min_element(range(v)); } template <class T> inline constexpr T max(vector<T> &v) { return *max_element(range(v)); } inline char max(string &v) { return *max_element(range(v)); } inline constexpr ll intpow(ll a, ll b) { ll ans = 1; for (ll i = 1; b; i *= 2) { if (b & i) { b ^= i; ans *= a; } a *= a; } return ans; } inline constexpr ll modpow(ll a, ll b, ll mod = MOD) { ll ans = 1; for (ll i = 1; b; i *= 2) { if (b & i) { b ^= i; ans *= a; ans %= mod; } a *= a; a %= mod; } return ans; } template <typename T> inline constexpr bool chmin(T &mn, const T &cnt) { if (mn > cnt) { mn = cnt; return 1; } else return 0; } template <typename T> inline constexpr bool chmax(T &mx, const T &cnt) { if (mx < cnt) { mx = cnt; return 1; } else return 0; } template <class T> unordered_map<T, ll> press(vector<T> &a) { auto b = a; sort(range(b)); b.erase(unique(range(b)), b.end()); unordered_map<T, ll> ans; rep(b.size()) ans[b[i]] = i; each(i, a) i = ans[i]; return ans; } template <class T> map<T, ll> press_map(vector<T> &a) { auto b = a; sort(range(b)); b.erase(unique(range(b)), b.end()); map<T, ll> ans; rep(b.size()) ans[b[i]] = i; each(i, a) i = ans[i]; return ans; } inline int scan() { return getchar(); } inline void scan(int &a) { scanf("%d", &a); } inline void scan(unsigned &a) { scanf("%u", &a); } inline void scan(long &a) { scanf("%ld", &a); } inline void scan(long long &a) { scanf("%lld", &a); } inline void scan(unsigned long long &a) { scanf("%llu", &a); } inline void scan(char &a) { cin >> a; } inline void scan(float &a) { scanf("%f", &a); } inline void scan(double &a) { scanf("%lf", &a); } inline void scan(long double &a) { scanf("%Lf", &a); } inline void scan(vector<bool> &vec) { for (unsigned i = 0; i < vec.size(); i++) { int a; scan(a); vec[i] = a; } } inline void scan(string &a) { cin >> a; } template <class T> inline void scan(vector<T> &vec); template <class T, size_t size> inline void scan(array<T, size> &vec); template <class T, class L> inline void scan(pair<T, L> &p); template <class T, size_t size> inline void scan(T (&vec)[size]); template <class T> inline void scan(vector<T> &vec) { for (auto &i : vec) scan(i); } template <class T, size_t size> inline void scan(array<T, size> &vec) { for (auto &i : vec) scan(i); } template <class T, class L> inline void scan(pair<T, L> &p) { scan(p.first); scan(p.second); } template <class T, size_t size> inline void scan(T (&vec)[size]) { for (auto &i : vec) scan(i); } template <class T> inline void scan(T &a) { cin >> a; } inline void in() {} template <class Head, class... Tail> inline void in(Head &head, Tail &...tail) { scan(head); in(tail...); } inline void print() { putchar('\n'); } inline void print(const bool &a) { printf("%d", a); } inline void print(const int &a) { printf("%d", a); } inline void print(const unsigned &a) { printf("%u", a); } inline void print(const long &a) { printf("%ld", a); } inline void print(const long long &a) { printf("%lld", a); } inline void print(const unsigned long long &a) { printf("%llu", a); } inline void print(const char &a) { printf("%c", a); } inline void print(const char a[]) { printf("%s", a); } inline void print(const float &a) { printf("%.10f", a); } inline void print(const double &a) { printf("%.10f", a); } inline void print(const long double &a) { printf("%.10Lf", a); } template <class T> void print(const vector<T> &vec); template <class T, size_t size> void print(const array<T, size> &vec); template <class T, class L> void print(const pair<T, L> &p); template <class T, size_t size> inline void print(const T (&vec)[size]); template <class T> void print(const vector<T> &vec) { print(vec[0]); for (auto i = vec.begin(); ++i != vec.end();) { putchar(' '); print(*i); } } template <class T, size_t size> void print(const array<T, size> &vec) { print(vec[0]); for (auto i = vec.begin(); ++i != vec.end();) { putchar(' '); print(*i); } } template <class T, class L> void print(const pair<T, L> &p) { print(p.first); putchar(' '); print(p.second); } template <class T, size_t size> inline void print(const T (&vec)[size]) { print(vec[0]); for (auto i = vec; ++i != end(vec);) { putchar(' '); print(*i); } } template <class T> inline void print(const T &a) { cout << a; } inline int out() { putchar('\n'); return 0; } template <class T> inline int out(const T &t) { print(t); putchar('\n'); return 0; } template <class Head, class... Tail> inline int out(const Head &head, const Tail &...tail) { print(head); putchar(' '); out(tail...); return 0; } template <class T> inline void err(T t) { cerr << t << '\n'; } inline void err() { cerr << '\n'; } inline int first(const bool &i) { return out(i ? "first" : "second"); } inline int yes(const bool &i) { return out(i ? "yes" : "no"); } inline int Yes(const bool &i) { return out(i ? "Yes" : "No"); } inline int YES(const bool &i) { return out(i ? "YES" : "NO"); } inline int Yay(const bool &i) { return out(i ? "Yay!" : ":("); } inline int Possible(const bool &i) { return out(i ? "Possible" : "Impossible"); } inline int POSSIBLE(const bool &i) { return out(i ? "POSSIBLE" : "IMPOSSIBLE"); } inline void Case(ll i) { printf("Case #%lld: ", i); } int main() { LL(l, r); if (r - l + 1 >= 2019) return out(0); ll ans = LINF; rep(i, l, r + 1) rep(j, i + 1, r + 1) chmin(ans, i * j % 2019); out(ans); }
[ "call.arguments.change" ]
791,636
791,637
u874644572
cpp
p02983
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> using std::cerr; using std::cin; using std::cout; using std::endl; using std::bitset; using std::complex; using std::deque; using std::iterator; using std::map; using std::multimap; using std::multiset; using std::pair; using std::queue; using std::set; using std::stack; using std::string; using std::vector; using std::fill; using std::ios_base; using std::max_element; using std::min_element; using std::reverse; using std::sort; using std::stable_sort; using std::swap; using std::unique; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<long long> vl; typedef string S; typedef complex<double> cd; inline ll max(ll a, ll b) { if (a > b) return a; return b; } inline ll min(ll a, ll b) { if (a < b) return a; return b; } #define F(i, n) for (int(i) = 0; (i) != (n); (i)++) #define fi first #define se second #define re return #define all(x) (x).begin(), (x).end() const ll MOD = 1e9 + 7; ll n, m; ll L, R; ll ans = 1e9; int main() { ios_base::sync_with_stdio(); cin.tie(0); cout.tie(0); cin >> L >> R; for (ll i = L; i <= min(R, L + 2019); i++) { for (ll j = L; j <= min(R, L + 2019); j++) { ans = min(ans, i * j % 2019); } } cout << ans; }
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> using std::cerr; using std::cin; using std::cout; using std::endl; using std::bitset; using std::complex; using std::deque; using std::iterator; using std::map; using std::multimap; using std::multiset; using std::pair; using std::queue; using std::set; using std::stack; using std::string; using std::vector; using std::fill; using std::ios_base; using std::max_element; using std::min_element; using std::reverse; using std::sort; using std::stable_sort; using std::swap; using std::unique; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<long long> vl; typedef string S; typedef complex<double> cd; inline ll max(ll a, ll b) { if (a > b) return a; return b; } inline ll min(ll a, ll b) { if (a < b) return a; return b; } #define F(i, n) for (int(i) = 0; (i) != (n); (i)++) #define fi first #define se second #define re return #define all(x) (x).begin(), (x).end() const ll MOD = 1e9 + 7; ll n, m; ll L, R; ll ans = 1e9; int main() { ios_base::sync_with_stdio(); cin.tie(0); cout.tie(0); cin >> L >> R; for (ll i = L; i <= min(R, L + 2019); i++) { for (ll j = i + 1; j <= min(R, L + 2019); j++) { ans = min(ans, i * j % 2019); } } cout << ans; }
[ "control_flow.loop.for.initializer.change" ]
791,638
791,639
u798339690
cpp
p02983
#include <iostream> #include <math.h> #include <vector> using namespace std; const long long MOD = 2019; int main() { long long l, r; cin >> l >> r; // l*(l+1) ~ (r-1)*r long long ans = 0; long long tmp; if (r - l >= MOD || l == 0) { ans = 0; } else { for (long long i = l; i < r; ++i) { for (long long j = i + 1; j <= r; ++j) { if (i == l && j == i + 1) ans = ((i % MOD) * (j % MOD)) % MOD; else { tmp = ((i % MOD) * (j % MOD)) % MOD; if (ans > tmp) tmp = ans; } } } } cout << ans << endl; return 0; }
#include <iostream> #include <math.h> #include <vector> using namespace std; const long long MOD = 2019; int main() { long long l, r; cin >> l >> r; // l*(l+1) ~ (r-1)*r long long ans = 0; long long tmp; if (r - l >= MOD || l == 0) { ans = 0; } else { for (long long i = l; i < r; ++i) { for (long long j = i + 1; j <= r; ++j) { if (i == l && j == i + 1) ans = ((i % MOD) * (j % MOD)) % MOD; else { tmp = ((i % MOD) * (j % MOD)) % MOD; if (ans > tmp) ans = tmp; } } } } cout << ans << endl; return 0; }
[ "assignment.change" ]
791,640
791,641
u207460172
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF 99999999 #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { ll L, R; cin >> L >> R; if (R - L > 2019) cout << 0 << endl; else { ll ans = INF; for (ll i = L; i < R; i++) for (ll j = L; j <= R; j++) if (ans > (i * j) % 2019 && i > j) ans = (i * j) % 2019; cout << ans << endl; } }
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF 99999999 #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { ll L, R; cin >> L >> R; if (R - L > 2019) cout << 0 << endl; else { ll ans = INF; for (ll i = L; i < R; i++) for (ll j = L; j <= R; j++) if (ans > (i * j) % 2019 && i < j) ans = (i * j) % 2019; cout << ans << endl; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,642
791,643
u730271001
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF 99999999 #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { ll L, R; cin >> L >> R; if (R - L > 2019) cout << 0 << endl; else { ll ans = INF; for (ll i = L; i < R; i++) for (ll j = L; j < R; j++) if (ans > (i * j) % 2019 && i > j) ans = (i * j) % 2019; cout << ans << endl; } }
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF 99999999 #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { ll L, R; cin >> L >> R; if (R - L > 2019) cout << 0 << endl; else { ll ans = INF; for (ll i = L; i < R; i++) for (ll j = L; j <= R; j++) if (ans > (i * j) % 2019 && i < j) ans = (i * j) % 2019; cout << ans << endl; } }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "misc.opposites" ]
791,644
791,643
u730271001
cpp
p02983
#include <bits/stdc++.h> #define REP(i, n) for (ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for (ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF 1000000000000000 using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll, ll> p; constexpr int MOD = 1000000007; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } void print(const std::vector<int> &v) { std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; }); std::cout << std::endl; } int main() { long long L, R; cin >> L >> R; long long base = 2019; long long ll = L % base; long long rr = R % base; if (ll >= rr) { rr += base; } if (L - R >= 2019) { cout << 0 << endl; return 0; } // cout << l << r << endl; long long tmp = INF; for (int i = ll; i <= rr; i++) { for (int j = i + 1; j <= rr; j++) { long long p = (i * j) % base; if (tmp > p) { // cout << i << j << endl; tmp = p; } } } cout << tmp << endl; return 0; }
#include <bits/stdc++.h> #define REP(i, n) for (ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for (ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF 1000000000000000 using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll, ll> p; constexpr int MOD = 1000000007; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } void print(const std::vector<int> &v) { std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; }); std::cout << std::endl; } int main() { long long L, R; cin >> L >> R; long long base = 2019; long long ll = L % base; long long rr = R % base; if (ll >= rr) { rr += base; } if (R - L >= 2019) { cout << 0 << endl; return 0; } // cout << l << r << endl; long long tmp = INF; for (int i = ll; i <= rr; i++) { for (int j = i + 1; j <= rr; j++) { long long p = (i * j) % base; if (tmp > p) { // cout << i << j << endl; tmp = p; } } } cout << tmp << endl; return 0; }
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
791,647
791,648
u824337972
cpp
p02983
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; const ll MOD = 2019; int main() { int l, r; cin >> l >> r; ll ans = 2018; for (int i = l; i < min(r, l + 2019); i++) for (int j = i + 1; j < min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; const ll MOD = 2019; int main() { ll l, r; cin >> l >> r; ll ans = 2018; for (ll i = l; i <= min(r, l + 2019); i++) for (ll j = i + 1; j <= min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
[ "variable_declaration.type.change", "control_flow.loop.for.initializer.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
791,651
791,650
u052247353
cpp
p02983
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; ll const MOD = 2019; int main() { ll l, r; cin >> l >> r; ll ans; for (ll i = l; i <= min(r, l + 2019); i++) for (ll j = i + 1; j <= min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; const ll MOD = 2019; int main() { ll l, r; cin >> l >> r; ll ans = 2018; for (ll i = l; i <= min(r, l + 2019); i++) for (ll j = i + 1; j <= min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
[ "variable_declaration.value.change" ]
791,652
791,650
u052247353
cpp
p02983
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; ll const MOD = 2019; int main() { ll l, r; cin >> l >> r; ll ans; for (ll i = l; i <= min(r, l + 2019); i++) for (ll j = i + 1; j <= min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; ll const MOD = 2019; int main() { ll l, r; cin >> l >> r; ll ans = 2018; for (ll i = l; i <= min(r, l + 2019); i++) for (ll j = i + 1; j <= min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
[ "variable_declaration.value.change" ]
791,652
791,653
u052247353
cpp
p02983
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; ll const MOD = 2019; int main() { ll l, r; cin >> l >> r; ll ans; for (ll i = l; i <= min(r, l + 2019); i++) for (ll j = l; j <= min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; ll const MOD = 2019; int main() { ll l, r; cin >> l >> r; ll ans = 2018; for (ll i = l; i <= min(r, l + 2019); i++) for (ll j = i + 1; j <= min(r, l + 2019); j++) ans = min(ans, (i * j) % MOD); cout << ans << endl; return 0; }
[ "variable_declaration.value.change", "control_flow.loop.for.initializer.change" ]
791,654
791,653
u052247353
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long signed int LL; typedef long long unsigned int LU; #define incID(i, l, r) for (LL i = (l); i < (r); ++i) #define incII(i, l, r) for (LL i = (l); i <= (r); ++i) #define decID(i, l, r) for (LL i = (r)-1; i >= (l); --i) #define decII(i, l, r) for (LL i = (r); i >= (l); --i) #define inc(i, n) incID(i, 0, n) #define inc1(i, n) incII(i, 1, n) #define dec(i, n) decID(i, 0, n) #define dec1(i, n) decII(i, 1, n) #define inID(v, l, r) ((l) <= (v) && (v) < (r)) #define inII(v, l, r) ((l) <= (v) && (v) <= (r)) #define PB push_back #define EB emplace_back #define MP make_pair #define FI first #define SE second #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() template <typename T> bool setmin(T &a, T b) { if (b < a) { a = b; return true; } else { return false; } } template <typename T> bool setmax(T &a, T b) { if (b > a) { a = b; return true; } else { return false; } } template <typename T> bool setmineq(T &a, T b) { if (b <= a) { a = b; return true; } else { return false; } } template <typename T> bool setmaxeq(T &a, T b) { if (b >= a) { a = b; return true; } else { return false; } } LL mo(LL a, LL b) { assert(b > 0); a %= b; if (a < 0) { a += b; } return a; } LL fl(LL a, LL b) { assert(b > 0); return (a > 0 ? a / b : (a - b + 1) / b); } LL ce(LL a, LL b) { assert(b > 0); return (a < 0 ? a / b : (a + b - 1) / b); } template <typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } #define bit(b, i) (((b) >> (i)) & 1) #define BC __builtin_popcountll #define SC static_cast #define SI(v) SC<int>(v.size()) #define SL(v) SC<LL>(v.size()) #define RF(e, v) for (auto &e : v) #define ef else if #define UR assert(false) // ---- ---- LL cmCI(LL l, LL r, LL m, LL a) { assert(m > 0); return max(0LL, fl(r - a, m) - fl(l - a, m)); } LL cmCD(LL l, LL r, LL m, LL a) { return cmCI(l, r - 1, m, a); } LL cmII(LL l, LL r, LL m, LL a) { return cmCI(l - 1, r, m, a); } LL cmID(LL l, LL r, LL m, LL a) { return cmCI(l - 1, r - 1, m, a); } LL l, r; int main() { cin >> l >> r; if (cmII(l, r, 2019, 0) > 0) { cout << 0 << endl; } else { LL mi = l * l; incII(i, l, r) { incID(j, l, i) { setmin(mi, i * j % 2019); } } cout << mi << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long signed int LL; typedef long long unsigned int LU; #define incID(i, l, r) for (LL i = (l); i < (r); ++i) #define incII(i, l, r) for (LL i = (l); i <= (r); ++i) #define decID(i, l, r) for (LL i = (r)-1; i >= (l); --i) #define decII(i, l, r) for (LL i = (r); i >= (l); --i) #define inc(i, n) incID(i, 0, n) #define inc1(i, n) incII(i, 1, n) #define dec(i, n) decID(i, 0, n) #define dec1(i, n) decII(i, 1, n) #define inID(v, l, r) ((l) <= (v) && (v) < (r)) #define inII(v, l, r) ((l) <= (v) && (v) <= (r)) #define PB push_back #define EB emplace_back #define MP make_pair #define FI first #define SE second #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() template <typename T> bool setmin(T &a, T b) { if (b < a) { a = b; return true; } else { return false; } } template <typename T> bool setmax(T &a, T b) { if (b > a) { a = b; return true; } else { return false; } } template <typename T> bool setmineq(T &a, T b) { if (b <= a) { a = b; return true; } else { return false; } } template <typename T> bool setmaxeq(T &a, T b) { if (b >= a) { a = b; return true; } else { return false; } } LL mo(LL a, LL b) { assert(b > 0); a %= b; if (a < 0) { a += b; } return a; } LL fl(LL a, LL b) { assert(b > 0); return (a > 0 ? a / b : (a - b + 1) / b); } LL ce(LL a, LL b) { assert(b > 0); return (a < 0 ? a / b : (a + b - 1) / b); } template <typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } #define bit(b, i) (((b) >> (i)) & 1) #define BC __builtin_popcountll #define SC static_cast #define SI(v) SC<int>(v.size()) #define SL(v) SC<LL>(v.size()) #define RF(e, v) for (auto &e : v) #define ef else if #define UR assert(false) // ---- ---- LL cmCI(LL l, LL r, LL m, LL a) { assert(m > 0); return max(0LL, fl(r - a, m) - fl(l - a, m)); } LL cmCD(LL l, LL r, LL m, LL a) { return cmCI(l, r - 1, m, a); } LL cmII(LL l, LL r, LL m, LL a) { return cmCI(l - 1, r, m, a); } LL cmID(LL l, LL r, LL m, LL a) { return cmCI(l - 1, r - 1, m, a); } LL l, r; int main() { cin >> l >> r; if (cmII(l, r, 2019, 0) > 0) { cout << 0 << endl; } else { LL mi = l * r; incII(i, l, r) { incID(j, l, i) { setmin(mi, i * j % 2019); } } cout << mi << endl; } return 0; }
[ "identifier.change", "expression.operation.binary.change" ]
791,662
791,663
u568652083
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, big = 2020, minn; cin >> a >> b; for (long long int i = a; i <= b; i++) { for (long long int j = i + 1; j <= b; j++) { minn = min(minn, (i * j) % 2019); if (minn == 0) { cout << 0; return 0; } } } cout << minn; }
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, big = 2020, minn = 10000; cin >> a >> b; for (long long int i = a; i <= b; i++) { for (long long int j = i + 1; j <= b; j++) { minn = min(minn, (i * j) % 2019); if (minn == 0) { cout << 0; return 0; } } } cout << minn; }
[ "variable_declaration.value.change" ]
791,683
791,684
u368383065
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, big = 2019, minn; cin >> a >> b; for (long long int i = a; i <= b; i++) { for (long long int j = i + 1; j <= b; j++) { minn = min(minn, (i * j) % 2019); if (minn == 0) { cout << 0; return 0; } } } cout << minn; }
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, big = 2020, minn = 10000; cin >> a >> b; for (long long int i = a; i <= b; i++) { for (long long int j = i + 1; j <= b; j++) { minn = min(minn, (i * j) % 2019); if (minn == 0) { cout << 0; return 0; } } } cout << minn; }
[ "literal.number.change", "variable_declaration.value.change" ]
791,685
791,684
u368383065
cpp
p02983
#ifdef loc #include "codes/loc_debug.h" #else #include <bits/stdc++.h> #define pr(...) #define pra(a, n) #define praa(a, n, m) #define prl() #endif using namespace std; typedef long long ll; #define rep(i, begin, end) \ for (__typeof(end) i = (begin) - ((begin) > (end)); \ i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) #define sz(a) int(a.size()) const int N = 100005; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int l, r; cin >> l >> r; if (r - l < 3000) { cout << 0 << endl; } else { int res = 3000; rep(i, l, r) { rep(j, i + 1, r + 1) { res = min(res, int((i * (ll)j) % 2019)); } } cout << res << endl; } }
#ifdef loc #include "codes/loc_debug.h" #else #include <bits/stdc++.h> #define pr(...) #define pra(a, n) #define praa(a, n, m) #define prl() #endif using namespace std; typedef long long ll; #define rep(i, begin, end) \ for (__typeof(end) i = (begin) - ((begin) > (end)); \ i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) #define sz(a) int(a.size()) const int N = 100005; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int l, r; cin >> l >> r; if (r - l > 3000) { cout << 0 << endl; } else { int res = 3000; rep(i, l, r) { rep(j, i + 1, r + 1) { res = min(res, int((i * (ll)j) % 2019)); } } cout << res << endl; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,694
791,695
u393245399
cpp
p02983
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; int main() { ll L, R; cin >> L >> R; ll result = 2020; for (ll i = L; i < min(R, L + 2019); ++i) { for (ll j = i + 1; j < min(R, L + 2019); ++j) { result = min(result, (i * j) % 2019); } } cout << result << endl; }
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; int main() { ll L, R; cin >> L >> R; ll result = 2020; for (ll i = L; i < min(R, L + 2019); ++i) { for (ll j = i + 1; j <= min(R, L + 2019); ++j) { result = min(result, (i * j) % 2019); } } cout << result << endl; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
791,698
791,699
u207665007
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD = 1000000007; ll MOD1 = 2019; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { ll L, R, mi = 1LL << 60; cin >> L >> R; if (R - L >= 2019) { cout << 0 << endl; } else { for (ll i = L; i < R; i++) { for (ll j = i + 1; j <= R; j++) { chmin(mi, i * j % 2019); } } } cout << mi << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD = 1000000007; ll MOD1 = 2019; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { ll L, R, mi = 1LL << 60; cin >> L >> R; if (R - L >= 2019) { cout << 0 << endl; return 0; } else { for (ll i = L; i < R; i++) { for (ll j = i + 1; j <= R; j++) { mi = min(mi, i * j % 2019); } } } cout << mi << endl; return 0; }
[ "control_flow.return.add", "control_flow.return.0.add", "assignment.variable.change", "assignment.change", "assignment.add" ]
791,702
791,703
u831873811
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD = 1000000007; ll MOD1 = 2019; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { ll L, R, mi = 1LL << 60; cin >> L >> R; if (R - L > 2019) { cout << 0 << endl; } else { for (ll i = L; i < R; i++) { for (ll j = i + 1; j <= R; j++) { chmin(mi, i * j % 2019); } } } cout << mi << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD = 1000000007; ll MOD1 = 2019; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { ll L, R, mi = 1LL << 60; cin >> L >> R; if (R - L >= 2019) { cout << 0 << endl; return 0; } else { for (ll i = L; i < R; i++) { for (ll j = i + 1; j <= R; j++) { chmin(mi, i * j % 2019); } } } cout << mi << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.return.add", "control_flow.return.0.add" ]
791,706
791,707
u831873811
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD = 1000000007; ll MOD1 = 2019; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { ll L, R, mi = 1LL << 60; cin >> L >> R; if (R - L >= 2019) { cout << 0 << endl; } else { for (ll i = L; i < R; i++) { for (ll j = i + 1; j <= R; j++) { chmin(mi, i * j % 2019); } } } cout << mi << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD = 1000000007; ll MOD1 = 2019; template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; } int main() { ll L, R, mi = 1LL << 60; cin >> L >> R; if (R - L > 2019) { cout << 0 << endl; return 0; } else { for (ll i = L; i < R; i++) { for (ll j = i + 1; j <= R; j++) { chmin(mi, i * j % 2019); } } } cout << mi << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.return.add", "control_flow.return.0.add" ]
791,702
791,709
u831873811
cpp
p02983
#include <bits/stdc++.h> //#define int long long using namespace std; typedef long long ll; const int N = 5 * (1e5) + 5; int main() { ios::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; int mn = 2019; if (l - r + 1 >= 2019) { cout << 0; return 0; } l = l % 2019; r = r % 2019; if (l >= r || l == 0) { cout << 0; return 0; } for (int i = l; i < r; ++i) for (int j = i + 1; j <= r; ++j) mn = min(mn, (i * j) % 2019); cout << mn; return 0; }
#include <bits/stdc++.h> //#define int long long using namespace std; typedef long long ll; const int N = 5 * (1e5) + 5; int main() { ios::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; int mn = 2019; if (r - l + 1 >= 2019) { cout << 0; return 0; } l = l % 2019; r = r % 2019; if (l >= r || l == 0) { cout << 0; return 0; } for (int i = l; i < r; ++i) for (int j = i + 1; j <= r; ++j) mn = min(mn, (i * j) % 2019); cout << mn; return 0; }
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
791,712
791,713
u887528589
cpp
p02983
#include <bits/stdc++.h> //#define int long long using namespace std; typedef long long ll; const int N = 5 * (1e5) + 5; int main() { ios::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; int mn = 2019; if (l - r >= 2019) { cout << 0; return 0; } l = l % 2019; r = r % 2019; if (l >= r || l == 0) { cout << 0; return 0; } for (int i = l; i < r; ++i) for (int j = i + 1; j <= r; ++j) mn = min(mn, (i * j) % 2019); cout << mn; return 0; }
#include <bits/stdc++.h> //#define int long long using namespace std; typedef long long ll; const int N = 5 * (1e5) + 5; int main() { ios::sync_with_stdio(false); cin.tie(0); int l, r; cin >> l >> r; int mn = 2019; if (r - l + 1 >= 2019) { cout << 0; return 0; } l = l % 2019; r = r % 2019; if (l >= r || l == 0) { cout << 0; return 0; } for (int i = l; i < r; ++i) for (int j = i + 1; j <= r; ++j) mn = min(mn, (i * j) % 2019); cout << mn; return 0; }
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
791,714
791,713
u887528589
cpp
p02983
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> #define mod (long long int)(2019) #define pb push_back #define ll long long int using namespace std; typedef pair<int, int> pii; int main() { ll l, r; cin >> l >> r; if (r - l >= 673) { cout << 0 << endl; } ll res = l * (l + 1) % mod; for (ll i = l; i < r; i++) { for (ll j = i + 1; j <= r; j++) { res = min(res, (i * j) % mod); } } cout << res << endl; return 0; }
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> #define mod (long long int)(2019) #define pb push_back #define ll long long int using namespace std; typedef pair<int, int> pii; int main() { ll l, r; cin >> l >> r; if (r - l + 1 >= 2019) { cout << 0 << endl; return 0; } ll res = l * (l + 1) % mod; for (ll i = l; i < r; i++) { for (ll j = i + 1; j <= r; j++) { // if(res==0) break; res = min(res, (i * j) % mod); } } cout << res << endl; return 0; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.add", "literal.number.change", "control_flow.return.add", "control_flow.return.0.add" ]
791,715
791,716
u733823138
cpp
p02983
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> #define mod (long long int)(2019) #define pb push_back #define ll long long int using namespace std; typedef pair<int, int> pii; int main() { ll l, r; cin >> l >> r; if (r - l >= 2019) { cout << 0 << endl; } ll res = l * (l + 1) % mod; for (ll i = l; i < r; i++) { for (ll j = i + 1; j <= r; j++) { res = min(res, (i * j) % mod); } } cout << res << endl; return 0; }
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> #define mod (long long int)(2019) #define pb push_back #define ll long long int using namespace std; typedef pair<int, int> pii; int main() { ll l, r; cin >> l >> r; if (r - l + 1 >= 2019) { cout << 0 << endl; return 0; } ll res = l * (l + 1) % mod; for (ll i = l; i < r; i++) { for (ll j = i + 1; j <= r; j++) { // if(res==0) break; res = min(res, (i * j) % mod); } } cout << res << endl; return 0; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.add", "control_flow.return.add", "control_flow.return.0.add" ]
791,717
791,716
u733823138
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll l, r, ans; cin >> l >> r; if (r - l > 2019) { ans = 0; } else { ll i, j; ans = 2020; int f = 0; for (i = l; i < r; i++) { for (j = i + 1; j <= r; j++) { if ((i * j) % 2019 < ans) ans = (i * j) % 2019; if (ans == 0) f = 1; break; } if (f == 1) break; } } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll l, r, ans; cin >> l >> r; if (r - l >= 2018) { ans = 0; } else { ll i, j; ans = 2020; int f = 0; for (i = l; i < r; i++) { for (j = i + 1; j <= r; j++) { if ((i * j) % 2019 < ans) ans = (i * j) % 2019; if (ans == 0) { f = 1; break; } } if (f == 1) break; } } cout << ans; return 0; }
[]
791,718
791,719
u228402731
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll l, r, ans; cin >> l >> r; if (r - l > 2019) { ans = 0; } else { ll i, j; ans = 2020; int f = 0; for (i = l; i < r; i++) { for (j = i + 1; j <= r; j++) { if ((i * j) % 2019 < ans) ans = (i * j) % 2019; if (ans == 0) f = 1; break; } if (f == 1) break; } } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll l, r, ans; cin >> l >> r; if (r - l >= 2019) { ans = 0; } else { ll i, j; ans = 2020; int f = 0; for (i = l; i < r; i++) { for (j = i + 1; j <= r; j++) { if ((i * j) % 2019 < ans) ans = (i * j) % 2019; if (ans == 0) { f = 1; break; } } if (f == 1) break; } } cout << ans; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,718
791,720
u228402731
cpp
p02983
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll l, r, ans; cin >> l >> r; if (r - l > 2019) { ans = 0; } else { ll i, j; ans = 2020; int f = 0; for (i = l; i < r; i++) { for (j = i + 1; j <= r; j++) { if ((i * j) % 2019 < ans) ans = (i * j) % 2019; if (ans == 0) f = 1; break; } if (f == 1) break; } } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll l, r, ans; cin >> l >> r; if (r - l > 2019) { ans = 0; } else { ll i, j; ans = 2020; int f = 0; for (i = l; i < r; i++) { for (j = i + 1; j <= r; j++) { if ((i * j) % 2019 < ans) ans = (i * j) % 2019; if (ans == 0) { f = 1; break; } } if (f == 1) break; } } cout << ans; return 0; }
[]
791,718
791,721
u228402731
cpp
p02983
#include <bits/stdc++.h> #include <string> #include <vector> #define int long long using namespace std; main() { // freopen("input.txt","rt",stdin); int l, r; cin >> l >> r; if (r - l + 1 >= 2019) { cout << "0" << endl; } else { int mi = 2019; for (int i = l; i < r; i++) { for (int j = i + 1; j < r; j++) { mi = min(mi, (i * j) % 2019); } } cout << mi << endl; } }
#include <bits/stdc++.h> #include <string> #include <vector> #define int long long using namespace std; main() { // freopen("input.txt","rt",stdin); int l, r; cin >> l >> r; if (r - l + 1 >= 2019) { cout << "0" << endl; } else { int mi = 2019; for (int i = l; i <= r; i++) { for (int j = i + 1; j <= r; j++) { mi = min(mi, (i * j) % 2019); } } cout << mi << endl; } }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
791,722
791,723
u217859995
cpp
p02983
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //------------------------------------------- template <class T> inline T sqr(T x) { return x * x; } // typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; // container util //------------------------------------------ #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define EXISTch(s, c) \ ((((s).find_first_of(c)) != std::string::npos) ? 1 : 0) // cがあれば1 if(1) #define SORT(c) sort((c).begin(), (c).end()) #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) // constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = (int)1000000007; const LL MOD = (LL)1000000007; // 10^9+7 const LL INF2 = (LL)100000000000000000; // 10^18 int main() { LL l, r; cin >> l >> r; LL ans = INF2; for (LL i = l; i < min(r + 1, l + 5000); i++) { for (LL j = l + 1; j < min(r + 1, l + 5000); j++) { LL tmp = (i * j) % 2019; ans = min(ans, tmp); } } cout << ans << endl; return 0; }
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //------------------------------------------- template <class T> inline T sqr(T x) { return x * x; } // typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; // container util //------------------------------------------ #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define EXISTch(s, c) \ ((((s).find_first_of(c)) != std::string::npos) ? 1 : 0) // cがあれば1 if(1) #define SORT(c) sort((c).begin(), (c).end()) #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) // constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = (int)1000000007; const LL MOD = (LL)1000000007; // 10^9+7 const LL INF2 = (LL)100000000000000000; // 10^18 int main() { LL l, r; cin >> l >> r; LL ans = INF2; for (LL i = l; i < min(r, l + 5000); i++) { for (LL j = l + 1; j < min(r + 1, l + 5000); j++) { LL tmp = (i * j) % 2019; ans = min(ans, tmp); } } cout << ans << endl; return 0; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
791,726
791,727
u874996917
cpp
p02983
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //------------------------------------------- template <class T> inline T sqr(T x) { return x * x; } // typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; // container util //------------------------------------------ #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define EXISTch(s, c) \ ((((s).find_first_of(c)) != std::string::npos) ? 1 : 0) // cがあれば1 if(1) #define SORT(c) sort((c).begin(), (c).end()) #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) // constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = (int)1000000007; const LL MOD = (LL)1000000007; // 10^9+7 const LL INF2 = (LL)100000000000000000; // 10^18 int main() { LL l, r; cin >> l >> r; LL ans = INF2; for (LL i = l; i < min(r, l + 5000); i++) { for (LL j = l + 1; j < min(r, l + 5000); j++) { LL tmp = (i * j) % 2019; ans = min(ans, tmp); } } cout << ans << endl; return 0; }
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //------------------------------------------- template <class T> inline T sqr(T x) { return x * x; } // typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; // container util //------------------------------------------ #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define EXISTch(s, c) \ ((((s).find_first_of(c)) != std::string::npos) ? 1 : 0) // cがあれば1 if(1) #define SORT(c) sort((c).begin(), (c).end()) #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) // constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = (int)1000000007; const LL MOD = (LL)1000000007; // 10^9+7 const LL INF2 = (LL)100000000000000000; // 10^18 int main() { LL l, r; cin >> l >> r; LL ans = INF2; for (LL i = l; i < min(r, l + 5000); i++) { for (LL j = l + 1; j < min(r + 1, l + 5000); j++) { LL tmp = (i * j) % 2019; ans = min(ans, tmp); } } cout << ans << endl; return 0; }
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
791,728
791,727
u874996917
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define MD 1000000007 #define INF 1ll << 60 typedef pair<ll, ll> P; template <typename T> std::string tostr(const T &t) { std::ostringstream os; os << t; return os.str(); } int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int main() { ll l, r; cin >> l >> r; ll a = l % 2019, b = r % 2019; if (r >= l + 2018 || b <= a) cout << 0 << endl; else { int mm = 1e9; for (int i = a; i < b; i++) { for (int j = i + 1; j <= b; j++) { mm = min(mm, (i * (i + 1)) % 2019); } } cout << mm << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define MD 1000000007 #define INF 1ll << 60 typedef pair<ll, ll> P; template <typename T> std::string tostr(const T &t) { std::ostringstream os; os << t; return os.str(); } int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int main() { ll l, r; cin >> l >> r; ll a = l % 2019, b = r % 2019; if (r >= l + 2018 || b <= a) cout << 0 << endl; else { int mm = 1e9; for (int i = a; i < b; i++) { for (int j = i + 1; j <= b; j++) { mm = min(mm, (i * j) % 2019); } } cout << mm << endl; } return 0; }
[ "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
791,732
791,733
u287060310
cpp
p02983
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define MD 1000000007 #define INF 1ll << 60 typedef pair<ll, ll> P; template <typename T> std::string tostr(const T &t) { std::ostringstream os; os << t; return os.str(); } int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int main() { ll l, r; cin >> l >> r; ll a = l % 2019, b = r % 2019; if (r >= l + 2018 || b <= a) cout << 0 << endl; else { int mm = 1e9; for (int i = a; i <= b; i++) { for (int j = i + 1; j <= b; j++) { mm = min(mm, (i * (i + 1)) % 2019); } } cout << mm << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define MD 1000000007 #define INF 1ll << 60 typedef pair<ll, ll> P; template <typename T> std::string tostr(const T &t) { std::ostringstream os; os << t; return os.str(); } int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int main() { ll l, r; cin >> l >> r; ll a = l % 2019, b = r % 2019; if (r >= l + 2018 || b <= a) cout << 0 << endl; else { int mm = 1e9; for (int i = a; i < b; i++) { for (int j = i + 1; j <= b; j++) { mm = min(mm, (i * j) % 2019); } } cout << mm << endl; } return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
791,734
791,733
u287060310
cpp
p02983
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, a) for (int i = (int)0; i < (int)a; ++i) #define pb push_back #define eb emplace_back #define mp make_pair #define fi first #define se second using ll = long long; static const ll mod = 1e9 + 7; static const ll INF = 1LL << 50; using namespace std; int main() { ll l, r; cin >> l >> r; ll ans = 2020; ll MOD = 2019; if (r - l >= 2019) ans = 0; else if (r % MOD <= l % MOD) ans = 0; else { for (ll i = l; i < r; ++i) { for (ll j = l + 1; j < r; ++j) { ans = min((i % MOD * j % MOD) % MOD, ans); } } } cout << ans << endl; }
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, a) for (int i = (int)0; i < (int)a; ++i) #define pb push_back #define eb emplace_back #define mp make_pair #define fi first #define se second using ll = long long; static const ll mod = 1e9 + 7; static const ll INF = 1LL << 50; using namespace std; int main() { ll l, r; cin >> l >> r; ll ans = 2020; ll MOD = 2019; if (r - l >= 2019) ans = 0; else if (r % MOD <= l % MOD) ans = 0; else { for (ll i = l; i < r; ++i) { for (ll j = l + 1; j <= r; ++j) { ans = min((i % MOD * j % MOD) % MOD, ans); ans %= MOD; } } } cout << ans << endl; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.add" ]
791,740
791,741
u698883164
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main() { int l, r; cin >> l >> r; if (l / 2019 != r / 2019) { cout << 0 << endl; return 0; } else { int mod_l = l % 2019, mod_r = r % 2019, result = 2019; for (int i = mod_l; i < mod_r - 1; i++) { for (int j = i + 1; j < mod_r + 1; j++) { int tmp = (i * j) % 2019; if (tmp < result) result = tmp; } } cout << result << endl; return 0; } }
#include <bits/stdc++.h> using namespace std; int main() { int l, r; cin >> l >> r; if (l / 2019 != r / 2019) { cout << 0 << endl; return 0; } else { int mod_l = l % 2019, mod_r = r % 2019, result = 2019; for (int i = mod_l; i < mod_r; i++) { for (int j = i + 1; j < mod_r + 1; j++) { int tmp = (i * j) % 2019; if (tmp < result) result = tmp; } } cout << result << endl; return 0; } }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
791,742
791,743
u040700157
cpp
p02983
#pragma region include #include "bits/stdc++.h" #define ALL(obj) (obj).begin(), (obj).end() #define RALL(obj) (obj).rbegin(), (obj).rend() #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPR(i, n) for (int i = (int)(n); i >= 0; i--) #define FOR(i, n, m) for (int i = (int)(n); i < int(m); i++) using namespace std; typedef long long ll; typedef pair<int, int> PII; const int MOD = 1e9 + 7; const int INF = 1e9; const ll LLINF = 4e18; void input() {} template <typename... R> void input(int &f, R &...r) { scanf("%d", &f); input(r...); } template <typename... R> void input(double &f, R &...r) { scanf("%lf", &f); input(r...); } template <typename... R> void input(ll &f, R &...r) { scanf("%lld", &f); input(r...); } template <typename... R> void input(char &f, R &...r) { scanf("%c", &f); input(r...); } template <typename T, typename... R> void input(vector<T> &f, R &...r) { REP(i, f.size()) input(f[i]); input(r...); } #pragma endregion int main() { ll L, R; input(L, R); if (L % 2019 == 0) { cout << 0 << endl; } else if (L / 2019 < R / 2019) { cout << 0 << endl; } else { int ans = 0; L %= 2019; R %= 2019; FOR(i, L, R) { FOR(j, i + 1, R + 1) { ans = min(ans, i * j % 2019); } } cout << ans << endl; } getchar(); getchar(); }
#pragma region include #include "bits/stdc++.h" #define ALL(obj) (obj).begin(), (obj).end() #define RALL(obj) (obj).rbegin(), (obj).rend() #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPR(i, n) for (int i = (int)(n); i >= 0; i--) #define FOR(i, n, m) for (int i = (int)(n); i < int(m); i++) using namespace std; typedef long long ll; typedef pair<int, int> PII; const int MOD = 1e9 + 7; const int INF = 1e9; const ll LLINF = 4e18; void input() {} template <typename... R> void input(int &f, R &...r) { scanf("%d", &f); input(r...); } template <typename... R> void input(double &f, R &...r) { scanf("%lf", &f); input(r...); } template <typename... R> void input(ll &f, R &...r) { scanf("%lld", &f); input(r...); } template <typename... R> void input(char &f, R &...r) { scanf("%c", &f); input(r...); } template <typename T, typename... R> void input(vector<T> &f, R &...r) { REP(i, f.size()) input(f[i]); input(r...); } #pragma endregion int main() { ll L, R; input(L, R); if (L % 2019 == 0) { cout << 0 << endl; } else if (L / 2019 < R / 2019) { cout << 0 << endl; } else { int ans = INF; L %= 2019; R %= 2019; FOR(i, L, R) { FOR(j, i + 1, R + 1) { ans = min(ans, i * j % 2019); } } cout << ans << endl; } getchar(); getchar(); }
[ "variable_declaration.value.change", "identifier.replace.add", "literal.replace.remove" ]
791,744
791,745
u165374901
cpp
p02983
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> using namespace std; #define int long long int MOD = 1000000007; signed main() { cin.tie(0); ios::sync_with_stdio(false); int L, R; cin >> L >> R; int l, r; l = L % 2019; r = R % 2019; int ans; int min = 2019; if (l >= r) { min = 0; } else { if (R >= 2019) { min = 0; } else { for (int i = l; i < r; i++) { for (int j = i + 1; j <= r; j++) { ans = (i * j) % 2019; if (min >= ans) { min = ans; } if (min == 0) { break; } } } } } cout << min << endl; }
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> using namespace std; #define int long long int MOD = 1000000007; signed main() { cin.tie(0); ios::sync_with_stdio(false); int L, R; cin >> L >> R; int l, r; l = L % 2019; r = R % 2019; int ans; int min = 2019; if (l >= r) { min = 0; } else { if ((R - L) >= 2019) { min = 0; } else { for (int i = l; i < r; i++) { for (int j = i + 1; j <= r; j++) { ans = (i * j) % 2019; if (min >= ans) { min = ans; } if (min == 0) { break; } } } } } cout << min << endl; }
[ "control_flow.branch.if.condition.change" ]
791,773
791,774
u394973531
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main(void) { int L, R; cin >> L >> R; R = min(R, 2019); int res = 100000; bool flag = false; for (long long i = L; i < R; i++) { for (long long j = i + 1; j <= R; j++) { int ans = i * j % 2019; if (ans < res) res = ans; } } cout << res << endl; }
#include <bits/stdc++.h> using namespace std; int main(void) { int L, R; cin >> L >> R; R = min(R, L + 4038); int res = 100000; bool flag = false; for (long long i = L; i < R; i++) { for (long long j = i + 1; j <= R; j++) { int ans = i * j % 2019; if (ans < res) res = ans; } } cout << res << endl; }
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "assignment.change" ]
791,787
791,786
u590000849
cpp
p02983
#include <bits/stdc++.h> using namespace std; int main(void) { int L, R; cin >> L >> R; R = min(R, 673); int res = 100000; bool flag = false; for (long long i = L; i < R; i++) { for (long long j = i + 1; j <= R; j++) { int ans = i * j % 2019; if (ans < res) res = ans; } } cout << res << endl; }
#include <bits/stdc++.h> using namespace std; int main(void) { int L, R; cin >> L >> R; R = min(R, L + 4038); int res = 100000; bool flag = false; for (long long i = L; i < R; i++) { for (long long j = i + 1; j <= R; j++) { int ans = i * j % 2019; if (ans < res) res = ans; } } cout << res << endl; }
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "assignment.change" ]
791,788
791,786
u590000849
cpp
p02983
#include <iostream> using namespace std; static const int mod = 2019; int main() { long long l, r; cin >> l >> r; long long cnt = 0; long long ans = 2018; r = min(r, l + mod * 2); for (long long i = l; i < r; i++) { for (long long j = l + 1; j < r; j++) { long long x = i * j % mod; ans = min(ans, x); } } cout << ans << endl; return 0; }
#include <iostream> using namespace std; static const int mod = 2019; int main() { long long l, r; cin >> l >> r; long long cnt = 0; long long ans = 2018; r = min(r, l + mod); for (long long i = l; i <= r - 1; i++) { for (long long j = l + 1; j <= r; j++) { long long x = i * j % mod; ans = min(ans, x); } } cout << ans << endl; return 0; }
[ "expression.operation.binary.remove", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "misc.off_by_one" ]
791,789
791,790
u085230936
cpp
p02983
#include <iostream> using namespace std; static const int mod = 2019; int main() { long long l, r; cin >> l >> r; long long cnt = 0; long long ans = 2018; r = min(r, l + mod * 2); for (long long i = l; i < r; i++) { for (long long j = l + 1; j < r; j++) { long long x = i * j % mod; ans = min(ans, x); } } cout << ans << endl; return 0; }
#include <iostream> using namespace std; static const int mod = 2019; int main() { long long l, r; cin >> l >> r; long long cnt = 0; long long ans = 2018; r = min(r, l + mod * 2); for (long long i = l; i <= r - 1; i++) { for (long long j = l + 1; j <= r; j++) { long long x = i * j % mod; ans = min(ans, x); } } cout << ans << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "misc.off_by_one" ]
791,789
791,791
u085230936
cpp
p02983
#include <iostream> using namespace std; static const int mod = 2019; int main() { long long l, r; cin >> l >> r; long long cnt = 0; long long ans = 2018; r = min(r, l + mod * 2); for (long long i = l; i < r; i++) { for (long long j = l + 1; i < r; i++) { long long x = i * j % mod; ans = min(ans, x); } } cout << ans << endl; return 0; }
#include <iostream> using namespace std; static const int mod = 2019; int main() { long long l, r; cin >> l >> r; long long cnt = 0; long long ans = 2018; r = min(r, l + mod * 2); for (long long i = l; i <= r - 1; i++) { for (long long j = l + 1; j <= r; j++) { long long x = i * j % mod; ans = min(ans, x); } } cout << ans << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "misc.off_by_one", "identifier.change" ]
791,792
791,791
u085230936
cpp
p02983
#include <bits/stdc++.h> using namespace std; using ll = long long; using V = vector<int>; using A = array<int, 2>; using P = pair<int, int>; constexpr int MOD{1000000000 + 7}; #define rep(i, n) for (int i = 0; i < (int)(n); i++) constexpr array<int, 4> dx{1, 0, -1, 0}, dy{0, 1, 0, -1}; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } 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; } constexpr int div_roundup(int a, int b) { return (a + b - 1) / b; } // power with modulo ll powMod(ll b, ll e, const ll m = MOD) { ll r = 1; for (; e > 0; e >>= 1) { if (e & 1) r = (r * b) % m; b = (b * b) % m; } return r; } // factrial with modulo ll factMod(const ll n, const ll m = MOD) { ll x = 1; for (ll i = 1; i <= n; ++i) x = (x * i) % m; return x; } class Combi { private: const int n_, mod_; vector<ll> fac_, finv_; public: Combi(int n = 10000, int mod = MOD); ll count(int n, int k); }; Combi::Combi(int n, int mod) : n_(n), mod_(mod) { fac_.resize(n_); finv_.resize(n_); vector<ll> inv(n_); fac_[0] = fac_[1] = 1; finv_[0] = finv_[1] = 1; inv[1] = 1; for (int i = 2; i < n_; i++) { fac_[i] = fac_[i - 1] * i % mod_; inv[i] = mod_ - inv[mod_ % i] * (mod_ / i) % mod_; finv_[i] = finv_[i - 1] * inv[i] % mod_; } } ll Combi::count(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac_[n] * (finv_[k] * finv_[n - k] % mod_) % mod_; } // vector<vector<int>> vec(n_rows, vector<int>(n_cols, value)); // ***************************************************************************** void solve() { const ll y = 2019; ll l, r; cin >> l >> r; ll ans = 1e18; for (ll i = l; i <= min(r, l + y + 100); i++) for (ll j = l + 1; j <= min(r, l + y + 100); j++) { chmin(ans, (i % y * j % y) % y); if (ans <= 0) break; } cout << ans << endl; } // ***************************************************************************** int main() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(0); solve(); }
#include <bits/stdc++.h> using namespace std; using ll = long long; using V = vector<int>; using A = array<int, 2>; using P = pair<int, int>; constexpr int MOD{1000000000 + 7}; #define rep(i, n) for (int i = 0; i < (int)(n); i++) constexpr array<int, 4> dx{1, 0, -1, 0}, dy{0, 1, 0, -1}; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } 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; } constexpr int div_roundup(int a, int b) { return (a + b - 1) / b; } // power with modulo ll powMod(ll b, ll e, const ll m = MOD) { ll r = 1; for (; e > 0; e >>= 1) { if (e & 1) r = (r * b) % m; b = (b * b) % m; } return r; } // factrial with modulo ll factMod(const ll n, const ll m = MOD) { ll x = 1; for (ll i = 1; i <= n; ++i) x = (x * i) % m; return x; } class Combi { private: const int n_, mod_; vector<ll> fac_, finv_; public: Combi(int n = 10000, int mod = MOD); ll count(int n, int k); }; Combi::Combi(int n, int mod) : n_(n), mod_(mod) { fac_.resize(n_); finv_.resize(n_); vector<ll> inv(n_); fac_[0] = fac_[1] = 1; finv_[0] = finv_[1] = 1; inv[1] = 1; for (int i = 2; i < n_; i++) { fac_[i] = fac_[i - 1] * i % mod_; inv[i] = mod_ - inv[mod_ % i] * (mod_ / i) % mod_; finv_[i] = finv_[i - 1] * inv[i] % mod_; } } ll Combi::count(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac_[n] * (finv_[k] * finv_[n - k] % mod_) % mod_; } // vector<vector<int>> vec(n_rows, vector<int>(n_cols, value)); // ***************************************************************************** void solve() { const ll y = 2019; ll l, r; cin >> l >> r; ll ans = 1e18; for (ll i = l; i <= min(r, l + y + 100); i++) for (ll j = i + 1; j <= min(r, l + y + 100); j++) { chmin(ans, (i % y * j % y) % y); if (ans <= 0) break; } cout << ans << endl; } // ***************************************************************************** int main() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(0); solve(); }
[ "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,803
791,804
u076506345
cpp
p02983
#include <algorithm> #include <iostream> using namespace std; int main() { typedef long long ll; ll l, r; int ans = 2018; cin >> l >> r; r = min(r, l + 2019); for (ll i = l; i < r; i++) { for (ll j = l + 1; j <= r; j++) { int x = i * j % 2019; ans = min(x, ans); } cout << ans << endl; } }
#include <algorithm> #include <iostream> using namespace std; int main() { typedef long long ll; ll l, r; int ans = 2018; cin >> l >> r; r = min(r, l + 2019); for (ll i = l; i < r; i++) { for (ll j = l + 1; j <= r; j++) { int x = i * j % 2019; ans = min(x, ans); } } cout << ans << endl; }
[]
791,807
791,808
u611560534
cpp
p02983
#include <algorithm> #include <iostream> using namespace std; int main() { typedef long long ll; ll l, r; int ans = 2018; cin >> l >> r; r = min(r, l + 4038); for (ll i = l; i < r; i++) { for (ll j = l + 1; j <= r; j++) { int x = i * j % 2019; ans = min(x, ans); } cout << ans << endl; } }
#include <algorithm> #include <iostream> using namespace std; int main() { typedef long long ll; ll l, r; int ans = 2018; cin >> l >> r; r = min(r, l + 2019); for (ll i = l; i < r; i++) { for (ll j = l + 1; j <= r; j++) { int x = i * j % 2019; ans = min(x, ans); } } cout << ans << endl; }
[ "literal.number.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
791,809
791,808
u611560534
cpp
p02983
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define MOD 2019 int main(void) { long long L, R; cin >> L >> R; R = min(R, L + MOD * 2); long long ans = MOD; long long i, j; for (i = L; i <= R; i++) { for (j = L + 1; j <= R; j++) { ans = min(ans, (i * j) % MOD); } } cout << ans << endl; ; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define MOD 2019 int main(void) { long long L, R; cin >> L >> R; R = min(R, L + MOD * 2); long long ans = MOD; long long i, j; for (i = L; i <= R; i++) { for (j = i + 1; j <= R; j++) { ans = min(ans, (i * j) % MOD); } } cout << ans << endl; ; return 0; }
[ "assignment.value.change", "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,810
791,811
u330913290
cpp
p02983
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define MOD 2019 int main(void) { long long L, R; cin >> L >> R; R = min(R, L + MOD * 2); int ans = MOD; int i, j; for (i = L; i <= R; i++) { for (j = L + 1; j <= R; j++) { ans = min(ans, (i * j) % MOD); } } cout << ans << endl; ; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define MOD 2019 int main(void) { long long L, R; cin >> L >> R; R = min(R, L + MOD * 2); long long ans = MOD; long long i, j; for (i = L; i <= R; i++) { for (j = i + 1; j <= R; j++) { ans = min(ans, (i * j) % MOD); } } cout << ans << endl; ; return 0; }
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change", "assignment.value.change", "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,812
791,811
u330913290
cpp
p02983
#include <algorithm> #include <iostream> using namespace std; int main() { long long int L, r, i, j; cin >> L >> r; int x = 0; int min = 2020; for (i = L; i <= r; i++) { if (i % 2019 == 0) { min = 0; break; } for (j = L + 1; j <= r; j++) { if (j % 2019 == 0) { min = 0; break; } x = (i % 2019 * j % 2019) % 2019; if (min > x) { min = x; } x = 0; } } cout << min << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { long long int L, r, i, j; cin >> L >> r; int x = 0; int min = 2020; for (i = L; i <= r; i++) { if (i % 2019 == 0) { min = 0; break; } for (j = i + 1; j <= r; j++) { if (j % 2019 == 0) { min = 0; break; } x = (i % 2019 * j % 2019) % 2019; if (min > x) { min = x; } x = 0; } } cout << min << endl; return 0; }
[ "assignment.value.change", "identifier.change", "control_flow.loop.for.initializer.change", "expression.operation.binary.change" ]
791,820
791,821
u199184624
cpp