Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ynng committed Mar 2, 2021
1 parent 9bd6ede commit a3b9663
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 35 deletions.
1 change: 1 addition & 0 deletions CCC/.cph/.test.cpp_35c30dd4653f810cea87a6ad765d6bc4.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"Local: test","url":"f:\\GitHub\\Practice\\CCC\\test.cpp","tests":[{"id":1614657924163,"input":"1000 10","output":""}],"interactive":false,"memoryLimit":1024,"timeLimit":3000,"srcPath":"f:\\GitHub\\Practice\\CCC\\test.cpp","group":"local","local":true}
61 changes: 26 additions & 35 deletions CCC/test.cpp
Original file line number Diff line number Diff line change
@@ -1,39 +1,30 @@
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;

#define INF 0x3f3f3f3f // for int
#define LL_INF 0x3f3f3f3f3f3f3f3f // for ll
#define sz(x) (int)(x).size()
#define ms(x, y) memset(x, y, sizeof(x))
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define ins insert

const int MOD = 1000000007, MX = 10000 + 5;

int variables;
#include <iostream>
using namespace std;
int dp[17][500000];
int val[17];
int n;
int v;
int main()
{
for (int i = 0; i < 500000; i++)
{
cout << dp[0][i] << endl;
}

cin >> n >> v;
dp[0][0] = 1;
for (int i = 0; i < n; i++)
{
cin >> val[i];
}
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= v; j++)
{
dp[i][j] = dp[i - 1][j] + dp[i - 1][j - val[i]];
cout << dp[i][j] << " ";
}
}
cout << dp[n][v];
return 0;

printf("Hello World");
}
Binary file added b.exe
Binary file not shown.

0 comments on commit a3b9663

Please sign in to comment.