摘要:
都是基础知识!http://acm.hdu.edu.cn/showproblem.php?pid=2057看了一位dn的解释,借鉴了:http://hi.baidu.com/gminking/blog/item/691ee158d213754dfbf2c016.html/cmtid/881e0f308ee322345bb5f5a4题目求的是十六进制的加法。刚开始想的是把十六进制转化为十进制,进行加法运算后,再转化为十六进制。后来发现自己忘了C中存在十六进制的输入输出(%X,%x)。所以这题可以直接用十六进制输入,然后进行十六进制的运算(其实不管是什么进制,在计算机中都是以二进制来计算的,只是按 阅读全文
posted @ 2011-05-13 21:05
聊聊IT那些事
阅读(1213)
评论(0)
推荐(0)
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=3790View Code #include<iostream>#define M 1001#define Max 0x7fffffffusing namespace std;int n,m;int a,b,d,p;int s,t;int map[M][M];int cost[M][M];int de[M];int co[M];int visit[M];int len;int _min;void Init(){ int i,j; for(i=0;i<=n;i++) { for(j=0;j< 阅读全文
posted @ 2011-05-13 19:46
聊聊IT那些事
阅读(667)
评论(0)
推荐(0)

浙公网安备 33010602011771号