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 |
|---|---|---|---|---|---|---|---|
p03164 | #include "bits/stdc++.h"
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")
// wierd debugging stuff
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) ... | #include "bits/stdc++.h"
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")
// wierd debugging stuff
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) ... | [
"variable_declaration.type.change",
"io.output.newline.add"
] | 969,372 | 969,371 | u161309389 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll INF = 1e18l + 5;
int main() {
int n, W;
cin >> n >> W;
vector<ll> dp(10005, INF);
dp[0] = 0;
for (int i = 0; i < n; ++i) {
int v, w;
cin >> w >> v;
for (int j = 10005 - v; j >= 0; --j) {
dp[v + j] = min(dp[v + j],... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll INF = 1e18l + 5;
int main() {
int n, W;
cin >> n >> W;
vector<ll> dp(100005, INF);
dp[0] = 0;
for (int i = 0; i < n; ++i) {
int v, w;
cin >> w >> v;
for (int j = 100005 - v; j >= 0; --j) {
dp[v + j] = min(dp[v + j... | [
"literal.number.change",
"call.arguments.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change",
"control_flow.loop.for.condition.change"
] | 969,375 | 969,374 | u741042758 | cpp |
p03164 | // CODE © by 𝕌𝕥𝕜𝕒𝕣𝕤𝕙 𝔾𝕒𝕣𝕘
// Copying or sharing of this code without permission of the Author is strictly
// prohibited!!!
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mx 1000000009
int main() {
ll n, W;
cin >> n >> W;
ll v[n + 1], w[n + 1];
ll sum = 0;
for (ll i = 1; ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mx 1000000009
int main() {
ll n, W;
cin >> n >> W;
ll v[n + 1], w[n + 1];
ll sum = 0;
for (ll i = 1; i <= n; i++) {
cin >> w[i] >> v[i];
}
for (ll i = 1; i <= n; i++)
sum += v[i];
ll dp[sum + 1];
// memset(dp, ll_MAX, s... | [
"expression.operation.binary.remove"
] | 969,376 | 969,377 | u279896753 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int n, W, s = 0;
cin >> n >> W;
vector<int> w(n), c(n);
for (int i = 0; i < n; i++) {
cin >> w[i] >> c[i];
s += c[i];
}
vector<int> dp(s + 1, INT_MAX);
dp[0] = 0;
for (int i = 0; i < n; i++) {
for (int j =... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int n, W, s = 0;
cin >> n >> W;
vector<int> w(n), c(n);
for (int i = 0; i < n; i++) {
cin >> w[i] >> c[i];
s += c[i];
}
vector<int> dp(s + 1, INT_MAX);
dp[0] = 0;
for (int i = 0; i < n; i++) {
for (int j =... | [
"call.arguments.change"
] | 969,382 | 969,383 | u345762875 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 105, W = 1e9 + 5, V = 1e3 + 5, INF = 1e9 + 5;
ll dp[N][N * V];
int main() {
ios_base::sync_with_stdio(0);
cin.tie();
int n, w;
cin >> n >> w;
fill(dp[0], dp[0] + N * V, INF);
dp[0][0] = 0;
for (int i = 1; i <= n; i++) {... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 105, W = 1e9 + 5, V = 1e3 + 5, INF = 1e9 + 5;
ll dp[N][N * V];
int main() {
ios_base::sync_with_stdio(0);
cin.tie();
int n, w;
cin >> n >> w;
fill(dp[0], dp[0] + N * V, INF);
dp[0][0] = 0;
for (int i = 1; i <= n; i++) {... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 969,384 | 969,385 | u319048282 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 105, W = 1e9 + 5, V = 1e3 + 5, INF = 1e9 + 5;
ll dp[N][N * V];
int main() {
ios_base::sync_with_stdio(0);
cin.tie();
int n, w;
cin >> n >> w;
fill(dp[0], dp[0] + N * V, INF);
dp[0][0] = 0;
for (int i = 1; i <= n; i++) {... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 105, W = 1e9 + 5, V = 1e3 + 5, INF = 1e9 + 5;
ll dp[N][N * V];
int main() {
ios_base::sync_with_stdio(0);
cin.tie();
int n, w;
cin >> n >> w;
fill(dp[0], dp[0] + N * V, INF);
dp[0][0] = 0;
for (int i = 1; i <= n; i++) {... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"call.arguments.change"
] | 969,386 | 969,385 | u319048282 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
long long dp[101][100002];
int main() {
long long N, W;
cin >> N >> W;
long long w[N + 1];
long long v[N + 1];
long long V = 100001;
w[0] = 0, v[0] = 0;
for (long long i = 1; i <= N; ++i) {
cin >> w[i] >> v[i];
}
for (long long i = 0; i <= N; ++i) {... | #include <bits/stdc++.h>
using namespace std;
long long dp[101][100002];
int main() {
long long N, W;
cin >> N >> W;
long long w[N + 1];
long long v[N + 1];
long long V = 100000;
w[0] = 0, v[0] = 0;
for (long long i = 1; i <= N; ++i) {
cin >> w[i] >> v[i];
}
for (long long i = 0; i <= N; ++i) {... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 969,401 | 969,402 | u440697133 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
long long dp[101][100001];
int main() {
long long N, W;
cin >> N >> W;
long long w[N + 1];
long long v[N + 1];
long long V = 100001;
w[0] = 0, v[0] = 0;
for (long long i = 1; i <= N; ++i) {
cin >> w[i] >> v[i];
}
for (long long i = 0; i <= N; ++i) {... | #include <bits/stdc++.h>
using namespace std;
long long dp[101][100002];
int main() {
long long N, W;
cin >> N >> W;
long long w[N + 1];
long long v[N + 1];
long long V = 100000;
w[0] = 0, v[0] = 0;
for (long long i = 1; i <= N; ++i) {
cin >> w[i] >> v[i];
}
for (long long i = 0; i <= N; ++i) {... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 969,403 | 969,402 | u440697133 | cpp |
p03164 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define endl "\n"
#define ll long long
#define pb emplace_back
#define fi first
#define se second
#define pll pair<ll, ll>
#define ull unsigned long long
#define ld long double
#define debug(x) cout << #x << " :: " ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define endl "\n"
#define ll long long
#define pb emplace_back
#define fi first
#define se second
#define pll pair<ll, ll>
#define ull unsigned long long
#define ld long double
#define debug(x) cout << #x << " :: " ... | [
"literal.number.change",
"expression.operation.binary.change",
"assignment.variable.change",
"call.arguments.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 969,434 | 969,435 | u298511956 | cpp |
p03164 | /* ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌
▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌
▐░█▀▀▀▀▀▀▀▀▀ ... | /* ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌
▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌
▐░█▀▀▀▀▀▀▀▀▀ ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 969,436 | 969,437 | u642506891 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define INF 1000000000000000007
int main() {
int n, w;
cin >> n >> w;
vector<ll> weight(n);
vector<ll> value(n);
for (int i = 0; i < n; i++) {
cin >> weight[i] >> value[i];
}
ll sum = 0;
for (int i = 0; i < n; i++) {
sum +=... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define INF 1000000000000000007
int main() {
int n, w;
cin >> n >> w;
vector<ll> weight(n);
vector<ll> value(n);
for (int i = 0; i < n; i++) {
cin >> weight[i] >> value[i];
}
ll sum = 0;
for (int i = 0; i < n; i++) {
sum +=... | [] | 969,442 | 969,443 | u204158532 | cpp |
p03164 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
//
// using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
//
// using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
tree_... | [
"literal.number.change",
"call.arguments.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 969,444 | 969,445 | u403290660 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define V_SUM_MAX 100000
#define N_MAX 100
#define W_MAX 1000000000
// To store the states of DP
ll dp[V_SUM_MAX + 1][N_MAX];
bool v[V_SUM_MAX + 1][N_MAX];
// Function to solve the recurrence relation
ll solveDp(ll r, ll i, ll *w, ll *val, ll n)... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define V_SUM_MAX 100000
#define N_MAX 100
#define W_MAX 100000000000
// To store the states of DP
ll dp[V_SUM_MAX + 1][N_MAX];
bool v[V_SUM_MAX + 1][N_MAX];
// Function to solve the recurrence relation
ll solveDp(ll r, ll i, ll *w, ll *val, ll ... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 969,514 | 969,515 | u671909786 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
ll isPrime[1000010] = {0};
vector<ll> Prime;
void sieve() {
ll i, j;
isPrime[0] = isPrime[1] = 1;
for (i = 2; i < 1000010; i++)
if (isPrime[i] == 0)
for (j = 2 * i; j < 1000010; j += i)
isPrime[j] = 1;... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
ll isPrime[1000010] = {0};
vector<ll> Prime;
void sieve() {
ll i, j;
isPrime[0] = isPrime[1] = 1;
for (i = 2; i < 1000010; i++)
if (isPrime[i] == 0)
for (j = 2 * i; j < 1000010; j += i)
isPrime[j] = 1;... | [
"io.output.change",
"io.output.newline.add"
] | 969,518 | 969,519 | u102044886 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
ll isPrime[1000010] = {0};
vector<ll> Prime;
void sieve() {
ll i, j;
isPrime[0] = isPrime[1] = 1;
for (i = 2; i < 1000010; i++)
if (isPrime[i] == 0)
for (j = 2 * i; j < 1000010; j += i)
isPrime[j] = 1;... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
ll isPrime[1000010] = {0};
vector<ll> Prime;
void sieve() {
ll i, j;
isPrime[0] = isPrime[1] = 1;
for (i = 2; i < 1000010; i++)
if (isPrime[i] == 0)
for (j = 2 * i; j < 1000010; j += i)
isPrime[j] = 1;... | [
"expression.operation.binary.remove",
"assignment.change"
] | 969,520 | 969,519 | u102044886 | cpp |
p03164 | // ABHISHEK AGRAWAL//
// Newbie......You have to be odd to be no. ONE :)//
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define fl float
#define lcm(a, b) (a * (b / __gcd(a, b)))
#define vs vector<string>
#define vc vector<char>
#define vll vector<ll>
#define sll set<ll>... | // ABHISHEK AGRAWAL//
// Newbie......You have to be odd to be no. ONE :)//
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define fl float
#define lcm(a, b) (a * (b / __gcd(a, b)))
#define vs vector<string>
#define vc vector<char>
#define vll vector<ll>
#define sll set<ll>... | [
"assignment.value.change",
"identifier.change"
] | 969,526 | 969,527 | u625460396 | cpp |
p03164 | // ABHISHEK AGRAWAL//
// Newbie......You have to be odd to be no. ONE :)//
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define fl float
#define lcm(a, b) (a * (b / __gcd(a, b)))
#define vs vector<string>
#define vc vector<char>
#define vll vector<ll>
#define sll set<ll>... | // ABHISHEK AGRAWAL//
// Newbie......You have to be odd to be no. ONE :)//
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define fl float
#define lcm(a, b) (a * (b / __gcd(a, b)))
#define vs vector<string>
#define vc vector<char>
#define vll vector<ll>
#define sll set<ll>... | [
"assignment.value.change",
"identifier.change",
"control_flow.loop.for.initializer.change",
"variable_declaration.type.change"
] | 969,528 | 969,527 | u625460396 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, W;
cin >> N >> W;
vector<int> DP(1e5 + 1, 1e9);
DP.at(0) = 0;
for (int i = 0, w, v; i < N && cin >> w >> v; i++)
for (int j = 1e5; j >= v; j--)
DP.at(j) = min(DP.at(j), DP.at(j - v) + w);
for (int i = 1e5; i >= 0; i--)
if (DP.a... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, W;
cin >> N >> W;
vector<int> DP(1e5 + 1, 1e9 + 1);
DP.at(0) = 0;
for (int i = 0, w, v; i < N && cin >> w >> v; i++)
for (int j = 1e5; j >= v; j--)
DP.at(j) = min(DP.at(j), DP.at(j - v) + w);
for (int i = 1e5; i >= 0; i--)
if (... | [
"assignment.change"
] | 969,534 | 969,535 | u045289115 | cpp |
p03164 | #include <bits/stdc++.h>
using intl = long long;
using itnl = long long; // typo用
using uintl = unsigned long long;
using itn = int; // typo用
using ld = long double;
using namespace std;
#define rep(i, n) for (intl i = 0; i < (intl)(n); i++)
#define rrep(i, n) for (intl i = (intl)(n)-1; i >= 0; i--)
#define repi(i, a, ... | #include <bits/stdc++.h>
using intl = long long;
using itnl = long long; // typo用
using uintl = unsigned long long;
using itn = int; // typo用
using ld = long double;
using namespace std;
#define rep(i, n) for (intl i = 0; i < (intl)(n); i++)
#define rrep(i, n) for (intl i = (intl)(n)-1; i >= 0; i--)
#define repi(i, a, ... | [
"expression.operation.binary.add"
] | 969,538 | 969,539 | u344119694 | cpp |
p03164 | // INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
// DEFINE
//------------------------------------------
#define ll long long
#define ld long double
#define ALLv(a) (a).begin(), (a).end()
#define ALL(a, n) (a), (a) + n
#define vi vector<long long>
#define vd vector<long double>
#define vs... | // INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
// DEFINE
//------------------------------------------
#define ll long long
#define ld long double
#define ALLv(a) (a).begin(), (a).end()
#define ALL(a, n) (a), (a) + n
#define vi vector<long long>
#define vd vector<long double>
#define vs... | [
"identifier.change",
"call.function.change",
"call.arguments.add"
] | 969,552 | 969,551 | u334644046 | cpp |
p03164 | /*
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mp make_pair
#define pb push_back
#define fi first
#define si second
#define fastIO \
ios_base::sync_with_stdio(false); \
... | /*
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mp make_pair
#define pb push_back
#define fi first
#define si second
#define fastIO \
ios_base::sync_with_stdio(false); \
... | [
"variable_declaration.type.change",
"literal.number.change",
"expression.operation.binary.change"
] | 969,561 | 969,562 | u340251061 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MAX_V 100001
const int INF = 2147483647;
int dp[101][MAX_V];
int main() {
int N, W, w[101], v[101], ans = 0;
cin >> N >> W;
REP(i, N) cin >> w[i] >> v[i];
REP(i, MAX_V) dp[0][i] = (i ? INF : 0);
REP(i, N) R... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MAX_V 100001
const int INF = 1001001001;
int dp[101][MAX_V];
int main() {
int N, W, w[101], v[101], ans = 0;
cin >> N >> W;
REP(i, N) cin >> w[i] >> v[i];
REP(i, MAX_V) dp[0][i] = (i ? INF : 0);
REP(i, N) R... | [
"literal.number.change",
"variable_declaration.value.change"
] | 969,572 | 969,571 | u082801599 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
// A utility function that returns maximum of two integers
int max(int a, int b) { return (a > b) ? a : b; }
// Returns the maximum value that can be put in a knapsack of capacity W
long long knapSack1(int W, int weight[], int val[], int n) {
int k, w;
long long **F = ... | #include <bits/stdc++.h>
using namespace std;
// A utility function that returns maximum of two integers
int max(int a, int b) { return (a > b) ? a : b; }
// Returns the maximum value that can be put in a knapsack of capacity W
long long knapSack1(int W, int weight[], int val[], int n) {
int k, w;
long long **F = ... | [
"identifier.change",
"call.function.change",
"expression.operation.binary.change"
] | 969,580 | 969,581 | u930153819 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
// A utility function that returns maximum of two integers
int max(int a, int b) { return (a > b) ? a : b; }
// Returns the maximum value that can be put in a knapsack of capacity W
long long knapSack1(int W, int weight[], int val[], int n) {
int k, w;
long long **F = ... | #include <bits/stdc++.h>
using namespace std;
// A utility function that returns maximum of two integers
int max(int a, int b) { return (a > b) ? a : b; }
// Returns the maximum value that can be put in a knapsack of capacity W
long long knapSack1(int W, int weight[], int val[], int n) {
int k, w;
long long **F = ... | [
"identifier.change",
"call.function.change",
"expression.operation.binary.change"
] | 969,582 | 969,581 | u930153819 | cpp |
p03164 | /*
********************
Author : Sahil Kundu
********************
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define mod 1000000007
#define pb(i) push_back(i)
#define f first
#define s second
#define mk(l, r) make_pair(l, r)
#define vi vector<int>
#define vl vector<... | /*
********************
Author : Sahil Kundu
********************
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define mod 1000000007
#define pb(i) push_back(i)
#define f first
#define s second
#define mk(l, r) make_pair(l, r)
#define vi vector<int>
#define vl vector<... | [] | 969,602 | 969,603 | u398239969 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define int long long int
const int N = 1e3 + 1;
#define debug(x) cerr << "[(" << __LINE__ << ") " << (#x) << "]: " << x << endl;
const int inf = 1e15 + 7;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, w;
cin >> n >> w;
int wt[... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
const int N = 1e3 + 1;
#define debug(x) cerr << "[(" << __LINE__ << ") " << (#x) << "]: " << x << endl;
const int inf = 1e15 + 7;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, w;
cin >> n >> w;
int wt[... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 969,604 | 969,605 | u383071293 | cpp |
p03164 | /// 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.number.change",
"expression.operation.binary.change"
] | 969,606 | 969,607 | u464439644 | cpp |
p03164 | #include <bits/stdc++.h>
#define int long long int
#define float long double
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define inf 1e18
#define set_pre(x, y) fixed << setprecision(y) << x
#define w(t) ... | #include <bits/stdc++.h>
#define int long long int
#define float long double
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define inf 1e18
#define set_pre(x, y) fixed << setprecision(y) << x
#define w(t) ... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 969,615 | 969,616 | u398139668 | cpp |
p03164 | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
const long long INF = 1LL << 60;
const int MAX_V = pow(10, 3) * 100 + 1;
int main() {
int N;
long long W;
cin >> N >> W... | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
const long long INF = 1LL << 60;
const int MAX_V = pow(10, 3) * 100 + 1;
int main() {
int N;
long long W;
cin >> N >> W... | [
"assignment.change"
] | 969,617 | 969,618 | u662420765 | cpp |
p03164 | #include <climits>
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
int main() {
ll N = 0;
cin >> N;
ll VAL = 0;
cin >> VAL;
ll V = 0;
vector<vector<ll>> inp(N, vector<ll>(2));
for (ll i = 0; i < N; i++) {
cin >> inp[i][0] >> inp[i][1];
V += inp[i][1];
}
vector<l... | #include <climits>
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
int main() {
ll N = 0;
cin >> N;
ll VAL = 0;
cin >> VAL;
ll V = 0;
vector<vector<ll>> inp(N, vector<ll>(2));
for (ll i = 0; i < N; i++) {
cin >> inp[i][0] >> inp[i][1];
V += inp[i][1];
}
vector<l... | [] | 969,626 | 969,627 | u309984532 | cpp |
p03164 | #include "bits/stdc++.h"
using namespace std;
#define pb push_back
#define F first
#define S second
//#define biGinf 9e+18
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define inpv(v) \
for (auto &x : v) ... | #include "bits/stdc++.h"
using namespace std;
#define pb push_back
#define F first
#define S second
//#define biGinf 9e+18
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define inpv(v) \
for (auto &x : v) ... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 969,632 | 969,633 | u814094996 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define FASTIO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ll long ... | #include <bits/stdc++.h>
using namespace std;
#define FASTIO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ll long ... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"identifier.replace.remove",
"literal.replace.add"
] | 969,638 | 969,639 | u356974909 | cpp |
p03164 | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(var) \
do { \
... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(var) \
do { \
... | [
"literal.number.change",
"variable_declaration.value.change"
] | 969,687 | 969,688 | u215692812 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, W;
cin >> n >> W;
vector<int> w(n), v(n);
int val = 0;
for (int i = 0; i < n; i++) {
cin >> w[i] >> v[i];
val += v[i];
}
vector<vector<int>> dp(n + 1, vector<int>(val + 1, 0));
dp[0][0] = 0;
for (int i = 1; i <= val; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, W;
cin >> n >> W;
vector<int> w(n), v(n);
int val = 0;
for (int i = 0; i < n; i++) {
cin >> w[i] >> v[i];
val += v[i];
}
vector<vector<long long int>> dp(n + 1, vector<long long int>(val + 1, 0));
dp[0][0] = 0;
for (int i = 1; ... | [
"variable_declaration.type.widen.change"
] | 969,689 | 969,690 | u558282734 | cpp |
p03164 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)... | [
"literal.number.change",
"call.arguments.change"
] | 969,707 | 969,708 | u296160120 | cpp |
p03164 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)... | [
"literal.number.change",
"call.arguments.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 969,709 | 969,708 | u296160120 | cpp |
p03164 | #include <bits/stdc++.h>
#define vll vector<ll>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vpll vector<pair<ll, ll>>
#define pii pair<int, int>
#define REP(i, a) for (int(i) = 0; (i) < (a); (i)++)
#define RREP(i, a) for (int(i) = a - 1; (i) >= (0); (i)--)
#define REP2(i, a, b) for (int(i) = (a); (i)... | #include <bits/stdc++.h>
#define vll vector<ll>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vpll vector<pair<ll, ll>>
#define pii pair<int, int>
#define REP(i, a) for (int(i) = 0; (i) < (a); (i)++)
#define RREP(i, a) for (int(i) = a - 1; (i) >= (0); (i)--)
#define REP2(i, a, b) for (int(i) = (a); (i)... | [
"expression.operation.binary.add"
] | 969,715 | 969,716 | u997020010 | cpp |
p03164 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_s... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_s... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 969,722 | 969,723 | u110044127 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
int n;
long long W;
const long long INF = 1... | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
int n;
long long W;
const long long INF = 1... | [
"literal.number.change",
"variable_declaration.value.change"
] | 969,730 | 969,731 | u971089878 | cpp |
p03164 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <new>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <new>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 969,740 | 969,741 | u121734488 | cpp |
p03164 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <new>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <new>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | [
"control_flow.loop.for.condition.change",
"expression.operator.compare.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 969,742 | 969,741 | u121734488 | cpp |
p03164 | #include <bits/stdc++.h>
#define inf 1e18
#define N 1e5 + 5
#define ll long long int
using namespace std;
int main(void) {
int n, W, i, j, s = 0;
cin >> n >> W;
int w[n], v[n];
for (i = 0; i < n; i++) {
cin >> w[i] >> v[i];
s += v[i];
}
ll dp[s];
for (i = 0; i < s; i++)
dp[i] = inf;
dp[0] = ... | #include <bits/stdc++.h>
#define inf 1e18
#define N 1e5 + 5
#define ll long long int
using namespace std;
int main(void) {
// en("output.txt","w",stdout);
//#endif
int n, W, i, j, s = 0;
cin >> n >> W;
int w[n], v[n];
for (i = 0; i < n; i++) {
cin >> w[i] >> v[i];
s += v[i];
}
ll dp[s + 1];
fo... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"control_flow.branch.if.condition.change"
] | 969,776 | 969,777 | u416759946 | cpp |
p03164 | #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,... | [
"control_flow.branch.if.condition.change"
] | 969,791 | 969,792 | u154148649 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define prior priority_queue
#define MOD 1000000007
#define INF64 (long long int)1e18
#define INF (int)1e9
#define PI 3.1415926535897932384626433832795
#define ll long long int
#define ld long double
#define ret return
#define NUM ... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define prior priority_queue
#define MOD 1000000007
#define INF64 (long long int)1e18
#define INF (int)1e9
#define PI 3.1415926535897932384626433832795
#define ll long long int
#define ld long double
#define ret return
#define NUM ... | [
"call.remove"
] | 969,803 | 969,804 | u168216888 | cpp |
p03164 | /*
auth - @sportykush
*/
#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 long long int ll;
typedef long double ld;
typedef tree<ll, null_type, less<ll>, rb_tree_tag,
tree_order_statistics_node... | /*
auth - @sportykush
*/
#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 long long int ll;
typedef long double ld;
typedef tree<ll, null_type, less<ll>, rb_tree_tag,
tree_order_statistics_node... | [
"assignment.change"
] | 969,827 | 969,828 | u897990209 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, w;
cin >> n >> w;
vector<vector<ll>> dp(n + 1, vector<ll>((1000 * 100) + 1, 1000000000));
dp[0][0] = 0;
for (int i = 1; i <= n; i++) {
dp[i][0] = 0;
ll weight, value;
cin >> weight >> value;
for (int j = 1; j... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, w;
cin >> n >> w;
vector<vector<ll>> dp(n + 1, vector<ll>((1000 * 100) + 1, 1000000001));
dp[0][0] = 0;
for (int i = 1; i <= n; i++) {
dp[i][0] = 0;
ll weight, value;
cin >> weight >> value;
for (int j = 1; j... | [
"literal.number.change",
"call.arguments.change",
"assignment.value.change"
] | 969,831 | 969,832 | u972556261 | cpp |
p03164 | #include "bits/stdc++.h"
using namespace std;
#define fio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define pb push... | #include "bits/stdc++.h"
using namespace std;
#define fio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define pb push... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 969,839 | 969,840 | u111764401 | cpp |
p03164 | #include "bits/stdc++.h"
using namespace std;
#define F first
#define S second
#define show(x) cout << #x << " " << x << " ";
#define f(i, j, k) for (int i = j; i <= k; i++)
#define fr(i, j, k) for (int i = j; i >= k; i--)
#define ll long long
#define all(A) A.begin(), A.end()
#define FIO ... | #include "bits/stdc++.h"
using namespace std;
#define F first
#define S second
#define show(x) cout << #x << " " << x << " ";
#define f(i, j, k) for (int i = j; i <= k; i++)
#define fr(i, j, k) for (int i = j; i >= k; i--)
#define ll long long
#define all(A) A.begin(), A.end()
#define FIO ... | [
"control_flow.branch.else.remove"
] | 969,845 | 969,846 | u850655153 | cpp |
p03164 | #include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <vector>
#define rep(i, n) for (ll i = 0; i < n; i++)
typedef long long ll;
using namespace std;
const ll MAX = 1000000;
const ll MOD = 1000000007;
ll fac[MAX];
// テーブルを作る前処理
/*
void COMinit() {
fac[0] = fac[1] = 1;
for... | #include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <vector>
#define rep(i, n) for (ll i = 0; i < n; i++)
typedef long long ll;
using namespace std;
const ll MAX = 1000000;
const ll MOD = 1000000007;
ll fac[MAX];
// テーブルを作る前処理
/*
void COMinit() {
fac[0] = fac[1] = 1;
for... | [
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"variable_declaration.type.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 969,849 | 969,850 | u722245896 | cpp |
p03164 | #include <bits/stdc++.h>
typedef long long int ll;
#define pb push_back
#define pp pair<ll, ll>
#define vi vector<ll>
#define vvi vector<vi>
#define vb vector<bool>
#define vvb vector<vb>
using namespace std;
int kp2(vi &profit, vi &wt, ll maxwt, ll maxv) {
int n = profit.size();
vvi dp(n + 1, vi(maxv + 1, INT_MA... | #include <bits/stdc++.h>
typedef long long int ll;
#define pb push_back
#define pp pair<ll, ll>
#define vi vector<ll>
#define vvi vector<vi>
#define vb vector<bool>
#define vvb vector<vb>
using namespace std;
ll kp2(vi &profit, vi &wt, ll maxwt, ll maxv) {
int n = profit.size();
vvi dp(n + 1, vi(maxv + 1, INT_MAX... | [
"variable_declaration.type.change",
"control_flow.loop.for.initializer.change",
"literal.number.change",
"variable_declaration.value.change",
"expression.off_by_one"
] | 969,855 | 969,856 | u704524932 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
const int N = 110;
const int L = N * 1e3 + 10;
int w[N], v[N];
long long dp[N][L];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, W;
cin >> n >> W;
for (int i = 0; i < n; i++)
cin >> w[i] >> v[i];
dp[0][0] = 0;
for (int i = 1; i < L; i++)
dp[... | #include <bits/stdc++.h>
using namespace std;
const int N = 110;
const int L = N * 1e3 + 10;
int w[N], v[N];
long long dp[N][L];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, W;
cin >> n >> W;
for (int i = 1; i <= n; i++)
cin >> w[i] >> v[i];
dp[0][0] = 0;
for (int i = 1; i < L; i++)
dp... | [
"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"
] | 969,863 | 969,864 | u872069739 | cpp |
p03164 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long int lint;
typedef long long int llint;
#define INF 2147000000
#define LINF 9223372036000000000
int n, w;... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long int lint;
typedef long long int llint;
#define INF 1073741824
#define LINF 4611686018000000000
int n, w;
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 969,874 | 969,875 | u104889348 | cpp |
p03164 |
// secreterror
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define forr(i, x, y) for (ll i = x; i < y; i++)
#define f first
#define s second
#define vll vector<ll>
#define vvll vector<vector<ll>>
#defi... |
// secreterror
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define forr(i, x, y) for (ll i = x; i < y; i++)
#define f first
#define s second
#define vll vector<ll>
#define vvll vector<vector<ll>>
#defi... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 969,881 | 969,882 | u878396672 | cpp |
p03164 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9 + 1;
int main() {
int N, W;
cin >> N >> W;
vector<ll> value(N), weight(N);
for (int i = 0; i < N; i++) {
cin >> weight[i] >> value[i];
}
vector<vector<ll>> dp(N + 1, vector<ll>(... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9 + 1;
int main() {
int N, W;
cin >> N >> W;
vector<ll> value(N), weight(N);
for (int i = 0; i < N; i++) {
cin >> weight[i] >> value[i];
}
vector<vector<ll>> dp(N + 1, vector<ll>(... | [
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.for.condition.change"
] | 969,897 | 969,898 | u440276250 | cpp |
p03164 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9 + 1;
int main() {
int N, W;
cin >> N >> W;
vector<ll> value(N), weight(N);
for (int i = 0; i < N; i++) {
cin >> weight[i] >> value[i];
}
vector<vector<ll>> dp(N + 1, vector<ll>(... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9 + 1;
int main() {
int N, W;
cin >> N >> W;
vector<ll> value(N), weight(N);
for (int i = 0; i < N; i++) {
cin >> weight[i] >> value[i];
}
vector<vector<ll>> dp(N + 1, vector<ll>(... | [
"assignment.change"
] | 969,899 | 969,898 | u440276250 | cpp |
p03164 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9 + 1;
int main() {
int N, W;
cin >> N >> W;
vector<ll> value(N), weight(N);
for (int i = 0; i < N; i++) {
cin >> weight[i] >> value[i];
}
vector<vector<ll>> dp(N + 1, vector<ll>(... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int INF = 1e9 + 1;
int main() {
int N, W;
cin >> N >> W;
vector<ll> value(N), weight(N);
for (int i = 0; i < N; i++) {
cin >> weight[i] >> value[i];
}
vector<vector<ll>> dp(N + 1, vector<ll>(... | [
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 969,902 | 969,898 | u440276250 | cpp |
p03164 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using _TYPE = int;
typedef tree<_TYPE, null_type, less<_TYPE>, rb_tree_tag,
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using _TYPE = int;
typedef tree<_TYPE, null_type, less<_TYPE>, rb_tree_tag,
... | [
"literal.number.change",
"function.return_value.change"
] | 969,914 | 969,915 | u933476247 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define IO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
const int maxn =... | #include <bits/stdc++.h>
using namespace std;
#define IO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
const int maxn =... | [] | 969,916 | 969,917 | u933476247 | cpp |
p03164 | #include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
//#include <bits/stdc++.h>
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define rep(... | #include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
//#include <bits/stdc++.h>
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define rep(... | [
"literal.number.change",
"variable_declaration.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 969,920 | 969,921 | u358748139 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | [
"variable_declaration.remove"
] | 969,934 | 969,935 | u041396154 | cpp |
p03164 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, w;
cin >> n >> w;
vector<long long> weight(n), value(n);
for (int i = 0; i < n; i++) {
cin >> weight[i] >> value[i];
}
int sum = 0;
for (auto j : value) {
sum += j;
}
vector<long long> dp(sum + 1, 1000000001);
dp[0]... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, w;
cin >> n >> w;
vector<long long> weight(n), value(n);
for (int i = 0; i < n; i++) {
cin >> weight[i] >> value[i];
}
int sum = 0;
for (auto j : value) {
sum += j;
}
vector<long long> dp(sum + 1, 1000000001);
dp[0]... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 969,946 | 969,947 | u754735988 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll w[n + 1], v[n + 1];
ll profit = 0;
for (ll i = 1; i <= n; i++) {
cin >> w[i] >> v[i];
profit += v[i];
}
ll a[n + 1][profit + 1];
for (ll i = 0; i <= n; i++) {
for (ll j = 0; j <= profit... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll w[n + 1], v[n + 1];
ll profit = 0;
for (ll i = 1; i <= n; i++) {
cin >> w[i] >> v[i];
profit += v[i];
}
ll a[n + 1][profit + 1];
for (ll i = 0; i <= n; i++) {
for (ll j = 0; j <= profit... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 969,948 | 969,949 | u948379857 | cpp |
p03164 | // recurive code hai 0/1 knapsack ka
#include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
#define int long long
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define ip(a, n)... | // recurive code hai 0/1 knapsack ka
#include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
#define int long long
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define ip(a, n)... | [
"call.remove"
] | 969,950 | 969,951 | u948429045 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll N, W, TS = 0;
cin >> N >> W;
ll w[N + 1], v[N + 1];
for (ll i = 1; i <= N; i++) {
cin >> w[i] >> v[i];
TS += v[i];
}
// dp[i]=min weight required to reach value i
vector<ll> V(TS + 1, INT_MAX);
V[0] = 0;
for (l... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll N, W, TS = 0;
cin >> N >> W;
ll w[N + 1], v[N + 1];
for (ll i = 1; i <= N; i++) {
cin >> w[i] >> v[i];
TS += v[i];
}
// dp[i]=min weight required to reach value i
vector<ll> V(TS + 1, INT_MAX);
V[0] = 0;
for (l... | [] | 969,952 | 969,953 | u608574730 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
static const int INF = 1000000000;
int main() {
int N;
int64_t W;
cin >> N >> W;
vector<int64_t> w(N);
vector<int> v(N);
for (int i = 0; i < N; i++) {
cin >> w.at(i);
cin >> v.at(i);
}
vector<vector<int64_t>> dp(1 + N, vector<int64_t>(100001, 0));
... | #include <bits/stdc++.h>
using namespace std;
static const int INF = 100000000000;
int main() {
int N;
int64_t W;
cin >> N >> W;
vector<int64_t> w(N);
vector<int> v(N);
for (int i = 0; i < N; i++) {
cin >> w.at(i);
cin >> v.at(i);
}
vector<vector<int64_t>> dp(1 + N, vector<int64_t>(100001, 0));
... | [
"literal.number.change",
"variable_declaration.value.change"
] | 969,963 | 969,964 | u101018317 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
static const int INF = 1000000000;
int main() {
int N;
int64_t W;
cin >> N >> W;
vector<int64_t> w(N);
vector<int> v(N);
for (int i = 0; i < N; i++) {
cin >> w.at(i);
cin >> v.at(i);
}
vector<vector<int64_t>> dp(1 + N, vector<int64_t>(100001, 0));
... | #include <bits/stdc++.h>
using namespace std;
static const int INF = 100000000000;
int main() {
int N;
int64_t W;
cin >> N >> W;
vector<int64_t> w(N);
vector<int> v(N);
for (int i = 0; i < N; i++) {
cin >> w.at(i);
cin >> v.at(i);
}
vector<vector<int64_t>> dp(1 + N, vector<int64_t>(100001, 0));
... | [
"literal.number.change",
"variable_declaration.value.change"
] | 969,965 | 969,964 | u101018317 | cpp |
p03164 | // #define _CRT_SECURE_NO_WARNINGS
// #define _USE_MATH_DEFINES // M_PI=3.1415...
#include <algorithm>
#include <bitset> // bitset<8> bs1(131uL); // 10000011 bs1[0]は1 01stringからビット集合生成可
#include <cctype>
#include <climits> // A/Bを計算するときA==LLONG_MIN && B==-1のみ(1ull<<63)で代用
#include <cmath>
#include <cstdio>
#include <cs... | // #define _CRT_SECURE_NO_WARNINGS
// #define _USE_MATH_DEFINES // M_PI=3.1415...
#include <algorithm>
#include <bitset> // bitset<8> bs1(131uL); // 10000011 bs1[0]は1 01stringからビット集合生成可
#include <cctype>
#include <climits> // A/Bを計算するときA==LLONG_MIN && B==-1のみ(1ull<<63)で代用
#include <cmath>
#include <cstdio>
#include <cs... | [
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change",
"variable_declaration.value.change"
] | 969,973 | 969,974 | u211964883 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, W;
cin >> n >> W;
vector<int> w(n), v(n);
int value = 0;
for (int i = 0; i < n; i++) {
cin >> w[i] >> v[i];
value += v[i];
}
vector<long long int> dp(value + 1, (LONG_MAX));
dp[0] = 0;
for (int i = 0; i < n; i++) {
for (int... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, W;
cin >> n >> W;
vector<int> w(n), v(n);
int value = 0;
for (int i = 0; i < n; i++) {
cin >> w[i] >> v[i];
value += v[i];
}
vector<long long int> dp(value + 1, (1e18L + 5));
dp[0] = 0;
for (int i = 0; i < n; i++) {
for (in... | [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change"
] | 969,983 | 969,984 | u310097508 | cpp |
p03164 | #include <iomanip>
#include <iostream>
#include <limits>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, W;
cin >> n >> W;
const int maxV = 100;
vector<vector<int>> dp(n + 1, vector<int>(maxV + 1, int(1e9 + 10)));
dp[0][0] = 0;
for (int i = 0; i ... | #include <iomanip>
#include <iostream>
#include <limits>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, W;
cin >> n >> W;
const int maxV = 100001;
vector<vector<int>> dp(n + 1, vector<int>(maxV + 1, int(1e9 + 10)));
dp[0][0] = 0;
for (int i = 0;... | [
"literal.number.change",
"variable_declaration.value.change"
] | 969,989 | 969,990 | u530350853 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define SUM_MAX 100000
#define N_MAX 100
#define W_MAX 1000000000
int dp[SUM_MAX + 1][N_MAX];
bool v[SUM_MAX + 1][N_MAX];
int solveDp(int r, int i, int *w, int *val, int n) {
if (r <= 0)
return 0;
if (i == n)
return W_MAX;
if (v[r][i])
return dp[r][i];
... | #include <bits/stdc++.h>
using namespace std;
#define SUM_MAX 100000
#define N_MAX 105
#define W_MAX 1000000005
int dp[SUM_MAX + 1][N_MAX];
bool v[SUM_MAX + 1][N_MAX];
int solveDp(int r, int i, int *w, int *val, int n) {
if (r <= 0)
return 0;
if (i == n)
return W_MAX;
if (v[r][i])
return dp[r][i];
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 969,993 | 969,994 | u977832306 | cpp |
p03164 | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define mi map<int, int>
#define umi unordered_map<int, int>
#define pii pair<int, int... | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define mi map<int, int>
#define umi unordered_map<int, int>
#define pii pair<int, int... | [
"call.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 969,995 | 969,996 | u959464076 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
ll dp[110][100100];
int main() {
ll n, w;
cin >> n >> w;
vector<ll> weight(n), value(n);
for (ll i = 0; i < n; i++) {
cin >> weight[... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
ll dp[110][100100];
int main() {
ll n, w;
cin >> n >> w;
vector<ll> weight(n), value(n);
for (ll i = 0; i < n; i++) {
cin >> weight[... | [
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 970,011 | 970,012 | u962609087 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define change(a, b) \
if (a < b) \
a = b
int dp[110][100100];
int weight[110], value[110];
signed main() {
int n, w;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define change(a, b) \
if (a > b) \
a = b
int dp[110][100100];
int weight[110], value[110];
signed main() {
int n, w;
... | [
"misc.opposites",
"expression.operator.compare.change",
"preprocessor.define.value.change"
] | 970,013 | 970,014 | u962609087 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define change(a, b) \
if (a < b) \
a = b
int dp[110][100100];
int weight[110], value[110];
signed main() {
int n, w;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define change(a, b) \
if (a > b) \
a = b
int dp[110][100100];
int weight[110], value[110];
signed main() {
int n, w;
... | [
"misc.opposites",
"expression.operator.compare.change",
"preprocessor.define.value.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 970,015 | 970,014 | u962609087 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
if (fopen("input.in", "r")) {
freopen("input.in", "r", stdin);
freopen("output.out", "w", stdout);
}
ll N, W;
cin >> N >> W;
vector<ll> w(N + 1), v(N + 1);
for (ll i = 1... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
if (fopen("input.in", "r")) {
freopen("input.in", "r", stdin);
freopen("output.out", "w", stdout);
}
ll N, W;
cin >> N >> W;
vector<ll> w(N + 1), v(N + 1);
for (ll i = 1... | [
"literal.number.change",
"call.arguments.change",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.remove"
] | 970,029 | 970,030 | u142188850 | cpp |
p03164 | #include <bits/stdc++.h>
#define int long long
#define MAX 10
using namespace std;
// KnapSack
int max_value(int N, int W, int *w, int *v) {
int dp[N + 1][MAX];
for (int i = 0; i <= N; ++i) {
for (int j = 0; j < MAX; ++j) {
if (j == 0) {
dp[i][j] = 0;
continue;
}
if (i == 0) {
... | #include <bits/stdc++.h>
#define int long long
#define MAX 100001
using namespace std;
// KnapSack
int max_value(int N, int W, int *w, int *v) {
int dp[N + 1][MAX];
for (int i = 0; i <= N; ++i) {
for (int j = 0; j < MAX; ++j) {
if (j == 0) {
dp[i][j] = 0;
continue;
}
if (i == 0... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 970,039 | 970,040 | u628489313 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 970,046 | 970,047 | u910199116 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 970,048 | 970,049 | u910199116 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 970,050 | 970,049 | u910199116 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 970,051 | 970,049 | u910199116 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mod 1000000007
#define maxv 1e5 + 1
#define inf 4e18
using namespace std;
int main() {
ll n, W;
cin >> n >> W;
ll val[n + 1], wt[n + 1];
vector<vector<ll>> knap(
n + 1,
vector<ll>(maxv,
inf)); // 2d vector wi... | [
"control_flow.branch.if.replace.add",
"control_flow.branch.else_if.replace.remove"
] | 970,052 | 970,053 | u910199116 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
/* short */
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v), rend(v)
/* REPmacro */
#define FOR(i, a, b) for (int ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
/* short */
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v), rend(v)
/* REPmacro */
#define FOR(i, a, b) for (int ... | [
"expression.operation.binary.remove"
] | 970,054 | 970,055 | u790171360 | cpp |
p03164 | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1000000000LL;
#define all(x) (x).begin(), (x).end()
#define re... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1000000009LL;
#define all(x) (x).begin(), (x).end()
#define re... | [
"literal.number.change",
"variable_declaration.value.change"
] | 970,056 | 970,057 | u062736195 | cpp |
p03164 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= (n); i++)
using namespace std;
const long long INF = 1LL << 60;
const int MAX_N = 110;
const int MAX_V = 100100;
int N;
long long W, w[MAX_N], v[MAX_N];
long long dp[MAX_N][MAX_V];
signed main(void) {
cin >> N >> W;
rep(i, N) cin >> w[i] >> v[i];
f... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= (n); i++)
using namespace std;
const long long INF = 1LL << 60;
const int MAX_N = 110;
const int MAX_V = 100100;
int N;
long long W, w[MAX_N], v[MAX_N];
long long dp[MAX_N][MAX_V];
signed main(void) {
cin >> N >> W;
rep(i, N) cin >> w[i] >> v[i];
f... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 970,058 | 970,059 | u890331732 | cpp |
p03164 | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
int main() {
#define ll long long
ll n, w;
cin >> n >> w;
vector<pair<ll, ll>> v(n);
for (int i = 0; i < n; i++)
cin >> v[i].first >> v[i].second;
vector<ll> dp(100100, 1e18); // dp[i]=min weigth for value i
dp[0] = 0;
for (int i... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
int main() {
#define ll long long
ll n, w;
cin >> n >> w;
vector<pair<ll, ll>> v(n);
for (int i = 0; i < n; i++)
cin >> v[i].first >> v[i].second;
vector<ll> dp(100100, 1e18); // dp[i]=min weigth for value i
dp[0] = 0;
for (int i... | [
"control_flow.branch.if.condition.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"assignment.value.change",
"call.arguments.change"
] | 970,070 | 970,071 | u454826990 | cpp |
p03164 | #include <bits/stdc++.h>
#define ll unsigned long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
long n, c, t;
cin >> n >> c;
vector<long> w;
vector<long> v;
long total_value = 0;
for (int i = 0; i < n; i++) {
cin >> t;
w.push_back(t);
cin >> t;... | #include <bits/stdc++.h>
#define ll unsigned long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
long n, c, t;
cin >> n >> c;
vector<long> w;
vector<long> v;
long total_value = 0;
for (int i = 0; i < n; i++) {
cin >> t;
w.push_back(t);
cin >> t;... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"assignment.change"
] | 970,072 | 970,073 | u320023439 | cpp |
p03164 | /*
Just Constraints are different than the other version
rest logic is similar
Constraints:
1<=n<=100
1<=wt<=10^9
1<=w[i]<=wt
1<=v[i]<=10^3
*/
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, w;
cin >> n >> w;
ll wei[n], val[n];
for (int i = 0; i < n; ++i) {
cin >> wei[i... | /*
Just Constraints are different than the other version
rest logic is similar
Constraints:
1<=n<=100
1<=wt<=10^9
1<=w[i]<=wt
1<=v[i]<=10^3
*/
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, w;
cin >> n >> w;
ll wei[n], val[n];
for (int i = 0; i < n; ++i) {
cin >> wei[i... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 970,093 | 970,094 | u822133553 | cpp |
p03164 | /*
Just Constraints are different than the other version
rest logic is similar
Constraints:
1<=n<=100
1<=wt<=10^9
1<=w[i]<=wt
1<=v[i]<=10^3
*/
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, w;
cin >> n >> w;
ll wei[n], val[n];
for (int i = 0; i < n; ++i) {
cin >> wei[i... | /*
Just Constraints are different than the other version
rest logic is similar
Constraints:
1<=n<=100
1<=wt<=10^9
1<=w[i]<=wt
1<=v[i]<=10^3
*/
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, w;
cin >> n >> w;
ll wei[n], val[n];
for (int i = 0; i < n; ++i) {
cin >> wei[i... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 970,093 | 970,098 | u822133553 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
// cout<<fixed<<setprecision(10);
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inl... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
// cout<<fixed<<setprecision(10);
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inl... | [
"variable_declaration.type.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 970,112 | 970,113 | u989306199 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define mod 1000000007
#define pi 3.141592653589793
typedef vector<ll> vcl;
ll gcd(ll a, ll b) {
if (b > a)
swap(a, b);
if (b == 0)
return a;
return gcd(b, a % b)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define mod 1000000007
#define pi 3.141592653589793
typedef vector<ll> vcl;
ll gcd(ll a, ll b) {
if (b > a)
swap(a, b);
if (b == 0)
return a;
return gcd(b, a % b)... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 970,117 | 970,118 | u613945234 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
// Type alias
using ll = long long;
using ld = double;
using pi = pair<int, int>;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
using ti3 = tuple<int, int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vld = vector<ld>;
using vpi = vector<pi>;
using v... | #include <bits/stdc++.h>
using namespace std;
// Type alias
using ll = long long;
using ld = double;
using pi = pair<int, int>;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
using ti3 = tuple<int, int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vld = vector<ld>;
using vpi = vector<pi>;
using v... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 970,125 | 970,126 | u969945299 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
const int UNCALCULATED = -1;
const int MAXN = 100 + 10, MAXV = 100 * 1000 + 10;
long dp[MAXN][MAXV];
long v[MAXN], w[MAXN];
long calc(int i, int j) {
if (j < 0)
return 1e9;
if (i == 0)
if (j == 0)
return 0;
else
return 1e9;
if (dp[i][j] != UN... | #include <bits/stdc++.h>
using namespace std;
const int UNCALCULATED = -1;
const int MAXN = 100 + 10, MAXV = 100 * 1000 + 10;
long dp[MAXN][MAXV];
long v[MAXN], w[MAXN];
long calc(int i, int j) {
if (j < 0)
return 2e9;
if (i == 0)
if (j == 0)
return 0;
else
return 2e9;
if (dp[i][j] != UN... | [
"literal.number.change",
"function.return_value.change"
] | 970,135 | 970,136 | u337802798 | cpp |
p03164 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, x, n) for (int i = x; i < (n); i++)
#define ALL(n) begin(n), end(n)
using namespace std;
using P = pair<int, int>;
using ll = long long;
ll INF = 100100100100100100;
int main() {
// input
int n;
int w;
cin >> n >> w;
vec... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, x, n) for (int i = x; i < (n); i++)
#define ALL(n) begin(n), end(n)
using namespace std;
using P = pair<int, int>;
using ll = long long;
ll INF = 100100100100100100;
int main() {
// input
int n;
int w;
cin >> n >> w;
vec... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 970,147 | 970,148 | u058958514 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const ll LINF = (ll)1e18;
const int MAX_N = 110;
const int MAX_V = 100100;
int N;
ll W, weight[MAX_N], value[MAX_N];
ll dp[MAX_N][MAX_V];
i... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const ll LINF = (ll)1e18;
const int MAX_N = 110;
const int MAX_V = 100100;
int N;
ll W, weight[MAX_N], value[MAX_N];
ll dp[MAX_N][MAX_V];
i... | [
"assignment.change",
"misc.opposites",
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 970,164 | 970,165 | u607594286 | cpp |
p03164 | #include <algorithm>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(i, a, n) fo... | #include <algorithm>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(i, a, n) fo... | [
"expression.operation.binary.add"
] | 970,170 | 970,171 | u407213771 | cpp |
p03164 | #include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tup... | #include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tup... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 970,194 | 970,195 | u221285045 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll INF = 1e18L + 5;
void solve() {
int n;
int W;
cin >> n >> W;
vector<int> w(n);
vector<int> v(n);
int total_value = 0;
for (int i = 0; i < n; i++) {
cin >> w[i] >> v[i];
total_value += v[i];
}
vector<ll> dp(total_value ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll INF = 1e18L + 5;
void solve() {
int n;
int W;
cin >> n >> W;
vector<int> w(n);
vector<int> v(n);
int total_value = 0;
for (int i = 0; i < n; i++) {
cin >> w[i] >> v[i];
total_value += v[i];
}
vector<ll> dp(total_value ... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 970,200 | 970,201 | u922347667 | cpp |
p03164 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll INF = 1e18L + 5;
void solve() {
ll n, W;
cin >> n >> W;
vector<ll> weight(n), value(n);
int sum_value = 0;
for (int i = 0; i < n; i++) {
cin >> weight[i] >> value[i];
sum_value = value[i];
}
vector<ll> dp(sum_value + 1, ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll INF = 1e18L + 5;
void solve() {
ll n, W;
cin >> n >> W;
vector<ll> weight(n), value(n);
int sum_value = 0;
for (int i = 0; i < n; i++) {
cin >> weight[i] >> value[i];
sum_value += value[i];
}
vector<ll> dp(sum_value + 1,... | [
"assignment.value.change"
] | 970,202 | 970,203 | u922347667 | cpp |
p03164 | #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;
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | #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;
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | [
"literal.number.change",
"control_flow.loop.condition.change",
"control_flow.loop.for.condition.change"
] | 970,208 | 970,209 | u564435024 | cpp |
p03164 | #include "bits/stdc++.h"
using namespace std;
////////////// Prewritten code follows. Look down for solution. ////////////////
#define fs first
#define sc second
#define pb push_back
#define len(x) ((int)(x).size())
#define fastio ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef pair<int, int> pii;
type... | #include "bits/stdc++.h"
using namespace std;
////////////// Prewritten code follows. Look down for solution. ////////////////
#define fs first
#define sc second
#define pb push_back
#define len(x) ((int)(x).size())
#define fastio ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef pair<int, int> pii;
type... | [
"assignment.change"
] | 970,213 | 970,214 | u567661286 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.