C. Dima and Salad time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Dima, Inna and Seryozha have gathered in a room. That's right, someone's got to go. To cheer Seryozha up and inspire him to…
01背包变形,注意dp过程的时候就需要取膜,否则会出错. 代码如下: #include<iostream> #include<cstdio> #include<cstring> using namespace std; #define MAXW 15005 #define N 155 #define LL long long #define MOD 1000000007 int w1[N],w2[N]; LL dp1[MAXW],dp2[MAXW]; int main(…
Bone Collector II Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4739 Accepted Submission(s): 2470 Problem Description The title of this problem is familiar,isn't it?yeah,if you had took pa…
题目来源:2019 ACM ICPC Xi'an University of Posts & Telecommunications School Contest 链接:https://www.jisuanke.com/contest/2382?view=challenges Description 众所周知,由于木星引力的影响,世界各地的推进发动机都需要进行重启.现在你接到紧急任务,要去收集火石碎片,重启西邮发动机. 现在火石碎片已成为了稀缺资源,获得火石碎片需要钱或者需要一定的积分.火石碎片有…
传送门 Description Hasan and Bahosain want to buy a new video game, they want to share the expenses. Hasan has a set of N coins and Bahosain has a set of M coins. The video game costs W JDs. Find the number of ways in which they can pay exactly W JDs su…