题目链接:http://acm.hust.edu.cn/vjudge/contest/126708#problem/G 这是一个01背包的模板题 AC代码: #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; ]; struct Node { int xishouliang; int xingfuzhi; } a[]; int main() { int i, j, t…
题目链接:http://acm.hust.edu.cn/vjudge/contest/123674#problem/G 这题和上一道题差不多,还更简单点,直接用prim算法就行,直接贴AC代码: import java.io.BufferedInputStream; import java.util.Scanner; public class Main { final static int N = 1 << 20; static int n, m, a[][] = new int[105][1…
湫湫系列故事——减肥记II Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2176 Accepted Submission(s): 921 Problem Description 虽然制定了减肥食谱,但是湫湫显然克制不住吃货的本能,根本没有按照食谱行动!于是,结果显而易见… 但是没有什么能难倒高智商美女湫湫的,她决定另寻对策——吃…
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other) Total Submission(s) : 1 Accepted Submission(s) : 1 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description 对于吃货来说,过年最幸福的事就是吃了,没有之一! 但是对于女生来说,卡路里(热…