HDU
浙右华亭
这个作者很懒,什么都没留下…
展开
-
[HDU-1213]How Many Tables
#include #include #include #include #include #include #include #include #include using namespace std; const int maxn = 1000 + 10; int parent[maxn]; int ans; int GetParent(int a) { if( parent[a原创 2017-09-29 16:01:49 · 175 阅读 · 0 评论 -
[HDU-3038] How Many Answers Are Wrong
#include #include #include #include using namespace std; const int maxn = 200000 + 20; int parent[maxn]; int sum[maxn]; int dis; int GetParent(int a) { if( a != parent[a] ) { int t原创 2017-11-07 10:39:47 · 233 阅读 · 0 评论 -
[HDU-1024]Max Sum Plus Plus
#include #include #include using namespace std; const int maxn = 1000000 + 10; const int INF = 0X7fffffff; int S[maxn]; int dp[maxn][2]; int main() { int m, n; while( scanf("%d%d", &m, &n)!=原创 2017-11-21 23:39:50 · 167 阅读 · 0 评论 -
[HDU-1069]Monkey and Banana
#include #include #include #include using namespace std; const int maxn = 30*6 + 20; struct Node { int x, y, z; }; Node S[maxn]; int dp[maxn]; bool cmp( Node a, Node b ) { if( a.x<b.x ) {原创 2017-12-05 16:27:33 · 212 阅读 · 0 评论 -
[HDU-1114]Piggy-Bank
完全背包 #include #include #include #include using namespace std; const int maxn = 10000 + 22; const int inf = 0x3f3f3f3f; int p[maxn], w[maxn]; int dp[maxn]; int main() { int T; cin >> T; whil原创 2017-12-18 16:37:52 · 206 阅读 · 0 评论