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 8
values |
|---|---|---|---|---|---|---|---|
p03169 |
#include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <cstring>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <utility>
using namespace std;
typedef long long LL;
#define rep(i, n) for (int i = ... |
#include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <cstring>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <utility>
using namespace std;
typedef long long LL;
#define rep(i, n) for (int i = ... | [
"call.remove"
] | 978,110 | 978,111 | u851470173 | cpp |
p03169 |
#include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <cstring>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <utility>
using namespace std;
typedef long long LL;
#define rep(i, n) for (int i = ... |
#include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <cstring>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <utility>
using namespace std;
typedef long long LL;
#define rep(i, n) for (int i = ... | [
"call.remove",
"literal.number.change",
"io.output.change"
] | 978,112 | 978,111 | u851470173 | cpp |
p03169 | #pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <x86intrin.h>
using namespace __gnu_pbds;
template <typename T>
usi... | #pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <x86intrin.h>
using namespace __gnu_pbds;
template <typename T>
usi... | [
"identifier.change",
"variable_declaration.type.change"
] | 978,123 | 978,124 | u637534849 | cpp |
p03169 | #include <bits/stdc++.h>
using namespace std;
long double dp[310][310][310];
int n, c[3];
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
c[x - 1]++;
}
for (int k = 0; k <= c[2]; k++) {
for (int j = 0; j < n; j++) {
for (int i = 0; i <= n; i++) {
int tc = ... | #include <bits/stdc++.h>
using namespace std;
long double dp[310][310][310];
int n, c[3];
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
c[x - 1]++;
}
for (int k = 0; k <= c[2]; k++) {
for (int j = 0; j <= n; j++) {
for (int i = 0; i <= n; i++) {
int tc =... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 978,129 | 978,130 | u543921019 | cpp |
p03169 | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
u... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
u... | [
"assignment.change"
] | 978,141 | 978,142 | u270681687 | cpp |
p03169 | #include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <vector>
using namespace std;
#define... | #include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <vector>
using namespace std;
#define... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 978,143 | 978,144 | u491550356 | cpp |
p03169 | #include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <vector>
using namespace std;
#define... | #include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <vector>
using namespace std;
#define... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 978,143 | 978,146 | u491550356 | cpp |
p03169 | #include <bits/stdc++.h>
using namespace std;
bool FLAG = true;
#define debug(x) \
if (FLAG) { \
cout << #x << " = " << x << endl; \
}
#define ... | #include <bits/stdc++.h>
using namespace std;
bool FLAG = true;
#define debug(x) \
if (FLAG) { \
cout << #x << " = " << x << endl; \
}
#define ... | [
"literal.number.change",
"io.output.change"
] | 978,147 | 978,148 | u505802099 | cpp |
p03169 | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using na... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using na... | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"call.arguments.change",
"io.output.change"
] | 978,155 | 978,156 | u841131859 | cpp |
p03169 | #include <bits/stdc++.h>
using namespace std;
double dp[305][305][305];
int cnt[10];
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
int x;
scanf("%d", &x);
cnt[x]++;
}
for (int k = 0; k <= n; k++)
for (int j = 0; j <= n; j++)
for (int i = 0; i <= n; i++)
if ... | #include <bits/stdc++.h>
using namespace std;
double dp[305][305][305];
int cnt[10];
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
int x;
scanf("%d", &x);
cnt[x]++;
}
for (int k = 0; k <= n; k++)
for (int j = 0; j <= n; j++)
for (int i = 0; i <= n; i++)
if ... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 978,159 | 978,160 | u474561608 | cpp |
p03169 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
// まずは状態を定義。寿司の順番に意味が無いことに気づくので、状態としては、残りの寿司の個数がk枚の皿がそれぞれ何枚あるかということになる。
// 状態遷移は、サイコロを一回降った時にどうなるかを考える。遷移式はそのままだと0個の皿を引いたときに無限ループになるので式変形する必要あり。
// dp[x][y][z] 残り一個のものがx, 残り二個のものがy,
// 残り三個のものがzのときの... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
// まずは状態を定義。寿司の順番に意味が無いことに気づくので、状態としては、残りの寿司の個数がk枚の皿がそれぞれ何枚あるかということになる。
// 状態遷移は、サイコロを一回降った時にどうなるかを考える。遷移式はそのままだと0個の皿を引いたときに無限ループになるので式変形する必要あり。
// dp[x][y][z] 残り一個のものがx, 残り二個のものがy,
// 残り三個のものがzのときの... | [
"literal.number.change",
"variable_declaration.value.change"
] | 978,175 | 978,176 | u917793793 | cpp |
p03169 | #include <bits/stdc++.h> // [PRIMES] 1777 ~2^10.80
using namespace std; // 10333 ~2^13.33
using ll = long long; // seq 1 128 | factor 100333 ~2^16.61
using vl = vector<ll>; // | grep -v ' .* ' 1300111 ~2^20.31
using vvl = vect... | #include <bits/stdc++.h> // [PRIMES] 1777 ~2^10.80
using namespace std; // 10333 ~2^13.33
using ll = long long; // seq 1 128 | factor 100333 ~2^16.61
using vl = vector<ll>; // | grep -v ' .* ' 1300111 ~2^20.31
using vvl = vect... | [
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 978,179 | 978,180 | u117403499 | cpp |
p03169 | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"control_flow.branch.if.condition.change"
] | 978,185 | 978,186 | u722378116 | cpp |
p03169 | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 978,187 | 978,186 | u722378116 | cpp |
p03169 | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 978,185 | 978,188 | u722378116 | cpp |
p03169 | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define sz(x) (int)x.size()
#define endl '\n'
#define h... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"control_flow.branch.if.condition.change"
] | 978,187 | 978,188 | u722378116 | cpp |
p03169 | #include <bits/stdc++.h>
#ifdef _DEBUG
#define debug(x) \
cout << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x \
<< " = " << x << endl
#define INFILE freopen("input.txt", "r", stdin)
#else
#define debug(x)
#define INFILE
#en... | #include <bits/stdc++.h>
#ifdef _DEBUG
#define debug(x) \
cout << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x \
<< " = " << x << endl
#define INFILE freopen("input.txt", "r", stdin)
#else
#define debug(x)
#define INFILE
#en... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 978,202 | 978,203 | u209647862 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
//
typedef long double ld;
typedef long long int ll;
//
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
//
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<char> vc;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<vi> vvi;
typedef vector<... | #include <bits/stdc++.h>
using namespace std;
//
typedef long double ld;
typedef long long int ll;
//
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
//
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<char> vc;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<vi> vvi;
typedef vector<... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,206 | 978,207 | u363823725 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int dp[200005];
int main() {
int n, k;
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i <= k; i++) {
if (dp[i] != true) {
for (int j = 0; j < n; j++) {
dp[i + a[j]] = true;
// if(dp[])
}
... | #include <bits/stdc++.h>
using namespace std;
int dp[200005];
int main() {
int n, k;
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i <= k; i++) {
if (dp[i] != true) {
for (int j = 0; j < n; j++) {
dp[i + a[j]] = true;
// if(dp[])
}
... | [
"literal.string.change",
"io.output.change"
] | 978,210 | 978,211 | u181739580 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int dp[100005];
int main() {
int n, k;
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i <= k; i++) {
if (dp[i] != true) {
for (int j = 0; j < n; j++) {
dp[i + a[j]] = true;
// if(dp[])
}
... | #include <bits/stdc++.h>
using namespace std;
int dp[200005];
int main() {
int n, k;
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i <= k; i++) {
if (dp[i] != true) {
for (int j = 0; j < n; j++) {
dp[i + a[j]] = true;
// if(dp[])
}
... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"literal.string.change",
"io.output.change"
] | 978,212 | 978,211 | u181739580 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
void test(vector<int> &a, int k) {
bool dp[k + 1];
memset(dp, 0, sizeof(dp));
int n = a.size();
for (int j = 1; j <= k; j++) {
for (int i = 1; i < a.size(); i++) {
if (j >= a[i]) {
dp[j] = dp[j] || !dp[j - a[i]];
}
}
}
if (dp[k])
... | #include <bits/stdc++.h>
using namespace std;
void test(vector<int> &a, int k) {
bool dp[k + 1];
memset(dp, 0, sizeof(dp));
int n = a.size();
for (int j = 1; j <= k; j++) {
for (int i = 0; i < a.size(); i++) {
if (j >= a[i]) {
dp[j] = dp[j] || !dp[j - a[i]];
}
}
}
if (dp[k])
... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 978,215 | 978,216 | u107584330 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
void test(vector<int> &a, int k) {
bool dp[k + 1];
memset(dp, 0, sizeof(dp));
int n = a.size();
for (int j = 1; j <= k; j++) {
for (int i = 1; i < a.size(); i++) {
if (j >= a[i]) {
dp[j] = dp[j] || !dp[j - a[i]];
}
}
}
if (dp[k])
... | #include <bits/stdc++.h>
using namespace std;
void test(vector<int> &a, int k) {
bool dp[k + 1];
memset(dp, 0, sizeof(dp));
int n = a.size();
for (int j = 1; j <= k; j++) {
for (int i = 0; i < a.size(); i++) {
if (j >= a[i]) {
dp[j] = dp[j] || !dp[j - a[i]];
}
}
}
if (dp[k])
... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 978,215 | 978,217 | u107584330 | cpp |
p03170 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
void solve() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector<int> dp(k + 1, 1);
dp[0] = 1;
for (int i = 1; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i - a[j] >= 0)... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
void solve() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector<int> dp(k + 1, 1);
dp[0] = 1;
for (int i = 1; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i - a[j] >= 0)... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,218 | 978,219 | u956355198 | cpp |
p03170 | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define vi vector<int>
#define vvi vector<vector<int>>
#define FASTIO \
ios_base::sync_with_stdio(NULL); \
cin.tie(NULL);
#define FOR(i, n) for ... | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define vi vector<int>
#define vvi vector<vector<int>>
#define FASTIO \
ios_base::sync_with_stdio(NULL); \
cin.tie(NULL);
#define FOR(i, n) for ... | [] | 978,222 | 978,223 | u372662491 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int n, k;
cin >> n >> k;
vector<int> A(n);
for (int i = 0; i < n; i++)
cin >> A[i];
vector<int> dp(k + 1, 0);
for (int i = 1; i <= k; i++) {
for (auto val : A) {
if (val <= i && dp[i - val] == 0) {
dp[... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int n, k;
cin >> n >> k;
vector<int> A(n);
for (int i = 0; i < n; i++)
cin >> A[i];
vector<int> dp(k + 1, 0);
for (int i = 1; i <= k; i++) {
for (auto val : A) {
if (val <= i && dp[i - val] == 0) {
dp[... | [
"control_flow.branch.else.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 978,224 | 978,225 | u700138719 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> choices(n, 0);
for (int i = 0; i < n; i++) {
cin >> choices[i];
}
vector<bool> dp(k + 1, false);
for (int i = 1; i < k + 1; i++) {
for (int j = 0; j < n; j++) {
if (i - choices[j] >= 0) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> choices(n, 0);
for (int i = 0; i < n; i++) {
cin >> choices[i];
}
vector<bool> dp(k + 1, false);
for (int i = 1; i < k + 1; i++) {
for (int j = 0; j < n; j++) {
if (i - choices[j] >= 0) {
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,228 | 978,229 | u650716766 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
bool dp[k + 1];
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
dp[0] = false;
for (int i = 1; i < k + 1; i++) {
dp[i] = false;
for (int j = 0; j < n; j++) {
if (a[j] <= k) {
if (!dp[i - a[j]]... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
bool dp[k + 1];
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
dp[0] = false;
for (int i = 1; i < k + 1; i++) {
dp[i] = false;
for (int j = 0; j < n; j++) {
if (a[j] <= i) {
if (!dp[i - a[j]]... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 978,237 | 978,238 | u695206817 | cpp |
p03170 | #include <bits/stdc++.h>
#define int long long
#define float long double
#define endl '\n'
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
#define int long long
#define float long double
#define endl '\n'
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | [
"literal.string.change",
"literal.string.case.change",
"expression.operation.binary.change"
] | 978,239 | 978,240 | u287226050 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pi = pair<int, int>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<pi>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
using Graph = vect... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pi = pair<int, int>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<pi>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
using Graph = vect... | [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 978,246 | 978,247 | u499381410 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | [
"expression.operation.unary.add"
] | 978,253 | 978,254 | u427344224 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | [
"expression.operation.unary.add"
] | 978,253 | 978,255 | u427344224 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | [
"expression.operation.unary.add"
] | 978,253 | 978,256 | u427344224 | cpp |
p03170 | #include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int mod = pow(10, 9) + 7;
int MAXK = 1e5 + 10;
int MAXN = 1e3 + 10;
int N, K;
vector<int> dp(MAXK, -1);
vector<int> a(MAXN);
int solve(int k) {
if (dp[k] != -1)
return dp[k];
if (k == 0)
return dp[k] = 0;
int ans = 0;
... | #include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int mod = pow(10, 9) + 7;
int MAXK = 1e5 + 10;
int MAXN = 1e3 + 10;
int N, K;
vector<int> dp(MAXK, -1);
vector<int> a(MAXN);
int solve(int k) {
if (dp[k] != -1)
return dp[k];
if (k == 0)
return dp[k] = 0;
int ans = 0;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,259 | 978,260 | u583063982 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename x>
using ordered_set =
tree<x, null_type, less<x>, rb_tree_tag, tree_order_statistics_node_update>;
#define sorta(a, n) sort(a, a + n)
#define so... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename x>
using ordered_set =
tree<x, null_type, less<x>, rb_tree_tag, tree_order_statistics_node_update>;
#define sorta(a, n) sort(a, a + n)
#define so... | [
"expression.operation.binary.remove"
] | 978,268 | 978,269 | u237399952 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename x>
using ordered_set =
tree<x, null_type, less<x>, rb_tree_tag, tree_order_statistics_node_update>;
#define sorta(a, n) sort(a, a + n)
#define so... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename x>
using ordered_set =
tree<x, null_type, less<x>, rb_tree_tag, tree_order_statistics_node_update>;
#define sorta(a, n) sort(a, a + n)
#define so... | [
"expression.operation.binary.remove"
] | 978,270 | 978,269 | u237399952 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define ar array
#define endl '\n'
#define ll long long
#define in insert
#define pb push_back
#define vt vector
#define P_Q(x) priority_queue<x>
#define p_q(x) priority_queue<x, vector<x>, greater<x>>
#define Rep(i, a, b) for (int i = a; i <= b; i++)
#define Rev(i, a, b) f... | #include <bits/stdc++.h>
using namespace std;
#define ar array
#define endl '\n'
#define ll long long
#define in insert
#define pb push_back
#define vt vector
#define P_Q(x) priority_queue<x>
#define p_q(x) priority_queue<x, vector<x>, greater<x>>
#define Rep(i, a, b) for (int i = a; i <= b; i++)
#define Rev(i, a, b) f... | [
"expression.operation.unary.add"
] | 978,274 | 978,275 | u735052662 | cpp |
p03170 | #include "bits/stdc++.h"
using namespace std;
#define Fast_IO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int l... | #include "bits/stdc++.h"
using namespace std;
#define Fast_IO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int l... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 978,278 | 978,279 | u961487195 | cpp |
p03170 | #include <bits/stdc++.h>
#include <unistd.h>
using namespace std;
#define nl cout << "\n"
#define pb push_back
#define se second
#define fi first
#define int long long
#define pi pair<int, int>
#define vpi vector<pi>
#define vvpi vector<vpi>
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#d... | #include <bits/stdc++.h>
#include <unistd.h>
using namespace std;
#define nl cout << "\n"
#define pb push_back
#define se second
#define fi first
#define int long long
#define pi pair<int, int>
#define vpi vector<pi>
#define vvpi vector<vpi>
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#d... | [] | 978,280 | 978,281 | u002457022 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define AC ios::sync_with_stdio(0), cin.tie(0);
int dp[100001];
int main() {
AC int n;
cin >> n;
int k;
cin >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
dp[a[i]] = 1;
}
dp[0] = 0;
for (int i = 1; i <= n; i++) {
for (int j = 0; j <... | #include <bits/stdc++.h>
using namespace std;
#define AC ios::sync_with_stdio(0), cin.tie(0);
bool dp[100001];
int main() {
AC int n;
cin >> n;
int k;
cin >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
dp[a[i]] = 1;
}
dp[0] = 0;
for (int i = 1; i <= k; i++) {
for (int j = 0; j ... | [
"variable_declaration.type.primitive.change",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"assignment.change",
"expression.operation.unary.logical.remove",
"control_flow.branch.if.condition.change"
] | 978,282 | 978,283 | u723744542 | cpp |
p03170 |
#include <bits/stdc++.h>
#define size 100000
#define ll long long
using namespace std;
int grundy[size + 1];
int a[size];
void init(int min) {
for (int i = 0; i <= size; i++) {
if (i >= min)
grundy[i] = -1;
else
grundy[i] = 0;
}
}
int solve(int k, int n) {
if (k < 0)
return 0;
if (grund... |
#include <bits/stdc++.h>
#define size 100000
#define ll long long
using namespace std;
int grundy[size + 1];
int a[size];
void init(int min) {
for (int i = 0; i <= size; i++) {
if (i >= min)
grundy[i] = -1;
else
grundy[i] = 0;
}
}
int solve(int k, int n) {
if (k < 0)
return 1;
if (grund... | [
"literal.number.change",
"function.return_value.change"
] | 978,287 | 978,288 | u175104711 | cpp |
p03170 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ll long long
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
rep(i, n) { cin >> a[i]; }
int dp[101];
memset(dp, 0, sizeof(dp));
dp[0] = -1;
for (int i = 1; i <= k; i++) {
bool f = true;... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ll long long
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
rep(i, n) { cin >> a[i]; }
int dp[100001];
memset(dp, 0, sizeof(dp));
dp[0] = -1;
for (int i = 1; i <= k; i++) {
bool f = tr... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 978,289 | 978,291 | u021358975 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
string winner(int arr[], int N, int k) {
bool dp[N + 1];
memset(dp, 0, sizeof(dp));
for (int i = 1; i <= k; i++) {
for (int j = 0; j < N; j++) {
if (arr[j] > i)
continue;
if (dp[i - arr[j]] == 0)
dp[i] = 1;
}
}
if (dp[k] == 1... | #include <bits/stdc++.h>
using namespace std;
string winner(int arr[], int N, int k) {
bool dp[k + 1];
memset(dp, 0, sizeof(dp));
for (int i = 1; i <= k; i++) {
for (int j = 0; j < N; j++) {
if (arr[j] > i)
continue;
if (dp[i - arr[j]] == 0)
dp[i] = 1;
}
}
if (dp[k] == 1... | [
"identifier.change",
"expression.operation.binary.change",
"control_flow.loop.for.condition.change"
] | 978,294 | 978,295 | u257699577 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define M (int)1e9
#define pi 3.1415926536
#define all(a) a.begin(), a.end()
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define M (int)1e9
#define pi 3.1415926536
#define all(a) a.begin(), a.end()
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | [
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 978,296 | 978,297 | u496612088 | cpp |
p03170 | #include <iostream>
#include <vector>
using namespace std;
bool dp[110000];
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i - a[j] >= 0)
dp[i] |= !dp[i - a[j]];
//右... | #include <iostream>
#include <vector>
using namespace std;
bool dp[110000];
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i - a[j] >= 0)
dp[i] |= !dp[i - a[j]];
//右... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,300 | 978,301 | u000212387 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int mod = 100000;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
bool dp[100005];
signed main() {
int N, K;
cin >> N >> K;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a[i];
}
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int mod = 100000;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
bool dp[100005];
signed main() {
int N, K;
cin >> N >> K;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a[i];
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,309 | 978,310 | u237390401 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
void Fast() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
int main() {
Fast();
int n, i, k;
cin >> n >> k;
int *v = new int[n];
bool **dp = new bool *[k];
for (i = 0; i <= k; i++)
dp[i] = new bool[2];
for (i = 0; i < n; i++)
cin... | #include <bits/stdc++.h>
using namespace std;
void Fast() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
int main() {
Fast();
int n, i, k;
cin >> n >> k;
int *v = new int[n];
bool **dp = new bool *[k + 1];
for (i = 0; i <= k; i++)
dp[i] = new bool[2];
for (i = 0; i < n; i++)
... | [
"expression.operation.binary.add"
] | 978,317 | 978,318 | u388127021 | cpp |
p03170 | /*
Author: Qaseem Hasan alias Mikepayne14(Codeforces,Atcoder)
qaseem_hasan_ (Codechef,HackerRank,HackerEarth)
*/
#include <bits/stdc++.h>
using namespace std;
//---------------------------------------------------------
typedef long long int ll;
typedef unsigned long long int ull;
typedef ve... | /*
Author: Qaseem Hasan alias Mikepayne14(Codeforces,Atcoder)
qaseem_hasan_ (Codechef,HackerRank,HackerEarth)
*/
#include <bits/stdc++.h>
using namespace std;
//---------------------------------------------------------
typedef long long int ll;
typedef unsigned long long int ull;
typedef ve... | [
"control_flow.loop.for.condition.change",
"control_flow.branch.if.condition.change"
] | 978,326 | 978,327 | u649440112 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
bool dp[m + 1];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i <= m; i++) {
for (int j = 0; j < n; j++) {
if (i >= a[j] && !dp[i - a[j]]) {
dp[i] = true;
break;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
bool dp[m + 1] = {0};
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i <= m; i++) {
for (int j = 0; j < n; j++) {
if (i >= a[j] && !dp[i - a[j]]) {
dp[i] = true;
break;
... | [
"variable_declaration.value.change"
] | 978,336 | 978,337 | u022311705 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
bool dp[m];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i <= m; i++) {
for (int j = 0; j < n; j++) {
if (i >= a[j] && !dp[i - a[j]]) {
dp[i] = true;
break;
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
bool dp[m + 1] = {0};
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i <= m; i++) {
for (int j = 0; j < n; j++) {
if (i >= a[j] && !dp[i - a[j]]) {
dp[i] = true;
break;
... | [
"variable_declaration.value.change"
] | 978,338 | 978,337 | u022311705 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int winner(vector<int> v, int k, int n) {
int *dp = new int[k + 1];
for (int i = 0; i < k + 1; i++)
dp[i] = 0;
for (int i = 1; i <= k; i++) {
for (auto x : v) {
if (x >= i && dp[i - x] == 0)
dp[i] = 1;
break;
}
}
return dp[k];
}
int... | #include <bits/stdc++.h>
using namespace std;
int winner(vector<int> v, int k, int n) {
int *dp = new int[k + 1];
for (int i = 0; i < k + 1; i++)
dp[i] = 0;
for (int i = 1; i <= k; i++) {
for (auto x : v) {
if (i >= x && dp[i - x] == 0) {
dp[i] = 1;
break;
}
}
}
return ... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 978,347 | 978,348 | u814458681 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
int a[n];
scanf("%d%d", &n, &k);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
int p[k + 1];
for (int i = 0; i < k + 1; i++)
p[i] = -1;
int t = 0;
for (int i = 0; i < k + 1 && t < 1; i++) {
for (int j = 0; j < n && t < ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
int a[n];
scanf("%d%d", &n, &k);
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
int p[k + 1];
for (int i = 0; i < k + 1; i++)
p[i] = -1;
int t = 0;
for (int i = 0; i < k + 1 && t < 1; i++) {
for (int j = 0; j < n && t < 1... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 978,349 | 978,350 | u387025271 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int &x : a) {
cin >> x;
}
int dp[k + 1];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
dp[i] = 0;
for (int x : a) {
if (i >= x && dp[i - x] == 0) {
dp[i] = 1;
break;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int &x : a) {
cin >> x;
}
int dp[k + 1];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
dp[i] = 0;
for (int x : a) {
if (i >= x && dp[i - x] == 0) {
dp[i] = 1;
break;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,355 | 978,356 | u777959702 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int A[110];
for (int i = 0; i < N; i++) {
cin >> A[i];
}
bool dp[101000];
for (int i = 1; i <= K; i++) {
for (int j = 0; j < N; j++) {
if (i - A[j] >= 0)
dp[i] |= !(dp[i - A[j]]);
}
}
if (dp[... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
int A[110];
for (int i = 0; i < N; i++) {
cin >> A[i];
}
bool dp[101000] = {};
for (int i = 1; i <= K; i++) {
for (int j = 0; j < N; j++) {
if (i - A[j] >= 0)
dp[i] |= !(dp[i - A[j]]);
}
}
if... | [
"variable_declaration.value.change"
] | 978,358 | 978,359 | u469315559 | cpp |
p03170 | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
bool dp[k + 1];
for (int i = 0; i <= k; ++i) {
dp[i] = false;
}
vector<int> arr(n);
for (int i = 0; i < n; ++i) {
cin >> arr[i];
}
for (int i = 0; i <= k; ++i) {
for (int j = 0; j <... | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
bool dp[k + 1];
for (int i = 0; i <= k; ++i) {
dp[i] = false;
}
vector<int> arr(n);
for (int i = 0; i < n; ++i) {
cin >> arr[i];
}
for (int i = 1; i <= k; ++i) {
for (int j = 0; j <... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,370 | 978,371 | u747883255 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<bool> dp(k + 1);
for (int stones = 0; stones <= n; stones++) {
for (int x : a) {
if (stones >= x && dp[stones - x] == false)
dp[sto... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<bool> dp(k + 1);
for (int stones = 0; stones <= k; stones++) {
for (int x : a) {
if (stones >= x && dp[stones - x] == false)
dp[sto... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 978,376 | 978,377 | u193875150 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define D double
#define lli long long int
#define testcase \
int t; \
cin >> t; ... | #include <bits/stdc++.h>
using namespace std;
#define D double
#define lli long long int
#define testcase \
int t; \
cin >> t; ... | [
"control_flow.branch.if.condition.change",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,378 | 978,379 | u391557570 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define D double
#define lli long long int
#define testcase \
int t; \
cin >> t; ... | #include <bits/stdc++.h>
using namespace std;
#define D double
#define lli long long int
#define testcase \
int t; \
cin >> t; ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,381 | 978,382 | u391557570 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
void solve() {
int n, k;
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int dp[k + 1];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
dp[i] = 0;
for (int j = 0; j < n; j++) {
if (i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
void solve() {
int n, k;
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int dp[k + 1];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
dp[i] = 0;
for (int j = 0; j < n; j++) {
if (i... | [
"literal.string.change",
"literal.string.case.change",
"expression.operation.binary.change"
] | 978,389 | 978,390 | u180171323 | cpp |
p03170 |
#include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define mod 1000000007
#define N 500043
#define mp(a, b) make_pair(a, b)
#define loop(a, b) for (int i = a; i < b; i++)
#define test \
int t; ... |
#include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define mod 1000000007
#define N 500043
#define mp(a, b) make_pair(a, b)
#define loop(a, b) for (int i = a; i < b; i++)
#define test \
int t; ... | [
"expression.operation.binary.add"
] | 978,391 | 978,392 | u044430581 | cpp |
p03170 | // SHIVANSH BHAT
// IIT ROORKEE
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
typedef long long int ll;
typedef unsigned long long int ull;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
ll mod1 = pow(10, 9) + 7;
int mod2 = 998244353;
ll inf = 1e9;
ll maxxy = 1e6 +... | // SHIVANSH BHAT
// IIT ROORKEE
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
typedef long long int ll;
typedef unsigned long long int ull;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
ll mod1 = pow(10, 9) + 7;
int mod2 = 998244353;
ll inf = 1e9;
ll maxxy = 1e6 +... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,393 | 978,394 | u741487428 | cpp |
p03170 | // SHIVANSH BHAT
// IIT ROORKEE
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
typedef long long int ll;
typedef unsigned long long int ull;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
ll mod1 = pow(10, 9) + 7;
int mod2 = 998244353;
ll inf = 1e9;
ll maxxy = 1e6 +... | // SHIVANSH BHAT
// IIT ROORKEE
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
typedef long long int ll;
typedef unsigned long long int ull;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
ll mod1 = pow(10, 9) + 7;
int mod2 = 998244353;
ll inf = 1e9;
ll maxxy = 1e6 +... | [
"call.arguments.change",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,395 | 978,394 | u741487428 | cpp |
p03170 | // SHIVANSH BHAT
// IIT ROORKEE
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
typedef long long int ll;
typedef unsigned long long int ull;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
ll mod1 = pow(10, 9) + 7;
int mod2 = 998244353;
ll inf = 1e9;
ll maxxy = 1e6 +... | // SHIVANSH BHAT
// IIT ROORKEE
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
typedef long long int ll;
typedef unsigned long long int ull;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
ll mod1 = pow(10, 9) + 7;
int mod2 = 998244353;
ll inf = 1e9;
ll maxxy = 1e6 +... | [
"call.arguments.change",
"literal.string.change",
"io.output.change"
] | 978,396 | 978,394 | u741487428 | cpp |
p03170 | #include <iostream>
const int MAX_N = 305;
bool dp
[10000025]
[2]; // dp[i][j]代表还剩i个石头,当前为k进行操作时会输还是会赢,0代表第一个人first,1代表第二个人second
int arr[MAX_N], n;
bool dfs(int k, int t) {
//初始条件为dp[0][0]=0,dp[0][1]=0
if (dp[k][t] > 0)
return dp[k][t];
bool ans = 0;
for (int i = 1; i <= n; ++i) //遍历n个可以移除石子的数量
... | #include <iostream>
const int MAX_N = 305;
bool dp
[10000025]
[2]; // dp[i][j]代表还剩i个石头,当前为k进行操作时会输还是会赢,0代表第一个人first,1代表第二个人second
int arr[MAX_N], n;
bool dfs(int k, int t) {
//初始条件为dp[0][0]=0,dp[0][1]=0
if (dp[k][t] > 0)
return dp[k][t];
bool ans = 0;
for (int i = 1; i <= n; ++i) //遍历n个可以移除石子的数量
... | [
"assignment.value.change"
] | 978,399 | 978,400 | u353919145 | cpp |
p03170 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define MAX 100000
int main() {
int n, k;
cin >> n >> k;
vector<int> dp(MAX, 0);
vector<int> arr(n);
for (int i = 0; i < n; i++) {
cin >> arr[i];
dp[arr[i]] = 1;
}
for (int i = 0; i <= k; i++) {
if (!dp[i]) {
for (int j = ... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define MAX 100000
int main() {
int n, k;
cin >> n >> k;
vector<int> dp(MAX, 0);
vector<int> arr(n);
for (int i = 0; i < n; i++) {
cin >> arr[i];
dp[arr[i]] = 1;
}
for (int i = 0; i <= k; i++) {
if (!dp[i]) {
for (int j = ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,401 | 978,402 | u314936326 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i < (ll)(n); i++)
#define INF 10000000000
#define MOD 1000000007
using ll = long long;
int main() {
int N, K;
cin >> N >> K;
vector<int> A(N);
rep(i, N) cin >> A[i];
vector<bool... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i <= (ll)(n); i++)
#define INF 10000000000
#define MOD 1000000007
using ll = long long;
int main() {
int N, K;
cin >> N >> K;
vector<int> A(N);
rep(i, N) cin >> A[i];
vector<boo... | [
"expression.operator.compare.change",
"preprocessor.define.value.change"
] | 978,406 | 978,407 | u779216084 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int dp[k + 1] = {};
for (int stones = 0; stones <= k; stones++) {
for (int wt : arr) {
if (stones >= wt and !dp[stones - wt]) {
dp[stones] =... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int dp[k + 1] = {};
for (int stones = 0; stones <= k; stones++) {
for (int wt : arr) {
if (stones >= wt and !dp[stones - wt]) {
dp[stones] =... | [
"expression.operation.unary.logical.remove"
] | 978,410 | 978,411 | u396785540 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int n, k;
int a[101];
bool dp[101];
bool b() {
dp[0] = 0;
int i = 1;
while (i <= k) {
bool gh = false;
int index = 0;
while (index < n && (i - a[index]) >= 0) {
if (dp[i - a[index]] == 0) {
gh = true;
break;
}
index++;
... | #include <bits/stdc++.h>
using namespace std;
int n, k;
int a[101];
bool dp[100001];
bool b() {
dp[0] = 0;
int i = 1;
while (i <= k) {
bool gh = false;
int index = 0;
while (index < n && (i - a[index]) >= 0) {
if (dp[i - a[index]] == 0) {
gh = true;
break;
}
index++;... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 978,412 | 978,413 | u103697897 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define MOD 1000000007
void solve() {
int n, k;
cin >> n >> k;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int dp[k];
memset(dp, 0, sizeof(dp));
for (int i = 0; i <= k; i++) {
for (int j = 0; j < n; j++) {
... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define MOD 1000000007
void solve() {
int n, k;
cin >> n >> k;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int dp[k + 1];
memset(dp, 0, sizeof(dp));
for (int i = 0; i <= k; i++) {
for (int j = 0; j < n; j++... | [
"variable_declaration.array_dimensions.change",
"expression.operation.binary.add"
] | 978,416 | 978,417 | u244121551 | cpp |
p03170 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int dp[100005];
int n;
int a[105];
int cal(int k) {
if (dp[k] != -1)
return dp[k];
for (int i = 0; i < n; i++) {
if (a[i] <= k) {
if (cal(k - a[i]) == 2)
dp[k] = 1;
return dp[k];
}
}
dp[k] = 2;
return dp[k];
}
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int dp[100005];
int n;
int a[100005];
int cal(int k) {
if (dp[k] != -1)
return dp[k];
for (int i = 0; i < n; i++) {
if (a[i] <= k) {
if (cal(k - a[i]) == 2) {
dp[k] = 1;
return dp[k];
}
}
}
dp[k] = 2;
r... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 978,418 | 978,419 | u500482384 | cpp |
p03170 | // Bismillahir Rahmanir Rahim
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define xx first
#define yy second
#define sci(n) scanf("%d", &n)
#define scii(n,... | // Bismillahir Rahmanir Rahim
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define xx first
#define yy second
#define sci(n) scanf("%d", &n)
#define scii(n,... | [
"misc.opposites",
"variable_declaration.value.change",
"expression.operator.change"
] | 978,423 | 978,424 | u880622797 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
const int m = 1e9 + 7;
using ll = long long;
void rec(vector<int> &seg, vector<int> v, int pos, int tl, int tr) {
if (tl == tr) {
seg[pos] = v[tl];
return;
}
int mid = (tl + tr) / 2;
rec(seg, v, 2 * pos + 1, tl, mid);
rec(seg, v, 2 * pos + 2, mid + 1, tr);... | #include <bits/stdc++.h>
using namespace std;
const int m = 1e9 + 7;
using ll = long long;
void rec(vector<int> &seg, vector<int> v, int pos, int tl, int tr) {
if (tl == tr) {
seg[pos] = v[tl];
return;
}
int mid = (tl + tr) / 2;
rec(seg, v, 2 * pos + 1, tl, mid);
rec(seg, v, 2 * pos + 2, mid + 1, tr);... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,425 | 978,426 | u696268811 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define rep2(i, m, n) for (int i = (m); i < (n); ++i)
#define rep(i, n) rep2(i, 0, n)
#define debug(x) cout << x << endl
typedef long long int ll;
typedef long double ld;
typedef pair<int, int> P;
template <typename T> struct V : vector<T> { using vector<T>::vector; };
V()-... | #include <bits/stdc++.h>
using namespace std;
#define rep2(i, m, n) for (int i = (m); i < (n); ++i)
#define rep(i, n) rep2(i, 0, n)
#define debug(x) cout << x << endl
typedef long long int ll;
typedef long double ld;
typedef pair<int, int> P;
template <typename T> struct V : vector<T> { using vector<T>::vector; };
V()-... | [
"call.remove"
] | 978,427 | 978,428 | u389007679 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define MEM(a, b) memset(a, (b), sizeof(a))
#define FOR(i, j, k, in) for (int i = j; i < k; i += in)
#define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in)
#define REP(i, j) FOR(i, 0, j, 1)
#define RREP(i, j) RFOR(i, j, 0, 1)
#define MP make_pair
#define PB push_back
#d... | #include <bits/stdc++.h>
using namespace std;
#define MEM(a, b) memset(a, (b), sizeof(a))
#define FOR(i, j, k, in) for (int i = j; i < k; i += in)
#define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in)
#define REP(i, j) FOR(i, 0, j, 1)
#define RREP(i, j) RFOR(i, j, 0, 1)
#define MP make_pair
#define PB push_back
#d... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,436 | 978,437 | u148047956 | cpp |
p03170 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
/*#include <boost/multiprecision/cpp_int.hpp>
using boost::multiprecision::cpp_int;*/
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long int
#define pb push_back
#define mp12 make_pair
#define pii p... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
/*#include <boost/multiprecision/cpp_int.hpp>
using boost::multiprecision::cpp_int;*/
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long int
#define pb push_back
#define mp12 make_pair
#define pii p... | [
"expression.operation.binary.remove"
] | 978,438 | 978,439 | u263500220 | cpp |
p03170 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
// dp[i] : TRUE if first player wins with i stones left
vector<bool> dp(k + 1);
for (int i... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
// dp[i] : TRUE if first player wins with i stones left
vector<bool> dp(k + 1);
for (int i... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 978,440 | 978,441 | u940210918 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | [
"literal.string.change",
"literal.string.case.change",
"function.return_value.change"
] | 978,449 | 978,450 | u294187638 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | [
"literal.string.change",
"literal.string.case.change",
"function.return_value.change",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 978,451 | 978,450 | u294187638 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | [
"literal.string.change",
"literal.string.case.change",
"function.return_value.change"
] | 978,449 | 978,452 | u294187638 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | #include <bits/stdc++.h>
using namespace std;
#define w(t) \
int t; \
cin >> t; \
while (t--)
#define pb push_b... | [
"literal.string.change",
"literal.string.case.change",
"function.return_value.change",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 978,451 | 978,452 | u294187638 | cpp |
p03170 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
string getWinner(vector<int> pickOptions, int stones) {
vector<vector<bool>> dp(stones + 1, vector<bool>(2, false));
for (int i = 1; i <= stones; i++) {
for (int stone : pickOptions) {
if (i - stone >= 0) {
if (dp[i - st... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
string getWinner(vector<int> pickOptions, int stones) {
vector<vector<bool>> dp(stones + 1, vector<bool>(2, false));
for (int i = 1; i <= stones; i++) {
for (int stone : pickOptions) {
if (i - stone >= 0) {
if (dp[i - st... | [
"control_flow.branch.if.condition.change"
] | 978,455 | 978,456 | u309984532 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
void solve(int ar[], int n, int k) {
int dp[k + 1];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
int c = 1;
for (int j = 1; j <= n; j++) {
if (i >= ar[j]) {
if (dp[i - ar[j]] == 0) {
c = 0;
break;
}
}
}
if ... | #include <bits/stdc++.h>
using namespace std;
void solve(int ar[], int n, int k) {
int dp[k + 1];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
int c = 1;
for (int j = 1; j <= n; j++) {
if (i >= ar[j]) {
if (dp[i - ar[j]] == 0) {
c = 0;
break;
}
}
}
if ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,463 | 978,464 | u383141964 | cpp |
p03170 | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#define ll long long
int main() {
int n, k;
cin >> n >> k;
int arr[n];
int dp[k];
for (int i... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#define ll long long
int main() {
int n, k;
cin >> n >> k;
int arr[n];
int dp[k + 1];
for (i... | [
"variable_declaration.array_dimensions.change",
"expression.operation.binary.add"
] | 978,467 | 978,468 | u385782352 | cpp |
p03170 | /* Simplicity and Goodness */
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
// typedef tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;
void my... | /* Simplicity and Goodness */
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
// typedef tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;
void my... | [
"control_flow.branch.if.condition.change"
] | 978,471 | 978,472 | u777549027 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N, K;
vector<int> a;
vector<bool> dp;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> N >> K;
a.resize(N);
dp.resize(K + 1, false);
for (int i = 0; i < N; i++) {
cin >> a[i];
}
for (int i = 0; i <= K; i++) {... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N, K;
vector<int> a;
vector<bool> dp;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> N >> K;
a.resize(N);
dp.resize(K + 1, false);
for (int i = 0; i < N; i++) {
cin >> a[i];
}
for (int i = 0; i <= K; i++) {... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 978,478 | 978,479 | u793977489 | cpp |
p03170 | /* _
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
____/`---'\____
/ \\| |// \
/ \\||| /:\ |||// \
/ _||||| ... | /* _
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
____/`---'\____
/ \\| |// \
/ \\||| /:\ |||// \
/ _||||| ... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 978,484 | 978,485 | u116521736 | cpp |
p03170 | /*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;*/
#include <algorithm>
#include <bits/stdc++.h>
#include <ctype.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define S second
#def... | /*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;*/
#include <algorithm>
#include <bits/stdc++.h>
#include <ctype.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define S second
#def... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"variable_access.subscript.index.change"
] | 978,493 | 978,494 | u331842396 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
string solve(vector<int> &v, int k) {
bool dp[k + 1];
memset(dp, 0, sizeof(dp));
for (int i = 1; i <= k; i++) {
for (int move : v) {
if (move > i)
continue;
if (dp[i - move] == 0) {
dp[i] = 1;
}
}
}
return (dp[k]) ? "Fir... | #include <bits/stdc++.h>
using namespace std;
string solve(vector<int> &v, int k) {
bool dp[k + 1];
memset(dp, 0, sizeof dp);
for (int i = 1; i <= k; i++) {
for (int move : v) {
if (move > i)
continue;
if (dp[i - move] == 0) {
dp[i] = 1;
}
}
}
return (dp[k]) ? "Firs... | [
"call.arguments.change",
"identifier.change",
"io.output.change",
"io.output.newline.add"
] | 978,497 | 978,498 | u345177558 | cpp |
p03170 | /// Journey to the End of earth ///
/// Gunjan Kumar ///
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #include <functional> // for less
// using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define s(n) scanf("%d", &n)
#define ls(... | /// Journey to the End of earth ///
/// Gunjan Kumar ///
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #include <functional> // for less
// using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define s(n) scanf("%d", &n)
#define ls(... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,499 | 978,500 | u464439644 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll lo... | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll lo... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 978,501 | 978,502 | u296273488 | cpp |
p03170 | /* Code by : Suraj (@suraj1611) */
#include <bits/stdc++.h>
#include <string>
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define mx INT_MAX
#define mn INT_MIN
#define md 1000000007
#define pb push_back
#define mp make_pa... | /* Code by : Suraj (@suraj1611) */
#include <bits/stdc++.h>
#include <string>
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define mx INT_MAX
#define mn INT_MIN
#define md 1000000007
#define pb push_back
#define mp make_pa... | [
"identifier.change",
"expression.operation.binary.change"
] | 978,503 | 978,504 | u675396875 | cpp |
p03170 | /// int ->(-2147483648<->2147483647)
/// unsigned int(0<->4294967295)
/// long long int (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807)
/// unsigned long long int (0 to 18,446,744,073,709,551,615)
//#include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <ext/pb_ds/assoc_cont... | /// int ->(-2147483648<->2147483647)
/// unsigned int(0<->4294967295)
/// long long int (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807)
/// unsigned long long int (0 to 18,446,744,073,709,551,615)
//#include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <ext/pb_ds/assoc_cont... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 978,505 | 978,506 | u079671504 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<ll, ll>
#define vi vector<ll>
#define mii map<ll, ll>
#define pqb priority_queue<ll>
#define pqs priority_queue<ll, vi, greater<ll>>
#define setbits(x) __buil... | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<ll, ll>
#define vi vector<ll>
#define mii map<ll, ll>
#define pqb priority_queue<ll>
#define pqs priority_queue<ll, vi, greater<ll>>
#define setbits(x) __buil... | [
"literal.number.change",
"call.arguments.change"
] | 978,516 | 978,517 | u525882623 | cpp |
p03170 | #include <bits/stdc++.h>
#define rep(a, n) for (ll a = 0; a < (n); ++a)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<vector<ll>> Graph;
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 ... | #include <bits/stdc++.h>
#define rep(a, n) for (ll a = 0; a < (n); ++a)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<vector<ll>> Graph;
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 ... | [
"assignment.change"
] | 978,518 | 978,519 | u045408189 | cpp |
p03170 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
int main() {
int N, K;
cin >> N >> K;
vector<int> a(N);
REP(i, N) cin >> a[i];
// dp[i] = 石が i 個のときに太郎くんが勝つかどうか... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
int main() {
int N, K;
cin >> N >> K;
vector<int> a(N);
REP(i, N) cin >> a[i];
// dp[i] = 石が i 個のときに太郎くんが勝つかどうか... | [
"literal.string.change",
"io.output.change"
] | 978,524 | 978,525 | u127285813 | cpp |
p03170 | // k-stones
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<long long>> vvll;
typedef ve... | // k-stones
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<long long>> vvll;
typedef ve... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,532 | 978,533 | u068011824 | cpp |
p03170 | // k-stones
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<long long>> vvll;
typedef ve... | // k-stones
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<long long>> vvll;
typedef ve... | [
"variable_declaration.type.change",
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 978,534 | 978,533 | u068011824 | cpp |
p03170 | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
typedef long long ll;
const ll mod = 1e9 + 7;
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define rc(x) return cout << x << "\n", 0
#define sz(s) (int)s.size()
#define pb push_back
#define mp make_pair
#define fr first
#define sc secon... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
typedef long long ll;
const ll mod = 1e9 + 7;
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define rc(x) return cout << x << "\n", 0
#define sz(s) (int)s.size()
#define pb push_back
#define mp make_pair
#define fr first
#define sc secon... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 978,539 | 978,540 | u055298530 | cpp |
p03170 | /*
author : Divyansh Gupta
*/
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
void print_err() { cerr << "\n"; }
template <class T, class... Arg> void print_err(T x, Arg &&..... | /*
author : Divyansh Gupta
*/
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
void print_err() { cerr << "\n"; }
template <class T, class... Arg> void print_err(T x, Arg &&..... | [] | 978,541 | 978,542 | u992065512 | cpp |
p03170 | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
typedef pair<int, int> P;
const int INF = 1001001001;
const long double PI = (acos(-1));
const int mod = 1e9 + 7;
const int vx[4] = {0, 1, 0, -1};
const int vy[4] = {1, 0,... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
typedef pair<int, int> P;
const int INF = 1001001001;
const long double PI = (acos(-1));
const int mod = 1e9 + 7;
const int vx[4] = {0, 1, 0, -1};
const int vy[4] = {1, 0,... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 978,547 | 978,548 | u154148649 | cpp |
p03170 | #include <bits/stdc++.h>
using namespace std;
int main() {
long n, k;
cin >> n >> k;
vector<long> a(n + 1);
for (long i = 1; i <= n; i++) {
cin >> a[i];
}
vector<long> dp(k + 2);
for (long i = 1; i <= k + 1; i++) {
for (long j = 1; j <= n + 1; j++) {
if (i - a[j] >= 0 && dp[i - a[j]] =... | #include <bits/stdc++.h>
using namespace std;
int main() {
long n, k;
cin >> n >> k;
vector<long> a(n + 1);
for (long i = 1; i <= n; i++) {
cin >> a[i];
}
vector<long> dp(k + 2);
for (long i = 1; i <= k + 1; i++) {
for (long j = 1; j <= n; j++) {
if (i - a[j] >= 0 && dp[i - a[j]] == 0)... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"literal.number.change",
"expression.off_by_one",
"io.output.change"
] | 978,551 | 978,552 | u229596090 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.