摘要:
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=1406#include using namespace std;int main(){ int n,m,t; while(cin>>n>>m>>t){ int ans=0; bool check=0; for(int i=0;izz){ zz=(t-n*i)/m*m+i*n; ... 阅读全文
摘要:
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=284水题#include #include #include #include #define f first#define s second#define ll long long#define inf 1e17using namespace std;pair p[15];int n,ct;ll dp[15][15];int path[1 阅读全文
摘要:
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=52水题#include #include #include #include #define inf 0x3f3f3f3fusing namespace std;int n,m;int a[15][110];int dp[15][110],fuck[110];int DP(int x,int y){ if(dp[x][y]!=inf) re 阅读全文
摘要:
很水的一道DP#include #include #include using namespace std;int a[1010],l,c,n;int dp[1010],cost[1010];int f(int x){ if(x==0) return 0; else if(x=1;j--){ sum+=a[j]; if(sum>l) break; if(dp[j-1]+11) puts(""); printf("Case %d:\n",cas++); printf(... 阅读全文