摘要: 模拟,开始时以为要注意去重,当输出时,判断与前一个是否重复,后来发现没这必要,如果重复了,那后边那组肯定不是互质的analysis里给出了“super fast solution"的方法,类似杨辉三角,想起了高中时的阿炳老师--两个肩上数之和~~ 1 /* ID:linyvxi1 2 PROB:frac1 3 LANG:C++ 4 */ 5 #include <stdio.h> 6 #include <algorithm> 7 using namespace std; 8 typedef struct Frac{ 9 int up;10 int down;11 阅读全文
posted @ 2012-02-16 16:53 linyvxiang 阅读(194) 评论(0) 推荐(0) 编辑