摘要: 水题~~~不要去关心题意中为什么10进制38在火星上表示成1110,其实我也不知道,但是这并不影响做题。例如:4,2,0 1,2,0个位0+0=0<2 所以就是02+2>3 所以为1 且进位14+1+1(进位)=6>5 所以就是1结果 1 1 1 0View Code 1 #include<stdio.h> 2 #include<math.h> 3 #include<string.h> 4 #include<stdlib.h> 5 #include<algorithm> 6 using namespace std; 阅读全文
posted @ 2013-02-23 22:51 xxx0624 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 水题~~~注意:若k比a,b大,默认没有的位数上为0!View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 int main(){ 6 int a,b,k; 7 while( scanf("%d%d%d",&a,&b,&k)!=EOF ){ 8 if( a==0&&b==0 ) 9 break;10 char aa[ 24 ],bb[ 24 ];11 mems 阅读全文
posted @ 2013-02-23 21:42 xxx0624 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 题意:s到t的第K短路View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 #include<stdlib.h> 5 #include<algorithm> 6 #include<queue> 7 using namespace std; 8 const int maxn = 1005; 9 const int maxm = 200005; 10 const int inf = 9999999; 11 struct node{ 12 阅读全文
posted @ 2013-02-23 21:07 xxx0624 阅读(737) 评论(0) 推荐(0) 编辑