摘要: http://acm.jlu.edu.cn/joj/showproblem.php?pid=1005判断一个数是否能用连续的四个数的和构成解:这个数一定是偶数,并且除以2之后的商是奇数#include <stdio.h>int main(){ #ifndef ONLINE_JUDGE freopen("tdata.txt","r",stdin); #endif int n; while... 阅读全文
posted @ 2010-09-02 13:58 菜到不得鸟 阅读(80) 评论(0) 推荐(0) 编辑
摘要: http://acm.jlu.edu.cn/joj/showproblem.php?pid=1424#include <stdio.h>#include <string.h>const int coins[6]={0,1,5,10,25,50};int f[7500];inline void CompletePack(int w,int total){ for(int j ... 阅读全文
posted @ 2010-09-02 13:40 菜到不得鸟 阅读(138) 评论(0) 推荐(0) 编辑
摘要: http://acm.tju.edu.cn/toj/showp3214.html#include <stdio.h>#include <string.h>#include <stdlib.h>#include <algorithm>using namespace std;#define MAXN 205#define INF 999999struct... 阅读全文
posted @ 2010-09-02 11:36 菜到不得鸟 阅读(148) 评论(0) 推荐(0) 编辑
摘要: "Do not spend all your time on training or studying - this way you will probably become very exhausted and unwilling to compete more. Whatever you do - have fun. Once you find programming is no fun an... 阅读全文
posted @ 2010-09-02 10:41 菜到不得鸟 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 和hdu1599 find the mincost route 差不多#include <stdio.h>#define MAXN 105#define INF 999999int idx,ans,N,M,g[MAXN][MAXN],dist[MAXN][MAXN],post[MAXN][MAXN],path[MAXN];void init(){ int i,j,len; ans=IN... 阅读全文
posted @ 2010-09-02 01:38 菜到不得鸟 阅读(244) 评论(0) 推荐(0) 编辑