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
p02981
#include <stdio.h> int main(int argc, char const *argv[]) { int a, b, n; scanf("%d", &n); scanf("%d", &a); scanf("%d", &b); int min; if (a <= b) { printf("%d\n", n * a); } else { printf("%d\n", n * b); } return 0; }
#include <stdio.h> int main(int argc, char const *argv[]) { int a, b, n; scanf("%d", &n); scanf("%d", &a); scanf("%d", &b); int min; if (n * a <= b) { printf("%d\n", n * a); } else { printf("%d\n", b); } return 0; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
784,249
784,250
u090091127
cpp
p02981
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << max(n * a, b); }
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,253
784,254
u904019018
cpp
p02981
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> #define INF 1001001001 #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; using namespace std; int main() { int n, a, b; cin >> n >> a >> b; return min(n * a, b); }
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> #define INF 1001001001 #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; }
[ "io.output.change", "io.output.newline.add" ]
784,260
784,261
u971166345
cpp
p02976
#include <cctype> #include <cstdio> #define RI register int #define CI const int & #define Tp template <typename T> using namespace std; const int N = 100005; struct edge { int to, nxt, id; } e[N << 1]; int head[N], n, cnt, m, x[N], y[N], out[N], ansx[N], ansy[N], anc[N]; bool vis[N], cs[N]; class FileInputOutput { private: static const int S = 1 << 21; #define tc() \ (A == B && (B = (A = Fin) + fread(Fin, 1, S, stdin), A == B) ? EOF : *A++) #define pc(ch) \ (Ftop != Fend ? *Ftop++ = ch \ : (fwrite(Fout, 1, S, stdout), *(Ftop = Fout)++ = ch)) char Fin[S], Fout[S], *A, *B, *Ftop, *Fend; int pt[15]; public: FileInputOutput() { Ftop = Fout; Fend = Fout + S; } Tp inline void read(T &x) { x = 0; char ch; while (!isdigit(ch = tc())) ; while (x = (x << 3) + (x << 1) + (ch & 15), isdigit(ch = tc())) ; } Tp inline void write(T x, const char &ch) { RI ptop = 0; while (pt[++ptop] = x % 10, x /= 10) ; while (ptop) pc(pt[ptop--] + 48); pc(ch); } inline void flush(void) { fwrite(Fout, 1, Ftop - Fout, stdout); } #undef tc #undef pc } F; inline void addedge(CI x, CI y, CI z) { e[++cnt] = (edge){y, head[x], z}; head[x] = cnt; e[++cnt] = (edge){x, head[y], z}; head[y] = cnt; } #define to e[i].to inline void DFS1(CI now = 1) { vis[now] = 1; for (RI i = head[now]; i; i = e[i].nxt) if (!vis[to]) cs[e[i].id] = 1, anc[to] = e[i].id, DFS1(to); } inline void DFS2(CI now = 1, CI fa = 0) { for (RI i = head[now]; i; i = e[i].nxt) if (cs[e[i].id] && to != fa) DFS2(to, now); if (out[now] & 1 && fa) ansx[anc[now]] = now, ansy[anc[now]] = fa; else ansx[anc[now]] = fa, ansy[anc[now]] = now, ++out[fa]; } #undef to int main() { // freopen("CODE.in","r",stdin); freopen("CODE.out","w",stdout); RI i; for (F.read(n), F.read(m), i = 1; i <= m; ++i) F.read(x[i]), F.read(y[i]), addedge(x[i], y[i], i); if (m & 1) return puts("-1"), 0; for (DFS1(), i = 1; i <= m; ++i) if (!cs[i]) ++out[x[i]], ansx[i] = x[i], ansy[i] = y[i]; for (DFS2(), i = 1; i <= m; ++i) F.write(ansy[i], ' '), F.write(ansx[i], '\n'); return F.flush(), 0; }
#include <cctype> #include <cstdio> #define RI register int #define CI const int & #define Tp template <typename T> using namespace std; const int N = 100005; struct edge { int to, nxt, id; } e[N << 1]; int head[N], n, cnt, m, x[N], y[N], out[N], ansx[N], ansy[N], anc[N]; bool vis[N], cs[N]; class FileInputOutput { private: static const int S = 1 << 21; #define tc() \ (A == B && (B = (A = Fin) + fread(Fin, 1, S, stdin), A == B) ? EOF : *A++) #define pc(ch) \ (Ftop != Fend ? *Ftop++ = ch \ : (fwrite(Fout, 1, S, stdout), *(Ftop = Fout)++ = ch)) char Fin[S], Fout[S], *A, *B, *Ftop, *Fend; int pt[15]; public: FileInputOutput() { Ftop = Fout; Fend = Fout + S; } Tp inline void read(T &x) { x = 0; char ch; while (!isdigit(ch = tc())) ; while (x = (x << 3) + (x << 1) + (ch & 15), isdigit(ch = tc())) ; } Tp inline void write(T x, const char &ch) { RI ptop = 0; while (pt[++ptop] = x % 10, x /= 10) ; while (ptop) pc(pt[ptop--] + 48); pc(ch); } inline void flush(void) { fwrite(Fout, 1, Ftop - Fout, stdout); } #undef tc #undef pc } F; inline void addedge(CI x, CI y, CI z) { e[++cnt] = (edge){y, head[x], z}; head[x] = cnt; e[++cnt] = (edge){x, head[y], z}; head[y] = cnt; } #define to e[i].to inline void DFS1(CI now = 1) { vis[now] = 1; for (RI i = head[now]; i; i = e[i].nxt) if (!vis[to]) cs[e[i].id] = 1, anc[to] = e[i].id, DFS1(to); } inline void DFS2(CI now = 1, CI fa = 0) { for (RI i = head[now]; i; i = e[i].nxt) if (cs[e[i].id] && to != fa) DFS2(to, now); if (out[now] & 1) ansx[anc[now]] = now, ansy[anc[now]] = fa; else ansx[anc[now]] = fa, ansy[anc[now]] = now, ++out[fa]; } #undef to int main() { // freopen("CODE.in","r",stdin); freopen("CODE.out","w",stdout); RI i; for (F.read(n), F.read(m), i = 1; i <= m; ++i) F.read(x[i]), F.read(y[i]), addedge(x[i], y[i], i); if (m & 1) return puts("-1"), 0; for (DFS1(), i = 1; i <= m; ++i) if (!cs[i]) ++out[x[i]], ansx[i] = x[i], ansy[i] = y[i]; for (DFS2(), i = 1; i <= m; ++i) F.write(ansx[i], ' '), F.write(ansy[i], '\n'); return F.flush(), 0; }
[ "expression.operation.binary.remove", "identifier.change", "call.arguments.change" ]
784,275
784,276
u803115645
cpp
p02976
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define FOR(i, a, b) for (ll i = (a); i < (b); ++i) #define ALL(v) (v).begin(), (v).end() #define p(s) cout << (s) << endl #define p2(s, t) cout << (s) << " " << (t) << endl #define br() p("") #define pn(s) cout << (#s) << " " << (s) << endl #define p_yes() p("YES") #define p_no() p("NO") const ll mod = 1e9 + 7; const ll inf = 1e18; void vprint(vector<ll> A) { ll L = A.size(); FOR(i, 0, L) { if (i) cout << ' '; cout << A[i]; } cout << endl; } struct UnionFind { vector<ll> parent; UnionFind() {} void initialize(ll sz) { parent.resize(sz); reset(); } void reset() { FOR(i, 0, parent.size()) { parent[i] = i; } } void unite(ll a, ll b) { if (a > b) { swap(a, b); } ll rootA = findRoot(a); ll rootB = findRoot(b); if (rootA > rootB) { swap(rootA, rootB); } if (rootA == rootB) { return; } else { // 小さい方を親にする parent[rootB] = rootA; } } ll findRoot(ll a) { if (parent[a] == a) { return a; } else { return parent[a] = findRoot(parent[a]); } } map<ll, vector<ll>> getGroups() { map<ll, vector<ll>> G; FOR(i, 0, parent.size()) { ll r = findRoot(i); G[r].push_back(i); } return G; } bool is_same_group(ll a, ll b) { ll rootA = findRoot(a); ll rootB = findRoot(b); if (rootA == rootB) { return true; } else { return false; } } }; const int N_MAX = 100010; vector<vector<ll>> G; // 出次数 ll out[N_MAX]; // edge done bool done[N_MAX]; ll parent[N_MAX]; UnionFind uf; vector<pair<ll, ll>> Ans; // 葉まで行って出次数見て、張る void dfs(ll i, ll prev) { for (ll to : G[i]) { if (prev == to) continue; parent[to] = i; dfs(to, i); } ll p = parent[i]; if (i == 0) return; if (out[i] % 2 == 1) { // iから出す // i->p out[i]++; Ans.push_back(make_pair(i, p)); } else { // p->i out[p]++; Ans.push_back(make_pair(p, i)); } } int main() { cin.tie(0); ios::sync_with_stdio(false); // input ll N, M; cin >> N >> M; if (N % 2 == 1) { p(-1); return 0; } vector<ll> A(M); vector<ll> B(M); FOR(i, 0, M) { cin >> A[i] >> B[i]; A[i]--; B[i]--; } uf.initialize(N); G.resize(N); // make spanning tree FOR(i, 0, M) { ll a = A[i]; ll b = B[i]; if (uf.is_same_group(a, b)) { // 適当に方向づけ // a -> b out[a]++; Ans.push_back(make_pair(a, b)); } else { // 辺をはる G[a].push_back(b); G[b].push_back(a); uf.unite(a, b); } } dfs(0, -1); // pn(Ans.size()); for (auto pa : Ans) { p2(pa.first + 1, pa.second + 1); } return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define FOR(i, a, b) for (ll i = (a); i < (b); ++i) #define ALL(v) (v).begin(), (v).end() #define p(s) cout << (s) << endl #define p2(s, t) cout << (s) << " " << (t) << endl #define br() p("") #define pn(s) cout << (#s) << " " << (s) << endl #define p_yes() p("YES") #define p_no() p("NO") const ll mod = 1e9 + 7; const ll inf = 1e18; void vprint(vector<ll> A) { ll L = A.size(); FOR(i, 0, L) { if (i) cout << ' '; cout << A[i]; } cout << endl; } struct UnionFind { vector<ll> parent; UnionFind() {} void initialize(ll sz) { parent.resize(sz); reset(); } void reset() { FOR(i, 0, parent.size()) { parent[i] = i; } } void unite(ll a, ll b) { if (a > b) { swap(a, b); } ll rootA = findRoot(a); ll rootB = findRoot(b); if (rootA > rootB) { swap(rootA, rootB); } if (rootA == rootB) { return; } else { // 小さい方を親にする parent[rootB] = rootA; } } ll findRoot(ll a) { if (parent[a] == a) { return a; } else { return parent[a] = findRoot(parent[a]); } } map<ll, vector<ll>> getGroups() { map<ll, vector<ll>> G; FOR(i, 0, parent.size()) { ll r = findRoot(i); G[r].push_back(i); } return G; } bool is_same_group(ll a, ll b) { ll rootA = findRoot(a); ll rootB = findRoot(b); if (rootA == rootB) { return true; } else { return false; } } }; const int N_MAX = 100010; vector<vector<ll>> G; // 出次数 ll out[N_MAX]; // edge done bool done[N_MAX]; ll parent[N_MAX]; UnionFind uf; vector<pair<ll, ll>> Ans; // 葉まで行って出次数見て、張る void dfs(ll i, ll prev) { for (ll to : G[i]) { if (prev == to) continue; parent[to] = i; dfs(to, i); } ll p = parent[i]; if (i == 0) return; if (out[i] % 2 == 1) { // iから出す // i->p out[i]++; Ans.push_back(make_pair(i, p)); } else { // p->i out[p]++; Ans.push_back(make_pair(p, i)); } } int main() { cin.tie(0); ios::sync_with_stdio(false); // input ll N, M; cin >> N >> M; if (M % 2 == 1) { p(-1); return 0; } vector<ll> A(M); vector<ll> B(M); FOR(i, 0, M) { cin >> A[i] >> B[i]; A[i]--; B[i]--; } uf.initialize(N); G.resize(N); // make spanning tree FOR(i, 0, M) { ll a = A[i]; ll b = B[i]; if (uf.is_same_group(a, b)) { // 適当に方向づけ // a -> b out[a]++; Ans.push_back(make_pair(a, b)); } else { // 辺をはる G[a].push_back(b); G[b].push_back(a); uf.unite(a, b); } } dfs(0, -1); // pn(Ans.size()); for (auto pa : Ans) { p2(pa.first + 1, pa.second + 1); } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
784,294
784,295
u432688695
cpp
p02976
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #if __cplusplus >= 201103L #include <ccomplex> #include <cfenv> #include <cinttypes> #include <cstdalign> #include <cstdbool> #include <cstdint> #include <ctgmath> #include <cwchar> #include <cwctype> #endif #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <unordered_map> #include <unordered_set> #endif #define y0 qvya13579 #define y1 qvyb24680 #define j0 qvja13579 #define j1 qvjb24680 #define next qvne13579xt #define prev qvpr13579ev #define INF 1000000007 #define MOD 1000000007 #define PI acos(-1.0) #define endl "\n" #define IOS \ cin.tie(0); \ ios::sync_with_stdio(false) #define M_P make_pair #define PU_B push_back #define PU_F push_front #define PO_B pop_back #define PO_F pop_front #define U_B upper_bound #define L_B lower_bound #define B_S binary_search #define PR_Q priority_queue #define FIR first #define SEC second #if __cplusplus < 201103L #define stoi(argument_string) atoi((argument_string).c_str()) #endif #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define REP_R(i, n) for (int i = ((int)(n)-1); i >= 0; --i) #define FOR(i, m, n) for (int i = ((int)(m)); i < (int)(n); ++i) #define FOR_R(i, m, n) for (int i = ((int)(m)-1); i >= (int)(n); --i) #define ALL(v) (v).begin(), (v).end() #define RALL(v) (v).rbegin(), (v).rend() #define SIZ(x) ((int)(x).size()) #define CIN(x) cin >> (x) #define CIN2(x, y) cin >> (x) >> (y) #define CIN3(x, y, z) cin >> (x) >> (y) >> (z) #define CIN4(x, y, z, w) cin >> (x) >> (y) >> (z) >> (w) #define CIN5(x, y, z, w, u) cin >> (x) >> (y) >> (z) >> (w) >> (u) #define SCAND(x) scanf("%d", &(x)) #define SCAND2(x, y) scanf("%d%d", &(x), &(y)) #define SCAND3(x, y, z) scanf("%d%d%d", &(x), &(y), &(z)) #define SCAND4(x, y, z, w) scanf("%d%d%d%d", &(x), &(y), &(z), &(w)) #define SCAND5(x, y, z, w, u) scanf("%d%d%d%d%d", &(x), &(y), &(z), &(w), &(u)) #define SCANLLD(x) scanf("%lld", &(x)) #define SCANLLD2(x, y) scanf("%lld%lld", &(x), &(y)) #define SCANLLD3(x, y, z) scanf("%lld%lld%lld", &(x), &(y), &(z)) #define SCANLLD4(x, y, z, w) scanf("%lld%lld%lld%lld", &(x), &(y), &(z), &(w)) #define SCANLLD5(x, y, z, w, u) \ scanf("%lld%lld%lld%lld%lld", &(x), &(y), &(z), &(w), &(u)) #define PRINTD(x) printf("%d\n", (x)) #define PRINTLLD(x) printf("%lld\n", (x)) #define DEBUG(argument) cerr << (#argument) << " : " << (argument) << "\n" typedef long long int lli; using namespace std; bool compare_by_2nd(pair<int, int> a, pair<int, int> b) { if (a.second != b.second) { return a.second < b.second; } else { return a.first < b.first; } } int ctoi(char c) { if (c >= '0' and c <= '9') { return (int)(c - '0'); } return -1; } int alphabet_pos(char c) { if (c >= 'a' and c <= 'z') { return (int)(c - 'a'); } return -1; } int alphabet_pos_capital(char c) { if (c >= 'A' and c <= 'Z') { return (int)(c - 'A'); } return -1; } vector<string> split(string str, char ch) { int first = 0; int last = str.find_first_of(ch); if (last == string::npos) { last = SIZ(str); } vector<string> result; while (first < SIZ(str)) { string Ssubstr(str, first, last - first); result.push_back(Ssubstr); first = last + 1; last = str.find_first_of(ch, first); if (last == string::npos) { last = SIZ(str); } } return result; } int gcd(int a, int b) // assuming a,b >= 1 { if (a < b) { return gcd(b, a); } if (a % b == 0) { return b; } return gcd(b, a % b); } int lcm(int a, int b) // assuming a,b >= 1 { return a * b / gcd(a, b); } lli pow_fast(lli x, lli n_power, lli modulus) { if (n_power == 0) { return 1; } if (n_power % 2 == 0) { return pow_fast(x * x % modulus, n_power / 2, modulus); } return x * pow_fast(x, n_power - 1, modulus) % modulus; } struct CombinationTable { vector<vector<long long>> val; CombinationTable(int size) : val(size + 1, vector<long long>(size + 1)) // constructor { for (int i = 0; i <= size; ++i) // note that 0 <= i <= size { for (int j = 0; j <= i; ++j) { if (j == 0 or j == i) { val[i][j] = 1LL; } else { val[i][j] = val[i - 1][j - 1] + val[i - 1][j]; } } } } }; struct UnionFind // size-based { vector<int> parent, treesize; UnionFind(int size) : parent(size), treesize(size, 1) // constructor { for (int i = 0; i < size; ++i) { parent[i] = i; } } int root(int x) { if (parent[x] == x) { return x; } return parent[x] = root(parent[x]); } void unite(int x, int y) { x = root(x); y = root(y); if (x == y) { return; } if (treesize[x] < treesize[y]) { parent[x] = y; treesize[y] += treesize[x]; } else { parent[y] = x; treesize[x] += treesize[y]; } } bool sametree(int x, int y) { return root(x) == root(y); } int gettreesize(int x) { return treesize[root(x)]; } }; /*------------------ the end of the template -----------------------*/ int N, M; vector<vector<int>> G; vector<pair<int, int>> edge; vector<int> outdeg; vector<bool> cango; void direct(int id, int par) { REP(j, SIZ(G[id])) { int k = G[id][j]; if (k != par and cango[k]) { cango[k] = false; direct(k, id); } } if (par == -1) { return; } if (outdeg[id] % 2 == 1) { ++outdeg[id]; edge.push_back(make_pair(id + 1, par + 1)); } else { ++outdeg[par]; edge.push_back(make_pair(par + 1, id + 1)); } } signed main() { IOS; /* making cin faster */ SCAND2(N, M); if (N % 2 == 1) { PRINTD(-1); return 0; } UnionFind T(N); outdeg = vector<int>(N, 0); G = vector<vector<int>>(N); cango = vector<bool>(N, true); REP(i, M) { int A, B; SCAND2(A, B); --A; --B; if (T.sametree(A, B)) { ++outdeg[A]; edge.push_back(make_pair(A + 1, B + 1)); } else { T.unite(A, B); G[A].push_back(B); G[B].push_back(A); } } cango[0] = false; direct(0, -1); REP(i, SIZ(edge)) { printf("%d %d\n", edge[i].first, edge[i].second); } }
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #if __cplusplus >= 201103L #include <ccomplex> #include <cfenv> #include <cinttypes> #include <cstdalign> #include <cstdbool> #include <cstdint> #include <ctgmath> #include <cwchar> #include <cwctype> #endif #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <unordered_map> #include <unordered_set> #endif #define y0 qvya13579 #define y1 qvyb24680 #define j0 qvja13579 #define j1 qvjb24680 #define next qvne13579xt #define prev qvpr13579ev #define INF 1000000007 #define MOD 1000000007 #define PI acos(-1.0) #define endl "\n" #define IOS \ cin.tie(0); \ ios::sync_with_stdio(false) #define M_P make_pair #define PU_B push_back #define PU_F push_front #define PO_B pop_back #define PO_F pop_front #define U_B upper_bound #define L_B lower_bound #define B_S binary_search #define PR_Q priority_queue #define FIR first #define SEC second #if __cplusplus < 201103L #define stoi(argument_string) atoi((argument_string).c_str()) #endif #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define REP_R(i, n) for (int i = ((int)(n)-1); i >= 0; --i) #define FOR(i, m, n) for (int i = ((int)(m)); i < (int)(n); ++i) #define FOR_R(i, m, n) for (int i = ((int)(m)-1); i >= (int)(n); --i) #define ALL(v) (v).begin(), (v).end() #define RALL(v) (v).rbegin(), (v).rend() #define SIZ(x) ((int)(x).size()) #define CIN(x) cin >> (x) #define CIN2(x, y) cin >> (x) >> (y) #define CIN3(x, y, z) cin >> (x) >> (y) >> (z) #define CIN4(x, y, z, w) cin >> (x) >> (y) >> (z) >> (w) #define CIN5(x, y, z, w, u) cin >> (x) >> (y) >> (z) >> (w) >> (u) #define SCAND(x) scanf("%d", &(x)) #define SCAND2(x, y) scanf("%d%d", &(x), &(y)) #define SCAND3(x, y, z) scanf("%d%d%d", &(x), &(y), &(z)) #define SCAND4(x, y, z, w) scanf("%d%d%d%d", &(x), &(y), &(z), &(w)) #define SCAND5(x, y, z, w, u) scanf("%d%d%d%d%d", &(x), &(y), &(z), &(w), &(u)) #define SCANLLD(x) scanf("%lld", &(x)) #define SCANLLD2(x, y) scanf("%lld%lld", &(x), &(y)) #define SCANLLD3(x, y, z) scanf("%lld%lld%lld", &(x), &(y), &(z)) #define SCANLLD4(x, y, z, w) scanf("%lld%lld%lld%lld", &(x), &(y), &(z), &(w)) #define SCANLLD5(x, y, z, w, u) \ scanf("%lld%lld%lld%lld%lld", &(x), &(y), &(z), &(w), &(u)) #define PRINTD(x) printf("%d\n", (x)) #define PRINTLLD(x) printf("%lld\n", (x)) #define DEBUG(argument) cerr << (#argument) << " : " << (argument) << "\n" typedef long long int lli; using namespace std; bool compare_by_2nd(pair<int, int> a, pair<int, int> b) { if (a.second != b.second) { return a.second < b.second; } else { return a.first < b.first; } } int ctoi(char c) { if (c >= '0' and c <= '9') { return (int)(c - '0'); } return -1; } int alphabet_pos(char c) { if (c >= 'a' and c <= 'z') { return (int)(c - 'a'); } return -1; } int alphabet_pos_capital(char c) { if (c >= 'A' and c <= 'Z') { return (int)(c - 'A'); } return -1; } vector<string> split(string str, char ch) { int first = 0; int last = str.find_first_of(ch); if (last == string::npos) { last = SIZ(str); } vector<string> result; while (first < SIZ(str)) { string Ssubstr(str, first, last - first); result.push_back(Ssubstr); first = last + 1; last = str.find_first_of(ch, first); if (last == string::npos) { last = SIZ(str); } } return result; } int gcd(int a, int b) // assuming a,b >= 1 { if (a < b) { return gcd(b, a); } if (a % b == 0) { return b; } return gcd(b, a % b); } int lcm(int a, int b) // assuming a,b >= 1 { return a * b / gcd(a, b); } lli pow_fast(lli x, lli n_power, lli modulus) { if (n_power == 0) { return 1; } if (n_power % 2 == 0) { return pow_fast(x * x % modulus, n_power / 2, modulus); } return x * pow_fast(x, n_power - 1, modulus) % modulus; } struct CombinationTable { vector<vector<long long>> val; CombinationTable(int size) : val(size + 1, vector<long long>(size + 1)) // constructor { for (int i = 0; i <= size; ++i) // note that 0 <= i <= size { for (int j = 0; j <= i; ++j) { if (j == 0 or j == i) { val[i][j] = 1LL; } else { val[i][j] = val[i - 1][j - 1] + val[i - 1][j]; } } } } }; struct UnionFind // size-based { vector<int> parent, treesize; UnionFind(int size) : parent(size), treesize(size, 1) // constructor { for (int i = 0; i < size; ++i) { parent[i] = i; } } int root(int x) { if (parent[x] == x) { return x; } return parent[x] = root(parent[x]); } void unite(int x, int y) { x = root(x); y = root(y); if (x == y) { return; } if (treesize[x] < treesize[y]) { parent[x] = y; treesize[y] += treesize[x]; } else { parent[y] = x; treesize[x] += treesize[y]; } } bool sametree(int x, int y) { return root(x) == root(y); } int gettreesize(int x) { return treesize[root(x)]; } }; /*------------------ the end of the template -----------------------*/ int N, M; vector<vector<int>> G; vector<pair<int, int>> edge; vector<int> outdeg; vector<bool> cango; void direct(int id, int par) { REP(j, SIZ(G[id])) { int k = G[id][j]; if (k != par and cango[k]) { cango[k] = false; direct(k, id); } } if (par == -1) { return; } if (outdeg[id] % 2 == 1) { ++outdeg[id]; edge.push_back(make_pair(id + 1, par + 1)); } else { ++outdeg[par]; edge.push_back(make_pair(par + 1, id + 1)); } } signed main() { IOS; /* making cin faster */ SCAND2(N, M); if (M % 2 == 1) { PRINTD(-1); return 0; } UnionFind T(N); outdeg = vector<int>(N, 0); G = vector<vector<int>>(N); cango = vector<bool>(N, true); REP(i, M) { int A, B; SCAND2(A, B); --A; --B; if (T.sametree(A, B)) { ++outdeg[A]; edge.push_back(make_pair(A + 1, B + 1)); } else { T.unite(A, B); G[A].push_back(B); G[B].push_back(A); } } cango[0] = false; direct(0, -1); REP(i, SIZ(edge)) { printf("%d %d\n", edge[i].first, edge[i].second); } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
784,296
784,297
u900727536
cpp
p02976
#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 double db; typedef vector<ll> vll; typedef pair<ll, ll> pll; #define pb push_back #define mp make_pair #define MAX 1000000 #define mod 1000000007 #define all(_) _.begin(), _.end() #define F first #define S second #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ tree_order_statistics_node_update> vll g[MAX]; int vis[MAX]; vector<pll> ed; int c[MAX]; void dfs(int cur, int par) { vis[cur] = 1; for (auto x : g[cur]) { if (vis[x] == 0) dfs(x, cur); if (vis[x] == 1 && x != par) ed.pb(mp(cur, x)), c[cur]++; } if (par != -1) { if (c[cur] % 2 == 0) ed.pb(mp(par, cur)), c[par]++; else ed.pb(mp(cur, par)), c[cur]++; } vis[cur] = 2; } int main() { ios_base ::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); ll n, m, u, v, i; cin >> n >> m; for (i = 0; i < m; i++) { cin >> u >> v; g[u].pb(v); g[v].pb(u); } if (m % 2 == -1) { cout << "-1\n"; return 0; } dfs(1, -1); for (auto x : ed) cout << x.F << ' ' << x.S << endl; return 0; return 0; }
#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 double db; typedef vector<ll> vll; typedef pair<ll, ll> pll; #define pb push_back #define mp make_pair #define MAX 1000000 #define mod 1000000007 #define all(_) _.begin(), _.end() #define F first #define S second #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ tree_order_statistics_node_update> vll g[MAX]; int vis[MAX]; vector<pll> ed; int c[MAX]; void dfs(int cur, int par) { vis[cur] = 1; for (auto x : g[cur]) { if (vis[x] == 0) dfs(x, cur); if (vis[x] == 1 && x != par) ed.pb(mp(cur, x)), c[cur]++; } if (par != -1) { if (c[cur] % 2 == 0) ed.pb(mp(par, cur)), c[par]++; else ed.pb(mp(cur, par)), c[cur]++; } vis[cur] = 2; } int main() { ios_base ::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); ll n, m, u, v, i; cin >> n >> m; for (i = 0; i < m; i++) { cin >> u >> v; g[u].pb(v); g[v].pb(u); } if (m % 2 == 1) { cout << "-1\n"; return 0; } dfs(1, -1); for (auto x : ed) cout << x.F << ' ' << x.S << endl; return 0; return 0; }
[ "expression.operation.unary.arithmetic.remove" ]
784,319
784,320
u868281230
cpp
p02976
#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; // template #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) typedef long long int ll; typedef pair<ll, ll> P; typedef complex<double> com; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } ll gcd(ll a, ll b) { if (!b) return a; else return gcd(b, a % b); } const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2; int mod = 1e9 + 7; // 998244353; struct Mint { int val; Mint inv() const { unsigned tmp, a = val, b = mod; int x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) : val(x >= 0 ? x % mod : x % mod + mod) {} int mtoi() { return this->val; } Mint pow(ll t) { Mint res = 1; while (t > 0) { if (t & 1) res *= *this; *this *= *this; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator-() const { return Mint(-val); } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: factorial(int maxx) { Fact.resize(maxx + 1, Mint(1)); Finv.resize(maxx + 1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * Mint(i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * Mint(i); } Mint fact(int n) { return Fact[n]; } Mint finv(int n) { return Finv[n]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); return Fact[n] * Finv[r] * Finv[n - r]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); return Fact[n] * Finv[n - r]; } }; class UnionFind { vector<int> par; public: UnionFind(int n) { par = vector<int>(n, -1); } int root(int a) { if (par[a] < 0) return a; else return par[a] = root(par[a]); } int size(int a) { return -par[root(a)]; } bool connect(int a, int b) { a = root(a), b = root(b); if (a == b) return false; if (size(a) < size(b)) swap(a, b); par[a] += par[b], par[b] = a; return true; } }; struct max_flow { struct Edge { int to, cap, rev; }; int V; vector<vector<Edge>> G; vector<int> itr, level; public: max_flow(int V) : V(V) { G.assign(V, vector<Edge>()); } void add_edge(int from, int to, int cap) { G[from].push_back({to, cap, (int)G[to].size()}); G[to].push_back({from, 0, (int)G[from].size() - 1}); } void bfs(int s) { level.assign(V, -1); queue<int> q; level[s] = 0; q.push(s); while (!q.empty()) { int v = q.front(); q.pop(); for (auto &e : G[v]) { if (e.cap > 0 && level[e.to] < 0) { level[e.to] = level[v] + 1; q.push(e.to); } } } } int dfs(int v, int t, int f) { if (v == t) return f; for (int &i = itr[v]; i < (int)G[v].size(); ++i) { Edge &e = G[v][i]; if (e.cap > 0 && level[v] < level[e.to]) { int d = dfs(e.to, t, min(f, e.cap)); if (d > 0) { e.cap -= d, G[e.to][e.rev].cap += d; return d; } } } return 0; } int run(int s, int t) { int ret = 0, f; while (bfs(s), level[t] >= 0) { itr.assign(V, 0); while ((f = dfs(s, t, inf)) > 0) ret += f; } return ret; } }; struct edge { int u, v, cost; }; vector<ll> dijkstra(vector<vector<edge>> Grp, int s) { priority_queue<P, vector<P>, greater<P>> que; vector<ll> dist(Grp.size(), INF); dist[s] = 0; que.push(P(0, s)); while (!que.empty()) { P p = que.top(); que.pop(); int v = p.second; if (dist[v] < p.first) continue; rep(i, 0, Grp[v].size()) { edge e = Grp[v][i]; if (dist[e.v] > dist[v] + e.cost) { dist[e.v] = dist[v] + e.cost; que.push(P(dist[e.v], e.v)); } } } return dist; } void fft(vector<com> &x, bool inv) { int s = x.size(); if (s == 1) return; vector<com> even(s / 2), odd(s / 2); rep(i, 0, s / 2) even[i] = x[i * 2], odd[i] = x[i * 2 + 1]; fft(even, inv), fft(odd, inv); com w = 1, w_0 = polar(1.0, (inv ? -1 : 1) * 2LL * M_PI / s); rep(i, 0, s) x[i] = even[i % (s / 2)] + w * odd[i % (s / 2)], w *= w_0; } void MultiFunction(vector<int> &a, vector<int> &b) { int n = a.size(), maxx = 1; while (maxx <= 2 * n) maxx *= 2; vector<com> x(maxx), y(maxx); rep(i, 0, n) x[i] = com(a[i], 0), y[i] = com(b[i], 0); fft(x, 0), fft(y, 0); rep(i, 0, maxx) x[i] *= y[i]; fft(x, 1); rep(i, 0, maxx) x[i] /= maxx; a.resize(2 * n - 1, 0); rep(i, 0, 2 * n - 1) a[i] = (int)(x[i].real() + 0.5); } ll merge_cnt(vector<int> a) { ll n = a.size(), ai = 0, bi = 0, ci = 0, cnt = 0; if (n <= 1) return 0; vector<int> b(a.begin(), a.begin() + n / 2); vector<int> c(a.begin() + n / 2, a.end()); cnt += merge_cnt(b) + merge_cnt(c); while (ai < n) { if (bi < b.size() && (ci == c.size() || b[bi] <= c[ci])) a[ai++] = b[bi++]; else cnt += n / 2LL - bi, a[ai++] = c[ci++]; } return cnt; } // template end vector<vector<int>> g; bool vis[100010], flag[100010]; set<P> st; vector<P> ans; void dfs(int v, int pre) { vis[v] = true; for (int u : g[v]) if (u != pre) { if (!vis[u]) dfs(u, v); else if (!st.count({v, u})) { ans.push_back({v, u}); st.insert({v, u}); st.insert({u, v}); flag[v] ^= 1; } } if (pre >= 0) { if (flag[v]) { ans.push_back({v, pre}); flag[v] ^= 1; } else { ans.push_back({pre, v}); flag[pre] ^= 1; } st.insert({v, pre}); st.insert({pre, v}); } } int main() { int n, m; cin >> n >> m; if (m % 2) { printf("-1"); return 0; } g.resize(n); rep(i, 0, m) { int u, v; cin >> u >> v; u--; v--; g[u].push_back(v); g[v].push_back(u); } dfs(0, -1); rep(i, 0, ans.size()) { printf("%lld %lld\n", ans[i].first, ans[i].second); } return 0; }
#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; // template #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) typedef long long int ll; typedef pair<ll, ll> P; typedef complex<double> com; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } ll gcd(ll a, ll b) { if (!b) return a; else return gcd(b, a % b); } const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2; int mod = 1e9 + 7; // 998244353; struct Mint { int val; Mint inv() const { unsigned tmp, a = val, b = mod; int x = 1, y = 0; while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y); return Mint(x); } public: Mint() : val(0) {} Mint(ll x) : val(x >= 0 ? x % mod : x % mod + mod) {} int mtoi() { return this->val; } Mint pow(ll t) { Mint res = 1; while (t > 0) { if (t & 1) res *= *this; *this *= *this; t >>= 1; } return res; } Mint &operator+=(const Mint &x) { if ((val += x.val) >= mod) val -= mod; return *this; } Mint &operator-=(const Mint &x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; } Mint &operator*=(const Mint &x) { val = (ll)val * x.val % mod; return *this; } Mint &operator/=(const Mint &x) { return *this *= x.inv(); } bool operator==(const Mint &x) const { return val == x.val; } bool operator!=(const Mint &x) const { return val != x.val; } bool operator<(const Mint &x) const { return val < x.val; } bool operator<=(const Mint &x) const { return val <= x.val; } bool operator>(const Mint &x) const { return val > x.val; } bool operator>=(const Mint &x) const { return val >= x.val; } Mint operator-() const { return Mint(-val); } Mint operator+(const Mint &x) const { return Mint(*this) += x; } Mint operator-(const Mint &x) const { return Mint(*this) -= x; } Mint operator*(const Mint &x) const { return Mint(*this) *= x; } Mint operator/(const Mint &x) const { return Mint(*this) /= x; } }; struct factorial { vector<Mint> Fact, Finv; public: factorial(int maxx) { Fact.resize(maxx + 1, Mint(1)); Finv.resize(maxx + 1); rep(i, 0, maxx) Fact[i + 1] = Fact[i] * Mint(i + 1); Finv[maxx] = Mint(1) / Fact[maxx]; rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * Mint(i); } Mint fact(int n) { return Fact[n]; } Mint finv(int n) { return Finv[n]; } Mint nCr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); return Fact[n] * Finv[r] * Finv[n - r]; } Mint nPr(int n, int r) { if (n < 0 || n < r || r < 0) return Mint(0); return Fact[n] * Finv[n - r]; } }; class UnionFind { vector<int> par; public: UnionFind(int n) { par = vector<int>(n, -1); } int root(int a) { if (par[a] < 0) return a; else return par[a] = root(par[a]); } int size(int a) { return -par[root(a)]; } bool connect(int a, int b) { a = root(a), b = root(b); if (a == b) return false; if (size(a) < size(b)) swap(a, b); par[a] += par[b], par[b] = a; return true; } }; struct max_flow { struct Edge { int to, cap, rev; }; int V; vector<vector<Edge>> G; vector<int> itr, level; public: max_flow(int V) : V(V) { G.assign(V, vector<Edge>()); } void add_edge(int from, int to, int cap) { G[from].push_back({to, cap, (int)G[to].size()}); G[to].push_back({from, 0, (int)G[from].size() - 1}); } void bfs(int s) { level.assign(V, -1); queue<int> q; level[s] = 0; q.push(s); while (!q.empty()) { int v = q.front(); q.pop(); for (auto &e : G[v]) { if (e.cap > 0 && level[e.to] < 0) { level[e.to] = level[v] + 1; q.push(e.to); } } } } int dfs(int v, int t, int f) { if (v == t) return f; for (int &i = itr[v]; i < (int)G[v].size(); ++i) { Edge &e = G[v][i]; if (e.cap > 0 && level[v] < level[e.to]) { int d = dfs(e.to, t, min(f, e.cap)); if (d > 0) { e.cap -= d, G[e.to][e.rev].cap += d; return d; } } } return 0; } int run(int s, int t) { int ret = 0, f; while (bfs(s), level[t] >= 0) { itr.assign(V, 0); while ((f = dfs(s, t, inf)) > 0) ret += f; } return ret; } }; struct edge { int u, v, cost; }; vector<ll> dijkstra(vector<vector<edge>> Grp, int s) { priority_queue<P, vector<P>, greater<P>> que; vector<ll> dist(Grp.size(), INF); dist[s] = 0; que.push(P(0, s)); while (!que.empty()) { P p = que.top(); que.pop(); int v = p.second; if (dist[v] < p.first) continue; rep(i, 0, Grp[v].size()) { edge e = Grp[v][i]; if (dist[e.v] > dist[v] + e.cost) { dist[e.v] = dist[v] + e.cost; que.push(P(dist[e.v], e.v)); } } } return dist; } void fft(vector<com> &x, bool inv) { int s = x.size(); if (s == 1) return; vector<com> even(s / 2), odd(s / 2); rep(i, 0, s / 2) even[i] = x[i * 2], odd[i] = x[i * 2 + 1]; fft(even, inv), fft(odd, inv); com w = 1, w_0 = polar(1.0, (inv ? -1 : 1) * 2LL * M_PI / s); rep(i, 0, s) x[i] = even[i % (s / 2)] + w * odd[i % (s / 2)], w *= w_0; } void MultiFunction(vector<int> &a, vector<int> &b) { int n = a.size(), maxx = 1; while (maxx <= 2 * n) maxx *= 2; vector<com> x(maxx), y(maxx); rep(i, 0, n) x[i] = com(a[i], 0), y[i] = com(b[i], 0); fft(x, 0), fft(y, 0); rep(i, 0, maxx) x[i] *= y[i]; fft(x, 1); rep(i, 0, maxx) x[i] /= maxx; a.resize(2 * n - 1, 0); rep(i, 0, 2 * n - 1) a[i] = (int)(x[i].real() + 0.5); } ll merge_cnt(vector<int> a) { ll n = a.size(), ai = 0, bi = 0, ci = 0, cnt = 0; if (n <= 1) return 0; vector<int> b(a.begin(), a.begin() + n / 2); vector<int> c(a.begin() + n / 2, a.end()); cnt += merge_cnt(b) + merge_cnt(c); while (ai < n) { if (bi < b.size() && (ci == c.size() || b[bi] <= c[ci])) a[ai++] = b[bi++]; else cnt += n / 2LL - bi, a[ai++] = c[ci++]; } return cnt; } // template end vector<vector<int>> g; bool vis[100010], flag[100010]; set<P> st; vector<P> ans; void dfs(int v, int pre) { vis[v] = true; for (int u : g[v]) if (u != pre) { if (!vis[u]) dfs(u, v); else if (!st.count({v, u})) { ans.push_back({v, u}); st.insert({v, u}); st.insert({u, v}); flag[v] ^= 1; } } if (pre >= 0) { if (flag[v]) { ans.push_back({v, pre}); flag[v] ^= 1; } else { ans.push_back({pre, v}); flag[pre] ^= 1; } st.insert({v, pre}); st.insert({pre, v}); } } int main() { int n, m; cin >> n >> m; if (m % 2) { printf("-1"); return 0; } g.resize(n); rep(i, 0, m) { int u, v; cin >> u >> v; u--; v--; g[u].push_back(v); g[v].push_back(u); } dfs(0, -1); rep(i, 0, ans.size()) { printf("%lld %lld\n", ans[i].first + 1, ans[i].second + 1); } return 0; }
[ "expression.operation.binary.add" ]
784,341
784,342
u407614884
cpp
p02981
#include <algorithm> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; using ll = long long; using vll = vector<long long>; using sll = set<long long>; template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } template <typename T> map<T, T> primeFactor(T n) { map<T, T> res; for (T i = 2; i * i <= n; ++i) { while (n % i == 0) { res[i]++; n /= i; } } if (n != 1) res[n] = 1; return res; } template <typename T> bool IsPrimeNumber(T num) { if (num <= 2) return true; else if (num % 2 == 0) return false; double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { return false; } } return true; } #define in(x) cin >> x #define out(x) cout << x #define outn(x) cout << x << '\n' #define outs(x) cout << x << ' ' #define rep(i, s, e) for (ll i = s; i < e; i++) #define repeq(i, s, e) for (ll i = s; i <= e; i++) int main() { ll n, a, b; in(n); in(a); in(b); if (a < b) { outn(a * n); } else { outn(b * n); } return 0; }
#include <algorithm> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; using ll = long long; using vll = vector<long long>; using sll = set<long long>; template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } template <typename T> map<T, T> primeFactor(T n) { map<T, T> res; for (T i = 2; i * i <= n; ++i) { while (n % i == 0) { res[i]++; n /= i; } } if (n != 1) res[n] = 1; return res; } template <typename T> bool IsPrimeNumber(T num) { if (num <= 2) return true; else if (num % 2 == 0) return false; double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { return false; } } return true; } #define in(x) cin >> x #define out(x) cout << x #define outn(x) cout << x << '\n' #define outs(x) cout << x << ' ' #define rep(i, s, e) for (ll i = s; i < e; i++) #define repeq(i, s, e) for (ll i = s; i <= e; i++) int main() { ll n, a, b; in(n); in(a); in(b); if (a * n < b) { outn(a * n); } else { outn(b); } return 0; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
784,362
784,363
u757628628
cpp
p02981
#include <bits/stdc++.h> using namespace std; int mid(int a, int b, int c) { return a + b + c - max(max(a, b), c) - min(min(a, b), c); } int main() { int N, A, B; cin >> N >> A >> B; cout << min(A, B) * N << endl; }
#include <bits/stdc++.h> using namespace std; int mid(int a, int b, int c) { return a + b + c - max(max(a, b), c) - min(min(a, b), c); } int main() { int N, A, B; cin >> N >> A >> B; cout << min(A * N, B) << endl; }
[ "expression.operation.binary.remove" ]
784,364
784,365
u393754572
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A > B) { cout << B << endl; } else { cout << A << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A > B) { cout << B << endl; } else { cout << A * N << endl; } return 0; }
[ "expression.operation.binary.add" ]
784,368
784,369
u966045029
cpp
p02981
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << n * a + b << endl; }
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; }
[ "call.add", "io.output.change", "call.arguments.change" ]
784,383
784,384
u117734686
cpp
p02981
#include <cstdlib> #include <iostream> using namespace std; int main() { long long int A, B, N; cin >> N >> A >> B; if (N * A > B) cout << N * A << endl; else cout << B << endl; return 0; }
#include <cstdlib> #include <iostream> using namespace std; int main() { long long int A, B, N; cin >> N >> A >> B; if (N * A > B) cout << B << endl; else cout << N * A << endl; return 0; }
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "control_flow.branch.else.remove" ]
784,389
784,390
u163149221
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int ans; ans = min(n * a, n * b); cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int ans; ans = min(n * a, b); cout << ans << endl; return 0; }
[ "expression.operation.binary.remove" ]
784,391
784,392
u679159704
cpp
p02981
#include <bits/stdc++.h> #define ll long long #define ld long double #define f first #define s second #define mp make_pair #define pb push_back #define vll vector<ll> using namespace std; const ll N = 3e5 + 100; const ll MOD = 1e9 + 7; int main() { ll n, a, b; cin >> n >> a >> b; cout << min(a, b) * n << endl; return 0; }
#include <bits/stdc++.h> #define ll long long #define ld long double #define f first #define s second #define mp make_pair #define pb push_back #define vll vector<ll> using namespace std; const ll N = 3e5 + 100; const ll MOD = 1e9 + 7; int main() { ll n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; return 0; }
[ "expression.operation.binary.remove" ]
784,395
784,396
u435416250
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A >= B) { cout << N * A; } else { cout << B; } }
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A <= B) { cout << N * A; } else { cout << B; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,397
784,398
u431125128
cpp
p02981
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <string> #include <utility> #include <vector> using namespace std; typedef long long LL; typedef unsigned long long ULL; #define MEM(a, b) memset((a), (b), sizeof(a)) const LL INF = 1e9 + 7; const int N = 1e5 + 10; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n, a, b; cin >> n >> a >> b; cout << n * min(a, b) << endl; return 0; }
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <string> #include <utility> #include <vector> using namespace std; typedef long long LL; typedef unsigned long long ULL; #define MEM(a, b) memset((a), (b), sizeof(a)) const LL INF = 1e9 + 7; const int N = 1e5 + 10; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; return 0; }
[ "expression.operation.binary.remove" ]
784,403
784,404
u861345985
cpp
p02981
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <cstdio> #include <string> using namespace std; int main() { FILE *fin = NULL, *fout = NULL; // fin = freopen("input.txt", "r", stdin); // fout = freopen("output.txt", "w", stdout); int N, A, B; scanf("%d", &N, &A, &B); printf("%d", min(A * N, B)); // finalize if (NULL != fin) fclose(fin); if (NULL != fout) fclose(fout); return 0; }
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cmath> #include <cstdio> #include <string> using namespace std; int main() { FILE *fin = NULL, *fout = NULL; // fin = freopen("input.txt", "r", stdin); // fout = freopen("output.txt", "w", stdout); int N, A, B; scanf("%d%d%d", &N, &A, &B); printf("%d", min(A * N, B)); // finalize if (NULL != fin) fclose(fin); if (NULL != fout) fclose(fout); return 0; }
[ "literal.string.change", "call.arguments.change" ]
784,407
784,408
u103357948
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a <= n * b) cout << n * a << endl; else cout << n * b << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a < b) cout << n * a << endl; else cout << b << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
784,411
784,412
u368279380
cpp
p02981
#include <algorithm> #include <bitset> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, a, b; cin >> n >> a >> b; cout << n * min(a, b) << "\n"; return 0; }
#include <algorithm> #include <bitset> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << "\n"; return 0; }
[ "expression.operation.binary.remove" ]
784,413
784,414
u696290869
cpp
p02981
#include <bits/stdc++.h> using namespace std; //↓0-originか1-originでn回繰り返し #define rep(i, n) for (int i = 0; i < ((int)(n)); i++) // 0-origin昇順 #define rep1(i, n) for (int i = 1; i <= ((int)(n)); i++) // 1-origin昇順 #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) // 0-origin降順 #define rrep1(i, n) for (int i = ((int)(n)); i >= 1; i--) // 1-origin降順 // rep2 -> 第二引数 m から n 回繰り返し ex) m=5 n=3 なら i=5,i=6,i=7 まで #define rep2(i, m, n) for (int i = ((int)(m)); i < ((int)(n)) + ((int)(m)); i++) #define SIZE(x) ((int)((x).size())) #define all(x) (x).begin(), (x).end() typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<vi> vii; // 2次元配列 typedef vector<ll> vll; typedef vector<string> vs; template <typename T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } /*FUNCs=================================================*/ /*MAIN==================================================*/ int main() { cin.tie(nullptr); ios::sync_with_stdio(false); // cin cout 高速化 int n, a, b; cin >> n >> a >> b; cout << max(n * a, b) << '\n'; }
#include <bits/stdc++.h> using namespace std; //↓0-originか1-originでn回繰り返し #define rep(i, n) for (int i = 0; i < ((int)(n)); i++) // 0-origin昇順 #define rep1(i, n) for (int i = 1; i <= ((int)(n)); i++) // 1-origin昇順 #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) // 0-origin降順 #define rrep1(i, n) for (int i = ((int)(n)); i >= 1; i--) // 1-origin降順 // rep2 -> 第二引数 m から n 回繰り返し ex) m=5 n=3 なら i=5,i=6,i=7 まで #define rep2(i, m, n) for (int i = ((int)(m)); i < ((int)(n)) + ((int)(m)); i++) #define SIZE(x) ((int)((x).size())) #define all(x) (x).begin(), (x).end() typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<vi> vii; // 2次元配列 typedef vector<ll> vll; typedef vector<string> vs; template <typename T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; } /*FUNCs=================================================*/ /*MAIN==================================================*/ int main() { cin.tie(nullptr); ios::sync_with_stdio(false); // cin cout 高速化 int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << '\n'; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,419
784,420
u457985479
cpp
p02981
// All Heil Fire Lord Zuko #include <bits/stdc++.h> using namespace std; #define F first #define S second #define PB push_back #define debug(x) cerr << #x << " = " << x << endl #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() typedef long long ll; typedef long double ld; const int N = 2 * 100 * 1000 + 19; int32_t main() { ios::sync_with_stdio(false), cin.tie(0), cout.tie(0); int n, a, b; cin >> n >> a >> b; cout << n * min(a, b); return 0; }
// All Heil Fire Lord Zuko #include <bits/stdc++.h> using namespace std; #define F first #define S second #define PB push_back #define debug(x) cerr << #x << " = " << x << endl #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() typedef long long ll; typedef long double ld; const int N = 2 * 100 * 1000 + 19; int32_t main() { ios::sync_with_stdio(false), cin.tie(0), cout.tie(0); int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); return 0; }
[ "expression.operation.binary.remove" ]
784,421
784,422
u479179837
cpp
p02981
//自称高知能系Vtuberの高井茅乃です。 // Twitter: https://twitter.com/takaichino // YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw #include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1999999999 #define REP(i, n) for (int i = 0; i < n; i++) #define MODA 1000000007 int main() { int ans = 0; int a, b, n; cin >> n >> a >> b; cout << max(n * a, b) << endl; }
//自称高知能系Vtuberの高井茅乃です。 // Twitter: https://twitter.com/takaichino // YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw #include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1999999999 #define REP(i, n) for (int i = 0; i < n; i++) #define MODA 1000000007 int main() { int ans = 0; int a, b, n; cin >> n >> a >> b; cout << min(n * a, b) << endl; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,429
784,430
u450007962
cpp
p02981
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << min(a * b, c * a) << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << min(a * b, c) << endl; return 0; }
[ "expression.operation.binary.remove" ]
784,441
784,442
u795046389
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A > B) { cout << B << endl; } else if (N * A < B) { cout << N * A << endl; } else { cout << A << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A > B) { cout << B << endl; } else if (N * A < B) { cout << N * A << endl; } else { cout << B << endl; } }
[ "identifier.change", "io.output.change" ]
784,454
784,455
u578424352
cpp
p02981
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main(void) { int n, a, b; cin >> n >> a >> b; cout << min(n * a, n * b) << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main(void) { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; return 0; }
[ "expression.operation.binary.remove" ]
784,456
784,457
u980485808
cpp
p02981
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vd = vector<double>; using vc = vector<char>; #define REP(i, x, n) for (int i = x; i < n; i++) #define rep(i, n) REP(i, 0, n) #define all(x) x.begin(), x.end() int main() { int n, a, b; cin >> n >> a >> b; cout << max(n * a, b) << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vd = vector<double>; using vc = vector<char>; #define REP(i, x, n) for (int i = x; i < n; i++) #define rep(i, n) REP(i, 0, n) #define all(x) x.begin(), x.end() int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,460
784,461
u688825490
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; int tra, tax; tra = N * 2; tax = B; cout << min(tra, tax) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; int tra, tax; tra = N * A; tax = B; cout << min(tra, tax) << endl; }
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change" ]
784,468
784,469
u748757847
cpp
p02981
#include <iostream> #include <string> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A >= B) { cout << N * A << endl; } else { cout << B << endl; } return 0; }
#include <iostream> #include <string> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N * A <= B) { cout << N * A << endl; } else { cout << B << endl; } return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,472
784,473
u444645674
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (a >= b) cout << b * n << endl; else cout << a * n << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (a * n >= b) cout << b << endl; else cout << a * n << endl; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
784,474
784,475
u799521877
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a - b > c) { cout << c; } else { cout << a - b; } }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a * b > c) { cout << c; } else { cout << a * b; } }
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "io.output.change" ]
784,487
784,488
u842290168
cpp
p02981
#include <iostream> using namespace std; int main() { int a, b, c, ab; cin >> a >> b >> c; ab = a * b; if (ab < c) { cout << ab; } else if (c < ab) { cout << c << endl; } }
#include <iostream> using namespace std; int main() { int a, b, c, ab; cin >> a >> b >> c; ab = a * b; if (ab < c) { cout << ab; } else if (c < ab) { cout << c << endl; } else cout << c; }
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
784,489
784,490
u515468466
cpp
p02981
#include <iostream> using namespace std; #include <algorithm> int main() { int N, A, B; cin >> N >> A >> B; if (A * N > B) cout << A * N << endl; else cout << B << endl; }
#include <iostream> using namespace std; #include <algorithm> int main() { int N, A, B; cin >> N >> A >> B; if (A * N < B) cout << A * N << endl; else cout << B << endl; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,501
784,502
u419501474
cpp
p02981
#include <stdio.h> #include <stdlib.h> #include <string.h> void strInit(char str[]); // str[]を0で初期化 void extIntStr(char str[], int data[]); // str[]から数値(int)を抽出しdata[]に順次格納 void incsort(int data[], int len); // data[]を昇順ソート void decsort(int data[], int len); // data[]を降順ソート void printIntArray(int data[], int len); // data[]をprint int *inputArray( int n); //文字列を受け取り数値を抽出、n個の数値(int)を格納した配列のポインタをreturn int *cpyArray(int data[], int len); //配列(int)を複製した配列のポインタをreturn // don't forget free(data); int main() { int n, a, b; scanf("%d %d %d", &n, &a, &b); int ans = n * a; if (ans > b) ans = b; printf("%d", b); return 0; } // temp############################################## void strInit(char str[]) { int len = strlen(str); for (int i = 0; i < len; i++) { str[i] = 0; } } void extIntStr(char str[], int data[]) { int length = strlen(str); str[length - 1] = ' '; char buff[12]; int j, index; index = j = 0; for (int i = 0; i < length; i++) { if (str[i] != ' ') { buff[j++] = str[i]; } else { data[index++] = atoi(buff); strInit(buff); j = 0; } } } void incsort(int data[], int len) { for (int i = 0; i < len - 1; i++) { for (int j = i + 1; j < len; j++) { if (data[i] > data[j]) { int tmp = data[i]; data[i] = data[j]; data[j] = tmp; } } } } void decsort(int data[], int len) { for (int i = 0; i < len - 1; i++) { for (int j = i + 1; j < len; j++) { if (data[i] < data[j]) { int tmp = data[i]; data[i] = data[j]; data[j] = tmp; } } } } void printIntArray(int data[], int len) { for (int i = 0; i < len; i++) { printf("%d\n", data[i]); } } int *inputArray(int n) { int *data; data = (int *)malloc(sizeof(int) * n); char *get; get = (char *)malloc(sizeof(char) * 11 * n + 1); fgets(get, 11 * n + 1, stdin); extIntStr(get, data); free(get); return data; } int *cpyArray(int data[], int len) { int *cp; cp = (int *)malloc(sizeof(int) * len); for (int i = 0; i < len; i++) { cp[i] = data[i]; } return cp; } // temp##############################################
#include <stdio.h> #include <stdlib.h> #include <string.h> void strInit(char str[]); // str[]を0で初期化 void extIntStr(char str[], int data[]); // str[]から数値(int)を抽出しdata[]に順次格納 void incsort(int data[], int len); // data[]を昇順ソート void decsort(int data[], int len); // data[]を降順ソート void printIntArray(int data[], int len); // data[]をprint int *inputArray( int n); //文字列を受け取り数値を抽出、n個の数値(int)を格納した配列のポインタをreturn int *cpyArray(int data[], int len); //配列(int)を複製した配列のポインタをreturn // don't forget free(data); int main() { int n, a, b; scanf("%d %d %d", &n, &a, &b); int ans = n * a; if (ans > b) ans = b; printf("%d", ans); return 0; } // temp############################################## void strInit(char str[]) { int len = strlen(str); for (int i = 0; i < len; i++) { str[i] = 0; } } void extIntStr(char str[], int data[]) { int length = strlen(str); str[length - 1] = ' '; char buff[12]; int j, index; index = j = 0; for (int i = 0; i < length; i++) { if (str[i] != ' ') { buff[j++] = str[i]; } else { data[index++] = atoi(buff); strInit(buff); j = 0; } } } void incsort(int data[], int len) { for (int i = 0; i < len - 1; i++) { for (int j = i + 1; j < len; j++) { if (data[i] > data[j]) { int tmp = data[i]; data[i] = data[j]; data[j] = tmp; } } } } void decsort(int data[], int len) { for (int i = 0; i < len - 1; i++) { for (int j = i + 1; j < len; j++) { if (data[i] < data[j]) { int tmp = data[i]; data[i] = data[j]; data[j] = tmp; } } } } void printIntArray(int data[], int len) { for (int i = 0; i < len; i++) { printf("%d\n", data[i]); } } int *inputArray(int n) { int *data; data = (int *)malloc(sizeof(int) * n); char *get; get = (char *)malloc(sizeof(char) * 11 * n + 1); fgets(get, 11 * n + 1, stdin); extIntStr(get, data); free(get); return data; } int *cpyArray(int data[], int len) { int *cp; cp = (int *)malloc(sizeof(int) * len); for (int i = 0; i < len; i++) { cp[i] = data[i]; } return cp; } // temp##############################################
[ "identifier.change", "call.arguments.change", "io.output.change" ]
784,507
784,508
u493708099
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, s; cin >> n >> a >> b; s = n * a; if (s >= b) { cout << s; } else { cout << b; } }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, s; cin >> n >> a >> b; s = n * a; if (s <= b) { cout << s; } else { cout << b; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,511
784,512
u069273180
cpp
p02981
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (b <= a * n) { cout << b << endl; } else if (a * n > b) { cout << a * n << endl; } }
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (b <= a * n) { cout << b << endl; } else if (a * n < b) { cout << a * n << endl; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,513
784,514
u564004296
cpp
p02981
#include <iostream> #include <string> using namespace std; int main() { int a; int b; int c; int d = 0; int e = 0; cin >> a; cin >> b; cin >> c; d = a * b; if (a > d) { cout << d << endl; } else { cout << a << endl; } }
#include <iostream> #include <string> using namespace std; int main() { int a; int b; int c; int d = 0; int e = 0; cin >> a; cin >> b; cin >> c; d = a * b; if (c > d) { cout << d << endl; } else { cout << c << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change", "io.output.change" ]
784,515
784,516
u479202791
cpp
p02981
#include <iostream> #include <string> using namespace std; int main() { int a; int b; int c; int d = 0; int e = 0; cin >> a; cin >> b; cin >> c; d = a * b; if (a > d) { cout << a << endl; } else { cout << d << endl; } }
#include <iostream> #include <string> using namespace std; int main() { int a; int b; int c; int d = 0; int e = 0; cin >> a; cin >> b; cin >> c; d = a * b; if (c > d) { cout << d << endl; } else { cout << c << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change", "io.output.change" ]
784,517
784,516
u479202791
cpp
p02981
#include <iostream> #include <string> using namespace std; int main() { int a; int b; int c; int d = 0; int e = 0; cin >> a; cin >> b; cin >> c; d = a * b; if (a > b) { cout << a << endl; } else { cout << d << endl; } }
#include <iostream> #include <string> using namespace std; int main() { int a; int b; int c; int d = 0; int e = 0; cin >> a; cin >> b; cin >> c; d = a * b; if (c > d) { cout << d << endl; } else { cout << c << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change", "io.output.change" ]
784,518
784,516
u479202791
cpp
p02981
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << a * min(b, c) << '\n'; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << min(a * b, c) << '\n'; return 0; }
[ "expression.operation.binary.remove" ]
784,523
784,524
u678284395
cpp
p02981
#define NOMINMAX #define TEST_MODE true #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #include <random> #include <regex> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep2(i, a, b) for (int i = (a); i < (int)(b); ++i) #define rrep(i, n) for (int i = (n)-1; i >= 0; --i) #define rrep2(i, a, b) for (int i = (a)-1; i >= (int)b; --i) #define range(i, a, b, c) for (int i = a; c > 0 ? i < b : i > b; i += c) #define chmax(a, b) (a = (a) < (b) ? (b) : (a)) #define chmin(a, b) (a = (a) > (b) ? (b) : (a)) using ll = long long; using ull = unsigned long long; using ld = long double; #define all(a) begin(a), end(a) #define ifnot(a) if (not(a)) #define int long long #ifdef LOCAL_ENV #if TEST_MODE == true const bool test = true; #define dump(x) cerr << #x << " : " << (x) << " " #define dumpl(x) dump(x) << endl #else const bool test = false; #define dump(x) #define dumpl(x) #endif #else const bool test = false; #define dump(x) #define dumpl(x) #endif int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; const int inf = (int)1 << 60; const int undefined = inf; const ll INFL = (ll)1 << 60; ll mod_n = (int)1e9 + 7; const double eps = 1e-10; typedef long double Real; // return -1, 0, 1 int sgn(const Real &r) { return (r > eps) - (r < -eps); } int sgn(const Real &a, const Real &b) { return sgn(a - b); } //..................... const int MAX = (int)2e5 + 5; vector<string> split(const string &str, char sep) { vector<string> v; stringstream ss(str); string buffer; while (getline(ss, buffer, sep)) { v.push_back(buffer); } return v; } string join(const vector<string> &v, const string delim = 0) { string s; if (!v.empty()) { s += v[0]; for (decltype(v.size()) i = 1, c = v.size(); i < c; ++i) { if (delim != "") s += delim; s += v[i]; } } return s; } string operator*(const string &s, const int &n) { string res = ""; rep(i, n) res += s; return res; } template <class InputIterator> int sum(InputIterator begin, InputIterator end) { return accumulate(begin, end, 0ll); } template <typename T> T gcd(T a, T b) { if (a == inf) return b; if (b == inf) return a; T c; while (a != 0) { c = a; a = b % a; b = c; } return b; } template <typename T> T lcm(T m, T n) { return ((m / gcd(m, n)) * n); } template <typename T> T bit_count(T N) { T cnt = 0; while (N) { if (N & 1) cnt++; N >>= 1; } return cnt; } template <typename T> void print_vec(ostream &ostream, vector<T> a) { rep(i, a.size() - 1) ostream << a[i] << " "; ostream << a.back() << endl; } ll pow_n(ll x, ll n) { ll res = 1; while (n > 0) { if (n & 1) res = res * x; x = x * x; n >>= 1; } return res; } template <class T, class U> T mod_pow(T x, U n) { T res = 1; while (n > 0) { if (n & 1) res = res * x; x = x * x; x %= mod_n; n >>= 1; res %= mod_n; } return res; } template <class T> T mod_rev(T a) { T res = 1; return mod_pow(a, mod_n - 2); } int H, W; bool grid_ng(int y, int x) { return y < 0 || y >= H || x < 0 || x >= W; } struct Point { int x, y; Point(int y_, int x_) : y(y_), x(x_) {} bool operator<(const Point &r) const { if (y != r.y) return y < r.y; return x < r.x; } }; struct Vertex { int id, dist; bool operator>(const Vertex &r) const { return dist > r.dist; } }; struct Edge { int to, weight; Edge(int to, int weight) : to(to), weight(weight) {} }; using Graph = vector<vector<Edge>>; Graph g; int n, a, b; class Solver { public: void solve() { cin >> n >> a >> b; cout << a * n + b << endl; } }; signed main() { srand((unsigned int)time(NULL)); cout << fixed << setprecision(20); cerr << fixed << setprecision(3); auto ptr = new Solver(); ptr->solve(); delete ptr; // while(true) { // auto ptr = new Solver(); // ptr->solve(); // delete ptr; //} // while (true) { // if (cin.eof() == true) break; // auto ptr = new Solver(); // ptr->solve(); // delete ptr; //} return 0; }
#define NOMINMAX #define TEST_MODE true #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #include <random> #include <regex> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep2(i, a, b) for (int i = (a); i < (int)(b); ++i) #define rrep(i, n) for (int i = (n)-1; i >= 0; --i) #define rrep2(i, a, b) for (int i = (a)-1; i >= (int)b; --i) #define range(i, a, b, c) for (int i = a; c > 0 ? i < b : i > b; i += c) #define chmax(a, b) (a = (a) < (b) ? (b) : (a)) #define chmin(a, b) (a = (a) > (b) ? (b) : (a)) using ll = long long; using ull = unsigned long long; using ld = long double; #define all(a) begin(a), end(a) #define ifnot(a) if (not(a)) #define int long long #ifdef LOCAL_ENV #if TEST_MODE == true const bool test = true; #define dump(x) cerr << #x << " : " << (x) << " " #define dumpl(x) dump(x) << endl #else const bool test = false; #define dump(x) #define dumpl(x) #endif #else const bool test = false; #define dump(x) #define dumpl(x) #endif int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; const int inf = (int)1 << 60; const int undefined = inf; const ll INFL = (ll)1 << 60; ll mod_n = (int)1e9 + 7; const double eps = 1e-10; typedef long double Real; // return -1, 0, 1 int sgn(const Real &r) { return (r > eps) - (r < -eps); } int sgn(const Real &a, const Real &b) { return sgn(a - b); } //..................... const int MAX = (int)2e5 + 5; vector<string> split(const string &str, char sep) { vector<string> v; stringstream ss(str); string buffer; while (getline(ss, buffer, sep)) { v.push_back(buffer); } return v; } string join(const vector<string> &v, const string delim = 0) { string s; if (!v.empty()) { s += v[0]; for (decltype(v.size()) i = 1, c = v.size(); i < c; ++i) { if (delim != "") s += delim; s += v[i]; } } return s; } string operator*(const string &s, const int &n) { string res = ""; rep(i, n) res += s; return res; } template <class InputIterator> int sum(InputIterator begin, InputIterator end) { return accumulate(begin, end, 0ll); } template <typename T> T gcd(T a, T b) { if (a == inf) return b; if (b == inf) return a; T c; while (a != 0) { c = a; a = b % a; b = c; } return b; } template <typename T> T lcm(T m, T n) { return ((m / gcd(m, n)) * n); } template <typename T> T bit_count(T N) { T cnt = 0; while (N) { if (N & 1) cnt++; N >>= 1; } return cnt; } template <typename T> void print_vec(ostream &ostream, vector<T> a) { rep(i, a.size() - 1) ostream << a[i] << " "; ostream << a.back() << endl; } ll pow_n(ll x, ll n) { ll res = 1; while (n > 0) { if (n & 1) res = res * x; x = x * x; n >>= 1; } return res; } template <class T, class U> T mod_pow(T x, U n) { T res = 1; while (n > 0) { if (n & 1) res = res * x; x = x * x; x %= mod_n; n >>= 1; res %= mod_n; } return res; } template <class T> T mod_rev(T a) { T res = 1; return mod_pow(a, mod_n - 2); } int H, W; bool grid_ng(int y, int x) { return y < 0 || y >= H || x < 0 || x >= W; } struct Point { int x, y; Point(int y_, int x_) : y(y_), x(x_) {} bool operator<(const Point &r) const { if (y != r.y) return y < r.y; return x < r.x; } }; struct Vertex { int id, dist; bool operator>(const Vertex &r) const { return dist > r.dist; } }; struct Edge { int to, weight; Edge(int to, int weight) : to(to), weight(weight) {} }; using Graph = vector<vector<Edge>>; Graph g; int n, a, b; class Solver { public: void solve() { cin >> n >> a >> b; cout << min(a * n, b) << endl; } }; signed main() { srand((unsigned int)time(NULL)); cout << fixed << setprecision(20); cerr << fixed << setprecision(3); auto ptr = new Solver(); ptr->solve(); delete ptr; // while(true) { // auto ptr = new Solver(); // ptr->solve(); // delete ptr; //} // while (true) { // if (cin.eof() == true) break; // auto ptr = new Solver(); // ptr->solve(); // delete ptr; //} return 0; }
[ "call.add", "io.output.change", "call.arguments.change" ]
784,532
784,533
u495267515
cpp
p02981
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int n, a, b; cin >> n >> b; cout << min(n * a, b); return 0; }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); return 0; }
[ "expression.operation.binary.add" ]
784,536
784,537
u438621426
cpp
p02981
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<bool> vb; #define pb push_back #define mp make_pair #define f first #define s second #define in insert #define FOR(i, a, b) for (int i = a; i < b; i++) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define speed \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); const int INF = 1e9 + 5; int main() { int n, a, b; cin >> n >> a >> b; cout << n * min(a, b); }
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<bool> vb; #define pb push_back #define mp make_pair #define f first #define s second #define in insert #define FOR(i, a, b) for (int i = a; i < b; i++) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define speed \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); const int INF = 1e9 + 5; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); }
[ "expression.operation.binary.remove" ]
784,538
784,539
u843739531
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { // 整数の入力 int n, a, b; int chage; cin >> n >> a >> b; if (n * a > b) { chage = b; } else { chage = a; } cout << chage << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { // 整数の入力 int n, a, b; int chage; cin >> n >> a >> b; if (n * a > b) { chage = b; } else { chage = n * a; } cout << chage << endl; return 0; }
[ "assignment.change" ]
784,545
784,546
u761994361
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a < b) { cout << n; } else { cout << b; } }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a < b) { cout << n * a; } else { cout << b; } }
[ "expression.operation.binary.add" ]
784,557
784,558
u397732894
cpp
p02981
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a >= b) { cout << b << endl; } else { cout << a << endl; } return 0; }
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a >= b) { cout << b << endl; } else { cout << n * a << endl; } return 0; }
[ "expression.operation.binary.add" ]
784,561
784,562
u647653350
cpp
p02981
#include <bits/stdc++.h> using namespace std; #define sc(x) scanf("%d", &x); #define rep(x, n) for (int x = 0; x < n; x++) #define ll long long #define finish(x) return cout << x << endl, 0; #define scarr(a, n) \ for (int x = 0; x < n; x++) \ scanf("%d", &a[x]); int main() { int n, a, b; cin >> n >> a >> b; cout << n * min(a, b) << endl; }
#include <bits/stdc++.h> using namespace std; #define sc(x) scanf("%d", &x); #define rep(x, n) for (int x = 0; x < n; x++) #define ll long long #define finish(x) return cout << x << endl, 0; #define scarr(a, n) \ for (int x = 0; x < n; x++) \ scanf("%d", &a[x]); int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; }
[ "expression.operation.binary.remove" ]
784,567
784,568
u091622975
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a < b) { cout << b; } else { cout << n * a; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a > b) { cout << b; } else { cout << n * a; } return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,582
784,583
u777477705
cpp
p02981
#define A return 0; #define AA int #define AAA ; #define AAAA if #define AAAAA ( #define AAAAAA ) #define AAAAAAA cin #define AAAAAAAA >> #define AAAAAAAAA cout #define AAAAAAAAAA << #define AAAAAAAAAAA endl #define AAAAAAAAAAAA , #define AAAAAAAAAAAAA * #define AAAAAAAAAAAAAA = #define AAAAAAAAAAAAAAA else #define AAAAAAAAAAAAAAAA < #include <algorithm> #include <iostream> #include <string> using namespace std; int main() { AA a AAAAAAAAAAAA aa AAAAAAAAAAAA aaa AAA AAAAAAA AAAAAAAA a AAAAAAAA aa AAAAAAAA aaa AAA AA aaaa AAAAAAAAAAAAAA a AAAAAAAAAAAAA aa AAA AAAA AAAAA aaaa AAAAAAAAAAAAAAAA aaa AAAAAA AAAAAAAAA AAAAAAAAAA aaaa AAAAAAAAAA AAAAAAAAAAA AAA AAAAAAAAAAAAAAA AAAAAAAAA AAAAAAAAAA aaaa AAAAAAAAAA AAAAAAAAAAA AAA A }
#define A return 0; #define AA int #define AAA ; #define AAAA if #define AAAAA ( #define AAAAAA ) #define AAAAAAA cin #define AAAAAAAA >> #define AAAAAAAAA cout #define AAAAAAAAAA << #define AAAAAAAAAAA endl #define AAAAAAAAAAAA , #define AAAAAAAAAAAAA * #define AAAAAAAAAAAAAA = #define AAAAAAAAAAAAAAA else #define AAAAAAAAAAAAAAAA < #include <algorithm> #include <iostream> #include <string> using namespace std; int main() { AA a AAAAAAAAAAAA aa AAAAAAAAAAAA aaa AAA AAAAAAA AAAAAAAA a AAAAAAAA aa AAAAAAAA aaa AAA AA aaaa AAAAAAAAAAAAAA a AAAAAAAAAAAAA aa AAA AAAA AAAAA aaaa AAAAAAAAAAAAAAAA aaa AAAAAA AAAAAAAAA AAAAAAAAAA aaaa AAAAAAAAAA AAAAAAAAAAA AAA AAAAAAAAAAAAAAA AAAAAAAAA AAAAAAAAAA aaa AAAAAAAAAA AAAAAAAAAAA AAA A }
[ "identifier.change" ]
784,590
784,591
u274962354
cpp
p02981
#include <bits/stdc++.h> #define SZ(x) ((int)(x).size()) typedef long long ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cout.setf(ios::fixed); cout.precision(20); int n, a, b; cin >> n >> a >> b; cout << n * min(a, b) << "\n"; }
#include <bits/stdc++.h> #define SZ(x) ((int)(x).size()) typedef long long ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cout.setf(ios::fixed); cout.precision(20); int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << "\n"; }
[ "expression.operation.binary.remove" ]
784,598
784,599
u282817279
cpp
p02981
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << max(n * a, b) << endl; return 0; }
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; return 0; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,600
784,601
u373958718
cpp
p02981
#include <iostream> using namespace std; int n, a, b; int main() { cin >> n >> a >> b; cout << max(a * n, b) << endl; }
#include <iostream> using namespace std; int n, a, b; int main() { cin >> n >> a >> b; cout << min(a * n, b) << endl; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,604
784,605
u843139357
cpp
p02981
#include <bits/stdc++.h> #include <cmath> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define SUBL \ freopen("/home/ajinkya/Desktop/input.txt", "r", stdin); \ freopen("/home/ajinkya/Desktop/output.txt", "w", stdout); #define ll long long #define ull unsigned long long #define FI(i, a, n) for (int i = a; i <= n; i++) #define RFI(i, n, a) for (int i = n; i >= a; i--) #define FLL(i, a, n) for (ll i = a; i <= n; i++) #define RFLL(i, n, a) for (ll i = n; i >= a; i--) #define vi vector<int> #define vll vector<ll> #define all(v) v.begin(), v.end() #define pll pair<ll, ll> #define pi pair<int, int> #define GCD(a, b) __gcd(a, b) #define MP make_pair #define PB push_back #define PF push_front #define LB lower_bound #define UB upper_bound #define debug(x) cout << x << endl #define MOD 1000000007 #define INF LLONG_MAX #define PI 3.14159265359 using namespace std; int main() { fastio // SUBL ll n, a, b; cin >> n >> a >> b; cout << n * min(a, b); return 0; }
#include <bits/stdc++.h> #include <cmath> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define SUBL \ freopen("/home/ajinkya/Desktop/input.txt", "r", stdin); \ freopen("/home/ajinkya/Desktop/output.txt", "w", stdout); #define ll long long #define ull unsigned long long #define FI(i, a, n) for (int i = a; i <= n; i++) #define RFI(i, n, a) for (int i = n; i >= a; i--) #define FLL(i, a, n) for (ll i = a; i <= n; i++) #define RFLL(i, n, a) for (ll i = n; i >= a; i--) #define vi vector<int> #define vll vector<ll> #define all(v) v.begin(), v.end() #define pll pair<ll, ll> #define pi pair<int, int> #define GCD(a, b) __gcd(a, b) #define MP make_pair #define PB push_back #define PF push_front #define LB lower_bound #define UB upper_bound #define debug(x) cout << x << endl #define MOD 1000000007 #define INF LLONG_MAX #define PI 3.14159265359 using namespace std; int main() { fastio // SUBL ll n, a, b; cin >> n >> a >> b; cout << min(n * a, b); return 0; }
[ "expression.operation.binary.remove" ]
784,606
784,607
u851831516
cpp
p02981
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << max(n * a, b); }
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,616
784,617
u778738287
cpp
p02981
#include <algorithm> #include <bitset> #include <cmath> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; typedef pair<int, int> P; const int inf = 1012345678; int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, 1, -1}; int main() { int N, A, B; cin >> N >> A >> B; cout << max(B, A * N) << endl; return 0; }
#include <algorithm> #include <bitset> #include <cmath> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; typedef pair<int, int> P; const int inf = 1012345678; int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, 1, -1}; int main() { int N, A, B; cin >> N >> A >> B; cout << min(B, A * N) << endl; return 0; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,629
784,630
u950174376
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B, minimum; cin >> N, A, B; minimum = min(N * A, B); cout << minimum; }
#include <bits/stdc++.h> using namespace std; int main() { int N, A, B, minimum; cin >> N >> A >> B; minimum = min(N * A, B); cout << minimum; }
[]
784,641
784,642
u447604786
cpp
p02981
#include <algorithm> #include <bitset> #include <fstream> #include <iostream> #include <map> #include <stack> #include <string> #include <vector> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << max(n * a, b); }
#include <algorithm> #include <bitset> #include <fstream> #include <iostream> #include <map> #include <stack> #include <string> #include <vector> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,649
784,650
u531246940
cpp
p02981
#include <stdio.h> int main(void) { int N, A, B; scanf("%d %d %d", N, A, B); if (A * N >= B) printf("%d", B); else printf("%d", A * N); return 0; }
#include <stdio.h> int main(void) { int N, A, B; scanf("%d %d %d", &N, &A, &B); if (A * N >= B) printf("%d", B); else printf("%d", A * N); return 0; }
[ "expression.operation.unary.reference.add" ]
784,668
784,669
u302993900
cpp
p02981
#pragma GCC optimize("O3") #pragma GCC target("sse4") #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 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; #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() #define shandom_ruffle random_shuffle 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 n, a, b; cin >> n >> a >> b; ll res = a * n < b * n ? a * n : b * n; cout << res << endl; return 0; } // read the question correctly (ll vs int) // template by super1 derived from bqi343
#pragma GCC optimize("O3") #pragma GCC target("sse4") #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 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; #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() #define shandom_ruffle random_shuffle 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 n, a, b; cin >> n >> a >> b; ll res = a * n < b ? a * n : b; cout << res << endl; return 0; } // read the question correctly (ll vs int) // template by super1 derived from bqi343
[ "expression.operation.binary.remove" ]
784,683
784,684
u422558819
cpp
p02981
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; bool used[1005]; int main() { int a, b, c; cin >> a >> b >> c; cout << min(a * b, a * c); }
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; bool used[1005]; int main() { int a, b, c; cin >> a >> b >> c; cout << min(a * b, c); }
[ "expression.operation.binary.remove" ]
784,695
784,696
u361768313
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int a, b, n; cin >> n >> a >> b; if (n * a >= b) { cout << b << '\n'; } else { cout << a << '\n'; } return (0); }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, n; cin >> n >> a >> b; if (n * a >= b) { cout << b << '\n'; } else { cout << a * n << '\n'; } return (0); }
[ "expression.operation.binary.add" ]
784,701
784,702
u600244905
cpp
p02981
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class S, class T> ostream &operator<<(ostream &out, const pair<S, T> &o) { out << "(" << o.first << "," << o.second << ")"; return out; } template <class T> ostream &operator<<(ostream &out, const vector<T> &V) { for (int i = 0; i < V.size(); i++) { out << V[i]; if (i != V.size() - 1) out << " "; } return out; } template <class T> ostream &operator<<(ostream &out, const vector<vector<T>> &Mat) { for (int i = 0; i < Mat.size(); i++) { if (i != 0) out << endl; out << Mat[i]; } return out; } template <class S, class T> ostream &operator<<(ostream &out, const map<S, T> &mp) { out << "{ "; for (auto it = mp.begin(); it != mp.end(); it++) { out << it->first << ":" << it->second; if (mp.size() - 1 != distance(mp.begin(), it)) out << ", "; } out << " }"; return out; } template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); } template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); } template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; } template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for (auto &e : t) fill_v(e, v); } /* <url:https://atcoder.jp/contests/abc133/tasks/abc133_a> 問題文============================================================ ================================================================= 解説============================================================= N*AとBを比較して小さい方を出力 ================================================================ */ template <class Type> Type solve(Type res = Type()) { ll N, A, B; cin >> N >> A >> B; cout << min(N * A, B) << endl; return res; } int main(void) { cin.tie(0); ios_base::sync_with_stdio(false); // solve(0); cout << fixed << setprecision(15) << solve<ll>() << endl; return 0; }
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } template <class S, class T> ostream &operator<<(ostream &out, const pair<S, T> &o) { out << "(" << o.first << "," << o.second << ")"; return out; } template <class T> ostream &operator<<(ostream &out, const vector<T> &V) { for (int i = 0; i < V.size(); i++) { out << V[i]; if (i != V.size() - 1) out << " "; } return out; } template <class T> ostream &operator<<(ostream &out, const vector<vector<T>> &Mat) { for (int i = 0; i < Mat.size(); i++) { if (i != 0) out << endl; out << Mat[i]; } return out; } template <class S, class T> ostream &operator<<(ostream &out, const map<S, T> &mp) { out << "{ "; for (auto it = mp.begin(); it != mp.end(); it++) { out << it->first << ":" << it->second; if (mp.size() - 1 != distance(mp.begin(), it)) out << ", "; } out << " }"; return out; } template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); } template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); } template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; } template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for (auto &e : t) fill_v(e, v); } /* <url:https://atcoder.jp/contests/abc133/tasks/abc133_a> 問題文============================================================ ================================================================= 解説============================================================= N*AとBを比較して小さい方を出力 ================================================================ */ template <class Type> Type solve(Type res = Type()) { ll N, A, B; cin >> N >> A >> B; res = min(N * A, B); return res; } int main(void) { cin.tie(0); ios_base::sync_with_stdio(false); // solve(0); cout << fixed << setprecision(15) << solve<ll>() << endl; return 0; }
[ "expression.operation.binary.remove" ]
784,715
784,716
u728732647
cpp
p02981
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a <= n * b) cout << n * a; else cout << n * b; }
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a <= b) cout << n * a; else cout << b; }
[ "expression.operation.binary.remove" ]
784,717
784,718
u228232845
cpp
p02981
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int inf = -1000; int main() { int a, b, c; cin >> a >> b >> c; cout << min(a * b, a * c); return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int inf = -1000; int main() { int a, b, c; cin >> a >> b >> c; cout << min(a * b, c); return 0; }
[ "expression.operation.binary.remove" ]
784,731
784,732
u702142173
cpp
p02981
#include <iostream> #include <string> using namespace std; int main() { int N; int A; int B; int yen; cin >> N; cin >> A; cin >> B; if (A < B) { yen = N * A; } else { yen = N * B; } cout << yen << endl; }
#include <iostream> #include <string> using namespace std; int main() { int N; int A; int B; int yen; cin >> N; cin >> A; cin >> B; if (A * N <= B) { yen = N * A; } else { yen = B; } cout << yen << endl; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
784,741
784,742
u633728454
cpp
p02981
#include <algorithm> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { int N, T, C; cin >> N >> T >> C; if (N * T > C) cout << N * T << endl; else cout << C << endl; }
#include <algorithm> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { int N, T, C; cin >> N >> T >> C; if (N * T > C) cout << C << endl; else cout << N * T << endl; }
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "control_flow.branch.else.remove" ]
784,743
784,744
u431929942
cpp
p02981
#include <bits/stdc++.h> #include <chrono> #define watch(x) cout << (#x) << " is " << (x) << endl #define eps 1e-9 #define f first #define s second typedef long long ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, a, b; cin >> n >> a >> b; cout << n * min(a, b); return 0; }
#include <bits/stdc++.h> #include <chrono> #define watch(x) cout << (#x) << " is " << (x) << endl #define eps 1e-9 #define f first #define s second typedef long long ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); return 0; }
[ "expression.operation.binary.remove" ]
784,750
784,751
u409343817
cpp
p02981
#include <bits/stdc++.h> #define itn int #define REP(i, n) for (int i = 0; i < (n); i++) #define IREP(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REPEACH(itr, k) for (auto &&itr : k) #define MOD 1000000007 using namespace std; typedef long long ll; const ll INF = 1LL << 60; typedef pair<double, int> P; int main() { int n; int a, b; cin >> n >> a >> b; cout << max(n * a, b) << endl; }
#include <bits/stdc++.h> #define itn int #define REP(i, n) for (int i = 0; i < (n); i++) #define IREP(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, k, n) for (int i = (k); i < (n); i++) #define REPEACH(itr, k) for (auto &&itr : k) #define MOD 1000000007 using namespace std; typedef long long ll; const ll INF = 1LL << 60; typedef pair<double, int> P; int main() { int n; int a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; }
[ "misc.opposites", "identifier.change", "call.function.change", "io.output.change" ]
784,759
784,760
u118875091
cpp
p02981
#include <stdio.h> int main() { int N, A, B; scanf("%d%d%d", N, A, B); if (N * A <= B) printf("%d\n", N * A); else printf("%d\n", B); return 0; }
#include <stdio.h> int main() { int N, A, B; scanf("%d%d%d", &N, &A, &B); if (N * A <= B) printf("%d\n", N * A); else printf("%d\n", B); return 0; }
[ "expression.operation.unary.reference.add" ]
784,763
784,764
u507850687
cpp
p02981
#include <algorithm> #include <cstdio> using namespace std; int n, a, b; int main() { scanf("%d %d %d", &n, &a, &b); a *= n; printf("%d", max(a, b)); return 0; }
#include <algorithm> #include <cstdio> using namespace std; int n, a, b; int main() { scanf("%d %d %d", &n, &a, &b); a *= n; printf("%d", min(a, b)); return 0; }
[ "misc.opposites", "identifier.change", "call.function.change", "call.arguments.change", "io.output.change" ]
784,765
784,766
u316376808
cpp
p02981
#include <algorithm> #include <cstdio> using namespace std; int n, a, b; int main() { scanf("%d %d %d", &n, &a, &b); a *= n; printf("%d", max(a, n)); return 0; }
#include <algorithm> #include <cstdio> using namespace std; int n, a, b; int main() { scanf("%d %d %d", &n, &a, &b); a *= n; printf("%d", min(a, b)); return 0; }
[ "misc.opposites", "identifier.change", "call.function.change", "call.arguments.change", "io.output.change" ]
784,767
784,766
u316376808
cpp
p02981
/* lakshaygpt28 Lakshay Gupta */ #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; using ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vll = vector<ll>; template <typename T> using OrderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typename T> using MinPriorityQueue = priority_queue<T, vector<T>, greater<T>>; #ifndef ONLINE_JUDGE #define debug(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cerr << name << " : " << arg1 << std ::endl; } template <typename Arg1, typename... Args> void __f(const char *names, Arg1 &&arg1, Args &&...args) { const char *comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...); } #else #define debug(...) #endif #define fast_io() \ ios_base ::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define eb emplace_back #define mp make_pair #define pb push_back #define mt make_tuple #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() const db PI = acos(-1); const ll LINF = LLONG_MAX; const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10; int main() { fast_io(); ll n, a, b; cin >> n >> a >> b; if (n * a > b) { cout << n * a << "\n"; } else { cout << b << "\n"; } return 0; }
/* lakshaygpt28 Lakshay Gupta */ #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; using ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vll = vector<ll>; template <typename T> using OrderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typename T> using MinPriorityQueue = priority_queue<T, vector<T>, greater<T>>; #ifndef ONLINE_JUDGE #define debug(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cerr << name << " : " << arg1 << std ::endl; } template <typename Arg1, typename... Args> void __f(const char *names, Arg1 &&arg1, Args &&...args) { const char *comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...); } #else #define debug(...) #endif #define fast_io() \ ios_base ::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define eb emplace_back #define mp make_pair #define pb push_back #define mt make_tuple #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() const db PI = acos(-1); const ll LINF = LLONG_MAX; const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10; int main() { fast_io(); ll n, a, b; cin >> n >> a >> b; if (n * a < b) { cout << n * a << "\n"; } else { cout << b << "\n"; } return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,773
784,774
u295509734
cpp
p02981
#include <bits/stdc++.h> using ll = long long; using namespace std; constexpr static ll MOD = 1000000007ll; constexpr static int INF = 1 << 28; // for x <= 10^9 constexpr static ll INFL = 1ll << 60; // for x <= 10^19 constexpr static double EPS = 1e-10; int main() { int n, a, b; cin >> n >> a >> b; cout << min(a, n * b) << endl; }
#include <bits/stdc++.h> using ll = long long; using namespace std; constexpr static ll MOD = 1000000007ll; constexpr static int INF = 1 << 28; // for x <= 10^9 constexpr static ll INFL = 1ll << 60; // for x <= 10^19 constexpr static double EPS = 1e-10; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; }
[ "call.arguments.change", "call.arguments.add" ]
784,778
784,779
u784448849
cpp
p02981
#include <iostream> using namespace std; int N, A, B; int main() { ios::sync_with_stdio(false); cin >> N >> A >> B; cout << (N * A > B ? B : A) << endl; return 0; }
#include <iostream> using namespace std; int N, A, B; int main() { ios::sync_with_stdio(false); cin >> N >> A >> B; cout << (N * A > B ? B : A * N); return 0; }
[ "expression.operation.binary.remove" ]
784,782
784,783
u667132583
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a >= b) { cout << b << endl; } else { cout << a * b << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (n * a >= b) { cout << b << endl; } else { cout << a * n << endl; } }
[ "identifier.change", "io.output.change" ]
784,792
784,793
u330025192
cpp
p02981
/*#pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math")*/ #include <bits/stdc++.h> #include <stdio.h> using namespace std; #define amen ; #define vec vector #define pb push_back #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define Str(x) to_string(x) #define len(s) (int)s.size() typedef long long ll; typedef double d; typedef long double lld; typedef string str; typedef unsigned long long ull; typedef unsigned int ui; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifdef LOCAL freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int n, a, b; cin >> n >> a >> b; cout << n * min(a, b); return 0; }
/*#pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math")*/ #include <bits/stdc++.h> #include <stdio.h> using namespace std; #define amen ; #define vec vector #define pb push_back #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define Str(x) to_string(x) #define len(s) (int)s.size() typedef long long ll; typedef double d; typedef long double lld; typedef string str; typedef unsigned long long ull; typedef unsigned int ui; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifdef LOCAL freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); return 0; }
[ "expression.operation.binary.remove" ]
784,798
784,799
u787195982
cpp
p02981
#include <bits/stdc++.h> using namespace std; int p, a, b; void check(int p, int a, int b) { if (p * a < p * b) { cout << p * a; return; } if (p * a == p * b) { cout << p * a; return; } cout << p * b; } int main() { cin >> p >> a >> b; check(p, a, b); return 0; }
#include <bits/stdc++.h> using namespace std; int p, a, b; void check(int p, int a, int b) { if (p * a < b) { cout << p * a; return; } if (p * a == b) { cout << p * a; return; } cout << b; } int main() { cin >> p >> a >> b; check(p, a, b); return 0; }
[ "expression.operation.binary.remove" ]
784,804
784,805
u722193545
cpp
p02981
#include <iostream> #include <string> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (a * n >= b) { cout << a * n << endl; } else { cout << b << endl; } }
#include <iostream> #include <string> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if (a * n >= b) { cout << b << endl; } else { cout << a * n << endl; } }
[ "control_flow.branch.else.add" ]
784,806
784,807
u536221891
cpp
p02981
/***"In the name of Allah(swt), the most gracious, most merciful. Allah(swt) * blesses with knowledge whom he wants."***/ /*Header file starts here*/ //#include<bits/stdc++.h> #include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> /*Header file ends here*/ /*Macro starts here*/ #define fasterInOut \ ios::sync_with_stdio(false); \ cin.tie(0); #define fin(in) freopen("in.txt", "r", stdin) #define fout(out) freopen("out.txt", "w", stdout) #define pb push_back #define ll long long #define lld I64d // for CF submissions #define rh cout << "Reached Here\n" #define inf LONG_LONG_MAX #define neginf LONG_LONG_MIN #define forit(it, s) \ for (__typeof((s).end()) it = (s).begin(); it != (s).end(); it++) #define string_reverse(s) \ reverse(s.begin(), s.end()) // Vector also can be reversed with this function #define memz(x) memset(x, 0, sizeof(x)); #define memneg(x) memset(x, -1, sizeof(x)); // Geometry & Maths #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b) / gcd(a, b) #define pi acos(-1.0) #define negmod(ans, x, m) \ ll y = (-1 * x) % m; \ if (y == 0) \ ans = 0; \ else \ ans = m - y; // for negative mod only i.e. when x<0. Undefined when m<0 #define dis(x1, y1, x2, y2) sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) #define t_area(a, b, c, s) \ sqrt(s *(s - a) * (s - b) * (s - c)) // s= (a+b+c)/2.0 #define t_angle(a, b, c) \ acos((a * a + b * b - c * c) / \ (2 * a * b)) // returns angle C in radian. a, b, c are anti-clockwise // formatted and side a and b form angle C #define pointPos(x1, y1, x2, y2, x3, y3) \ ((x2 - x1) * (y3 - y1)) - \ ((x3 - x1) * (y2 - y1)); /*returns NEGATIVE if the Point P3 is on the \ RIGHT side of the line P1P2, otherwise returns POSITIVE in case of LEFT and \ ZERO when the point is on the line*/ #define t_areaWithPoints(x1, y1, x2, y2, x3, y3) \ abs(0.5 * \ (x1 * (y2 - y3) + x2 * (y3 - y1) + \ x3 * \ (y1 - y2))); // returns the area of a triangle formed by P1, p2, p3 // Base Conversions #define toBin(bin, n) \ bin = bitset<8>(n).to_string() // returns a corresponding 8 bit Binary string // 'bin' of integer 'n' #define toOct(oct, n, ch) /*char ch[100]*/ \ sprintf(ch, "%o", n); \ oct = ch; // returns a string 'oct'(maximum 100 length): Octal represent of // number 'n' #define toHex(hex, n, ch) /*char ch[100]*/ \ sprintf(ch, "%x", n); \ hex = ch; // returns a string 'hex'(maximum 100 length): Hexadecimal represent // of number 'n' #define intToString(s, n, itos) /*stringstream itos;*/ \ itos << n; \ s = itos.str(); // converts a number 'n' to a string 's' #define stringToint(n, s) \ stringstream stoi(s); \ stoi >> n; // converts a string 's' to a number 'n'---ONLY ONCE USABLE--- // Others #define substring(s1, s2) \ strstr(s1.c_str(), \ s2.c_str()) // returns true if s1 contains s2 in O(n^2) complexity #define strCharRemove(s, c) \ s.erase(remove(s.begin(), s.end(), c), \ s.end()); // Removes all character 'c' from the string 's' #define strLastCharRemove(s) \ s.erase(s.end() - 1) // Removes last(position is given by s.end()-1) character // form string 's' #define vectorEraseSingle(v, pos) \ v.erase(v.begin() + pos) // Erases an element from "pos' position in zero // based index from the vector 'v' #define vectorEraseRange(v, spos, fpos) \ v.erase(v.begin() + spos, \ v.begin() + fpos) // Erases range inclusive spos' to // EXCLUSIVE(without) 'fpos' from vector 'v' #define lowerBound(v, elem) \ (lower_bound(v.begin(), v.end(), elem)) - v.begin(); /*returns the lower \ bound of 'elem' in integer(ZERO BASED INDEX), where lower bound means the \ LEFTMOST index where there is any integer which is GREATER OR EQUAL to \ 'elem'.*/ #define upperBound(v, elem) \ (upper_bound(v.begin(), v.end(), elem)) - v.begin(); /*returns the upper \ bound of 'elem' in integer(ZERO BASED INDEX), where upper bound means the \ LEFTMOST index where there is any integer which is GREATER than 'elem'.*/ #define setLowerBound(st, elem) st.lower_bound(elem));/*returns the lower bound ITERATOR of 'elem' in the stl set 'st', where lower bound means the LEFTMOST index where there is any integer which is GREATER OR EQUAL to 'elem'.*/ #define setUpperBound(st, elem) st.upper_bound(elem));/*returns the upper bound ITERATOR of 'elem' in the stl set 'st', where upper bound means the LEFTMOST index where there is any integer which is GREATER than 'elem'.*/ #define clearPQ(pq, type) \ pq = priority_queue<type>() /*It clears a priority queue by redeclaration*/ #define minPQ(PQ_name, type) \ priority_queue<type, vector<type>, greater<type>> \ PQ_name; /*min priority queue with built in type i.e int or long long \ etc. */ #define sortArr(arr, sz) \ sort(arr + 1, arr + (sz + 1)); /*Sorts an array from index 1 to index 'sz'*/ /*Macro ends here*/ // add vector descending sorting using namespace std; int main() { fasterInOut; ll n, a, b; cin >> n >> a >> b; cout << n * (min(a, b)) << endl; return 0; }
/***"In the name of Allah(swt), the most gracious, most merciful. Allah(swt) * blesses with knowledge whom he wants."***/ /*Header file starts here*/ //#include<bits/stdc++.h> #include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> /*Header file ends here*/ /*Macro starts here*/ #define fasterInOut \ ios::sync_with_stdio(false); \ cin.tie(0); #define fin(in) freopen("in.txt", "r", stdin) #define fout(out) freopen("out.txt", "w", stdout) #define pb push_back #define ll long long #define lld I64d // for CF submissions #define rh cout << "Reached Here\n" #define inf LONG_LONG_MAX #define neginf LONG_LONG_MIN #define forit(it, s) \ for (__typeof((s).end()) it = (s).begin(); it != (s).end(); it++) #define string_reverse(s) \ reverse(s.begin(), s.end()) // Vector also can be reversed with this function #define memz(x) memset(x, 0, sizeof(x)); #define memneg(x) memset(x, -1, sizeof(x)); // Geometry & Maths #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b) / gcd(a, b) #define pi acos(-1.0) #define negmod(ans, x, m) \ ll y = (-1 * x) % m; \ if (y == 0) \ ans = 0; \ else \ ans = m - y; // for negative mod only i.e. when x<0. Undefined when m<0 #define dis(x1, y1, x2, y2) sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) #define t_area(a, b, c, s) \ sqrt(s *(s - a) * (s - b) * (s - c)) // s= (a+b+c)/2.0 #define t_angle(a, b, c) \ acos((a * a + b * b - c * c) / \ (2 * a * b)) // returns angle C in radian. a, b, c are anti-clockwise // formatted and side a and b form angle C #define pointPos(x1, y1, x2, y2, x3, y3) \ ((x2 - x1) * (y3 - y1)) - \ ((x3 - x1) * (y2 - y1)); /*returns NEGATIVE if the Point P3 is on the \ RIGHT side of the line P1P2, otherwise returns POSITIVE in case of LEFT and \ ZERO when the point is on the line*/ #define t_areaWithPoints(x1, y1, x2, y2, x3, y3) \ abs(0.5 * \ (x1 * (y2 - y3) + x2 * (y3 - y1) + \ x3 * \ (y1 - y2))); // returns the area of a triangle formed by P1, p2, p3 // Base Conversions #define toBin(bin, n) \ bin = bitset<8>(n).to_string() // returns a corresponding 8 bit Binary string // 'bin' of integer 'n' #define toOct(oct, n, ch) /*char ch[100]*/ \ sprintf(ch, "%o", n); \ oct = ch; // returns a string 'oct'(maximum 100 length): Octal represent of // number 'n' #define toHex(hex, n, ch) /*char ch[100]*/ \ sprintf(ch, "%x", n); \ hex = ch; // returns a string 'hex'(maximum 100 length): Hexadecimal represent // of number 'n' #define intToString(s, n, itos) /*stringstream itos;*/ \ itos << n; \ s = itos.str(); // converts a number 'n' to a string 's' #define stringToint(n, s) \ stringstream stoi(s); \ stoi >> n; // converts a string 's' to a number 'n'---ONLY ONCE USABLE--- // Others #define substring(s1, s2) \ strstr(s1.c_str(), \ s2.c_str()) // returns true if s1 contains s2 in O(n^2) complexity #define strCharRemove(s, c) \ s.erase(remove(s.begin(), s.end(), c), \ s.end()); // Removes all character 'c' from the string 's' #define strLastCharRemove(s) \ s.erase(s.end() - 1) // Removes last(position is given by s.end()-1) character // form string 's' #define vectorEraseSingle(v, pos) \ v.erase(v.begin() + pos) // Erases an element from "pos' position in zero // based index from the vector 'v' #define vectorEraseRange(v, spos, fpos) \ v.erase(v.begin() + spos, \ v.begin() + fpos) // Erases range inclusive spos' to // EXCLUSIVE(without) 'fpos' from vector 'v' #define lowerBound(v, elem) \ (lower_bound(v.begin(), v.end(), elem)) - v.begin(); /*returns the lower \ bound of 'elem' in integer(ZERO BASED INDEX), where lower bound means the \ LEFTMOST index where there is any integer which is GREATER OR EQUAL to \ 'elem'.*/ #define upperBound(v, elem) \ (upper_bound(v.begin(), v.end(), elem)) - v.begin(); /*returns the upper \ bound of 'elem' in integer(ZERO BASED INDEX), where upper bound means the \ LEFTMOST index where there is any integer which is GREATER than 'elem'.*/ #define setLowerBound(st, elem) st.lower_bound(elem));/*returns the lower bound ITERATOR of 'elem' in the stl set 'st', where lower bound means the LEFTMOST index where there is any integer which is GREATER OR EQUAL to 'elem'.*/ #define setUpperBound(st, elem) st.upper_bound(elem));/*returns the upper bound ITERATOR of 'elem' in the stl set 'st', where upper bound means the LEFTMOST index where there is any integer which is GREATER than 'elem'.*/ #define clearPQ(pq, type) \ pq = priority_queue<type>() /*It clears a priority queue by redeclaration*/ #define minPQ(PQ_name, type) \ priority_queue<type, vector<type>, greater<type>> \ PQ_name; /*min priority queue with built in type i.e int or long long \ etc. */ #define sortArr(arr, sz) \ sort(arr + 1, arr + (sz + 1)); /*Sorts an array from index 1 to index 'sz'*/ /*Macro ends here*/ // add vector descending sorting using namespace std; int main() { fasterInOut; ll n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; return 0; }
[ "expression.operation.binary.remove", "call.arguments.change" ]
784,810
784,811
u081421133
cpp
p02981
#include <algorithm> #include <iostream> #include <math.h> #include <stack> #include <string> #include <vector> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (A > B) { cout << N * B; } else { cout << N * A; } }
#include <algorithm> #include <iostream> #include <math.h> #include <stack> #include <string> #include <vector> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (A * N > B) { cout << B; } else { cout << N * A; } }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
784,812
784,813
u030068336
cpp
p02981
#include <iostream> using namespace std; int main() { int n; int a, b; cin >> n >> a >> b; int res = n * a; cout << (res > b ? res : b); return 0; }
#include <iostream> using namespace std; int main() { int n; int a, b; cin >> n >> a >> b; int res = n * a; cout << (res < b ? res : b); return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "io.output.change" ]
784,814
784,815
u634358761
cpp
p02981
#include <array> #include <bits/stdc++.h> #include <cstdio> #include <iostream> #include <utility> using namespace std; int main(void) { int N, A, B; scanf("%d", &N); scanf("%d", &A); scanf("%d", &B); int AN = A * B; if (AN > B) { printf("%d", B); } else { printf("%d", AN); } return 0; }
#include <array> #include <bits/stdc++.h> #include <cstdio> #include <iostream> #include <utility> using namespace std; int main(void) { int N, A, B; scanf("%d", &N); scanf("%d", &A); scanf("%d", &B); int AN = A * N; if (AN >= B) { printf("%d", B); } else { printf("%d", AN); } return 0; }
[ "identifier.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,816
784,817
u173561231
cpp
p02981
#include <array> #include <bits/stdc++.h> #include <cstdio> #include <iostream> #include <utility> using namespace std; int main(void) { int N, A, B; scanf("%d", &N); scanf("%d", &A); scanf("%d", &B); int AN = A * B; if (AN > B) { printf("%d\n", B); } else { printf("%d\n", AN); } return 0; }
#include <array> #include <bits/stdc++.h> #include <cstdio> #include <iostream> #include <utility> using namespace std; int main(void) { int N, A, B; scanf("%d", &N); scanf("%d", &A); scanf("%d", &B); int AN = A * N; if (AN >= B) { printf("%d", B); } else { printf("%d", AN); } return 0; }
[ "identifier.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.remove" ]
784,818
784,817
u173561231
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, t; string s; cin >> n >> a >> b; if (a > b) t = b; else t = a; cout << n * t << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, t; string s; cin >> n >> a >> b; if (n * a > b) t = b; else t = n * a; cout << t << endl; return 0; }
[ "control_flow.branch.if.condition.change", "assignment.change", "expression.operation.binary.remove" ]
784,819
784,820
u788350912
cpp
p02981
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a; cin >> b; cin >> c; if (a * b > c) { cout << a * b << endl; } else { cout << c << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a; cin >> b; cin >> c; if (a * b < c) { cout << a * b << endl; } else { cout << c << endl; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,823
784,824
u872704421
cpp
p02981
/* Dedication has no limitation */ // 29 June 2019 // Location: Japan #include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, n * b); }
/* Dedication has no limitation */ // 29 June 2019 // Location: Japan #include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b); }
[ "expression.operation.binary.remove" ]
784,833
784,834
u553932989
cpp
p02981
#include <iostream> void func_A(int N, int A, int B) { std::cout << (A * N > B ? N : A * N) << std::endl; } int main() { int N, A, B; std::cin >> N >> A >> B; func_A(N, A, B); return 0; }
#include <iostream> void func_A(int N, int A, int B) { std::cout << (A * N > B ? B : A * N) << std::endl; } int main() { int N, A, B; std::cin >> N >> A >> B; func_A(N, A, B); return 0; }
[ "identifier.change", "expression.operation.binary.change" ]
784,843
784,844
u096502015
cpp
p02981
#include <iostream> void func_A(int N, int A, int B) { std::cout << (A > B ? N * B : A * N) << std::endl; } int main() { int N, A, B; std::cin >> N >> A >> B; func_A(N, A, B); return 0; }
#include <iostream> void func_A(int N, int A, int B) { std::cout << (A * N > B ? B : A * N) << std::endl; } int main() { int N, A, B; std::cin >> N >> A >> B; func_A(N, A, B); return 0; }
[ "expression.operation.binary.remove" ]
784,845
784,844
u096502015
cpp
p02981
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, n) << endl; return 0; }
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; return 0; }
[ "identifier.change", "io.output.change" ]
784,856
784,857
u557325877
cpp
p02981
#include <bits/stdc++.h> using namespace std; #define mp(a, b) make_pair(a, b) #define ff first #define setp(a) setprecision(a) << fixed #define ss second #define fori(v) for (ll i = 0; i < v; i++) #define forj(v) for (ll j = 0; j < v; j++) #define fork(v) for (ll k = 0; k < v; k++) #define forl(v) for (ll l = 0; l < v; l++) #define fort(v) for (ll t = 0; t < v; t++) #define forz(v) for (ll z = 0; z < v; z++) #define forx(v) for (ll x = 0; x < v; x++) #define fory(v) for (ll y = 0; y < v; y++) #define ll long long #define double long double #define pb(a) push_back(a) const ll INF = 0x3f3f3f3f; const ll inf = pow(10, 18); ll modulo = 998244353; #define MAX 300100 void deal() { ll n, a, b; cin >> n >> a >> b; cout << n * min(a, b); } int main() { cin.tie(0); ios_base::sync_with_stdio(0); deal(); }
#include <bits/stdc++.h> using namespace std; #define mp(a, b) make_pair(a, b) #define ff first #define setp(a) setprecision(a) << fixed #define ss second #define fori(v) for (ll i = 0; i < v; i++) #define forj(v) for (ll j = 0; j < v; j++) #define fork(v) for (ll k = 0; k < v; k++) #define forl(v) for (ll l = 0; l < v; l++) #define fort(v) for (ll t = 0; t < v; t++) #define forz(v) for (ll z = 0; z < v; z++) #define forx(v) for (ll x = 0; x < v; x++) #define fory(v) for (ll y = 0; y < v; y++) #define ll long long #define double long double #define pb(a) push_back(a) const ll INF = 0x3f3f3f3f; const ll inf = pow(10, 18); ll modulo = 998244353; #define MAX 300100 void deal() { ll n, a, b; cin >> n >> a >> b; cout << min(n * a, b); } int main() { cin.tie(0); ios_base::sync_with_stdio(0); deal(); }
[ "expression.operation.binary.remove" ]
784,858
784,859
u936253056
cpp
p02981
#include <iostream> #include <string> using namespace std; int main(void) { int n; int a; int b; cin >> n; cin >> a; cin >> b; if (a < b) { cout << n * a; } else { cout << n * b; } return 0; }
#include <iostream> #include <string> using namespace std; int main(void) { int n; int a; int b; cin >> n; cin >> a; cin >> b; if (n * a < b) { cout << n * a; } else { cout << b; } return 0; }
[ "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
784,866
784,867
u175232503
cpp
p02981
#include <bits/stdc++.h> using namespace std; #define S scanf #define P printf #define G getline #define SZ size() #define C clear() #define B begin() #define F front() #define T top() #define E end() #define EM empty() #define V vector #define Q queue #define DQ deque #define PQ priority_queue #define ST stack #define FI first #define SE second #define PI acos(-1) #define PS push #define PP pop() #define PSF push_front #define PSB push_back #define PPF pop_front() #define PPB pop_back() #define MP make_pair #define LL long long int #define ULL unsigned long long int #define PII pair<int, int> #define PSI pair<string, int> #define PIS pair<int, string> #define PLI pair<long long int, int> #define PLL pair<long long int, long long int> #define MII map<int, int> #define MSI map<string, int> #define MIS map<int, string> #define MLI map<long long int, int> #define FAST() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) LL big_mod(LL val, LL pow, LL mod); LL mod_inverse(LL val, LL mod); string sum_of_two_strings(string a, string b); int main() { FAST(); // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); int a, b, n; cin >> n >> a >> b; cout << min(n * a, n * b); return 0; } LL big_mod(LL val, LL pow, LL mod) { LL res = 1; val = val % mod; while (pow > 0) { if (pow & 1) { res = (res * val) % mod; } pow = pow >> 1; val = (val * val) % mod; } return res; } LL mod_inverse(LL val, LL mod) { LL mod1 = mod; if (mod == 1) { return 0; } LL y = 0; LL x = 1; LL quotient, temp; while (val > 1) { quotient = val / mod; temp = mod; mod = val % mod; val = temp; temp = y; y = x - quotient * y; x = temp; } if (x < 0) { x += mod1; } return x; } string sum_of_two_strings(string a, string b) { reverse(a.B, a.E); reverse(b.B, b.E); char c; string ans = ""; int length_of_a = a.SZ, length_of_b = b.SZ; int i, carry = 0, sum, length = max(length_of_a, length_of_b); for (i = 0; i < length; i++) { if (i >= length_of_a) { sum = (b[i] - 48) + carry; } else if (i >= length_of_b) { sum = (a[i] - 48) + carry; } else { sum = (a[i] - 48) + (b[i] - 48) + carry; } carry = sum / 10; sum %= 10; c = sum + 48; ans += c; } if (carry > 0) { ans += (carry + 48); } reverse(ans.B, ans.E); return ans; }
#include <bits/stdc++.h> using namespace std; #define S scanf #define P printf #define G getline #define SZ size() #define C clear() #define B begin() #define F front() #define T top() #define E end() #define EM empty() #define V vector #define Q queue #define DQ deque #define PQ priority_queue #define ST stack #define FI first #define SE second #define PI acos(-1) #define PS push #define PP pop() #define PSF push_front #define PSB push_back #define PPF pop_front() #define PPB pop_back() #define MP make_pair #define LL long long int #define ULL unsigned long long int #define PII pair<int, int> #define PSI pair<string, int> #define PIS pair<int, string> #define PLI pair<long long int, int> #define PLL pair<long long int, long long int> #define MII map<int, int> #define MSI map<string, int> #define MIS map<int, string> #define MLI map<long long int, int> #define FAST() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) LL big_mod(LL val, LL pow, LL mod); LL mod_inverse(LL val, LL mod); string sum_of_two_strings(string a, string b); int main() { FAST(); // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); int a, b, n; cin >> n >> a >> b; cout << min(n * a, b); return 0; } LL big_mod(LL val, LL pow, LL mod) { LL res = 1; val = val % mod; while (pow > 0) { if (pow & 1) { res = (res * val) % mod; } pow = pow >> 1; val = (val * val) % mod; } return res; } LL mod_inverse(LL val, LL mod) { LL mod1 = mod; if (mod == 1) { return 0; } LL y = 0; LL x = 1; LL quotient, temp; while (val > 1) { quotient = val / mod; temp = mod; mod = val % mod; val = temp; temp = y; y = x - quotient * y; x = temp; } if (x < 0) { x += mod1; } return x; } string sum_of_two_strings(string a, string b) { reverse(a.B, a.E); reverse(b.B, b.E); char c; string ans = ""; int length_of_a = a.SZ, length_of_b = b.SZ; int i, carry = 0, sum, length = max(length_of_a, length_of_b); for (i = 0; i < length; i++) { if (i >= length_of_a) { sum = (b[i] - 48) + carry; } else if (i >= length_of_b) { sum = (a[i] - 48) + carry; } else { sum = (a[i] - 48) + (b[i] - 48) + carry; } carry = sum / 10; sum %= 10; c = sum + 48; ans += c; } if (carry > 0) { ans += (carry + 48); } reverse(ans.B, ans.E); return ans; }
[ "expression.operation.binary.remove" ]
784,875
784,876
u380762346
cpp
p02981
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define pa pair<int, int> #define F first #define S second #define Max 9999 #define d n % 3 typedef long long ll; int main() { int a, b, c; cin >> a >> b >> c; cout << (a * b > c ? a * b : c) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define pa pair<int, int> #define F first #define S second #define Max 9999 #define d n % 3 typedef long long ll; int main() { int a, b, c; cin >> a >> b >> c; cout << (a * b < c ? a * b : c) << endl; return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "io.output.change" ]
784,886
784,887
u152688173
cpp
p02981
#include <iostream> int main(int, char **) { int n, a, b; std::cin >> n >> a >> b; std::cout << n * std::min(a, b) << std::endl; return 0; }
#include <iostream> int main(int, char **) { int n, a, b; std::cin >> n >> a >> b; std::cout << std::min(n * a, b) << std::endl; return 0; }
[ "expression.operation.binary.remove" ]
784,899
784,900
u224390062
cpp
p02981
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, n * b) << endl; ; return 0; }
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; cout << min(n * a, b) << endl; ; return 0; }
[ "expression.operation.binary.remove" ]
784,922
784,923
u812003342
cpp
p02981
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define repab(i, a, b) for (int i = a; i <= b; i++) #define ull unsigned long long int #define ll long long int #define pb push_back #define pop pop_back #define p0(x) cout << x << " " #define p1(x) cout << x << '\n' #define p2(x, y) cout << x << " " << y << '\n'; #define p3(x, y, z) cout << x << " " << y << " " << z << '\n' #define mod 1000000007 #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define get(n) \ int n; \ cin >> n #define getll(n) \ ll n; \ cin >> n #define getarr(arr, n) \ int arr[n]; \ for (int i = 0; i < n; i++) \ cin >> arr[i]; #define getstr(s) \ string s; \ cin >> s #define countBits(x) __builtin_popcount(x) using namespace std; int main() { fio; get(n); get(a); get(b); ll ans = max(a * n, b); p1(ans); return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define repab(i, a, b) for (int i = a; i <= b; i++) #define ull unsigned long long int #define ll long long int #define pb push_back #define pop pop_back #define p0(x) cout << x << " " #define p1(x) cout << x << '\n' #define p2(x, y) cout << x << " " << y << '\n'; #define p3(x, y, z) cout << x << " " << y << " " << z << '\n' #define mod 1000000007 #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define get(n) \ int n; \ cin >> n #define getll(n) \ ll n; \ cin >> n #define getarr(arr, n) \ int arr[n]; \ for (int i = 0; i < n; i++) \ cin >> arr[i]; #define getstr(s) \ string s; \ cin >> s #define countBits(x) __builtin_popcount(x) using namespace std; int main() { fio; get(n); get(a); get(b); ll ans = min(a * n, b); p1(ans); return 0; }
[ "misc.opposites", "identifier.change", "call.function.change" ]
784,924
784,925
u703362211
cpp
p02981
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a * b >= c) cout << a * b; else cout << c; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a * b < c) cout << a * b; else cout << c; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
784,926
784,927
u302494292
cpp
p02981
#include <bits/stdc++.h> #include <iostream> #define fori(j, n) for (long long i = j; i < n; i++) #define pb push_back #define ss string #define ll long long #define li long #include <string.h> #define pf printf #define sf scanf bool isvowel(char s) { if (s == 'a' || s == 'A' || s == 'e' || s == 'E' || s == 'i' || s == 'I' || s == 'o' || s == 'O' || s == 'u' || s == 'U') return true; else return false; } ll fact(ll n) { ll mul = 1; for (ll i = 1; i <= n; i++) mul = mul * i; return mul; } ll gcd(ll m, ll n) { while (n != 0) { ll r = m % n; m = n; n = r; } return m; } using namespace std; bool sortas(const pair<ll, ll> &a, const pair<ll, ll> &b) { return a.second < b.second; } int main() { int n; cin >> n; int a, b; cin >> a >> b; cout << min(n * a, n * b) << endl; return 0; }
#include <bits/stdc++.h> #include <iostream> #define fori(j, n) for (long long i = j; i < n; i++) #define pb push_back #define ss string #define ll long long #define li long #include <string.h> #define pf printf #define sf scanf bool isvowel(char s) { if (s == 'a' || s == 'A' || s == 'e' || s == 'E' || s == 'i' || s == 'I' || s == 'o' || s == 'O' || s == 'u' || s == 'U') return true; else return false; } ll fact(ll n) { ll mul = 1; for (ll i = 1; i <= n; i++) mul = mul * i; return mul; } ll gcd(ll m, ll n) { while (n != 0) { ll r = m % n; m = n; n = r; } return m; } using namespace std; bool sortas(const pair<ll, ll> &a, const pair<ll, ll> &b) { return a.second < b.second; } int main() { int n; cin >> n; int a, b; cin >> a >> b; cout << min(n * a, b) << endl; return 0; }
[ "expression.operation.binary.remove" ]
784,929
784,930
u107611114
cpp
p02981
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if ((n * a) < b) cout << b << endl; else cout << n * a << endl; }
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; if ((n * a) < b) cout << n * a << endl; else cout << b << endl; }
[ "control_flow.branch.else.remove", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
784,931
784,932
u477516105
cpp
p02981
#include <iostream> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (N > A * B) cout << A * B; else cout << N; return 0; }
#include <iostream> using namespace std; int main() { int N, A, B; cin >> N >> A >> B; if (B > A * N) cout << A * N; else cout << B; return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change", "io.output.change" ]
784,933
784,934
u638696958
cpp