摘要: 1 #include 2 #include 3 using namespace std; 4 #define max(a,b) ((a)>(b) ? (a) : (b)) 5 #define abs(a) ((a)>0 ? (a) : (-a)) 6 int foo(int x, int y) 7... 阅读全文
posted @ 2014-07-28 16:05 george_cw 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 有两个相同的数组A,B,所含元素相同,但顺序不同,只能取得A数组某值和B数组某值进行比较,比较结果为大于,小于或等于,但是不能取得同一组数组A或B中的两个数进行比较,也不能取得某数组中的某个值。写一个算法实现正确匹配(即A数组中某值与B数组中某值等值)一、用循环二、建立一个结构数组c{某数B数组位置... 阅读全文
posted @ 2014-07-28 12:29 george_cw 阅读(697) 评论(0) 推荐(0) 编辑