摘要:
一道简单的大整数加法题,让我做了整整一晚上,无语~~太马虎了,题目中说每个数长度小于等于100,但和不一定小于100啊,唉~·我就在栽在了这上面~~代码: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #include<iostream> 5 using namespace std; 6 int main() 7 { 8 int t,i,len,k,a[103],b[103],l,tem; 9 char str[103];10 while(scanf(&q 阅读全文
posted @ 2011-12-02 21:08
Misty_1
阅读(259)
评论(0)
推荐(0)
摘要:
这道题的意思是说,输入一数列,如果前面是‘P’,则就该数列各个数的逆序对输出,输入‘I’则将原来的数列输出。第一种情况比较好处理,第二种有点小麻烦。第二种情况要符合下面两个要求:1、先找到a[i]中最小的放在开头;2、i前面要有a[i]个比i大的数;代码: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #include<iostream> 5 using namespace std; 6 int a[102],b[102]; 7 int jude(int x,int 阅读全文
posted @ 2011-12-02 19:28
Misty_1
阅读(286)
评论(0)
推荐(0)

浙公网安备 33010602011771号