摘要:
简单题,用数学方法做出来的,有更好的方法,有时间研究。下面贴出代码,以作纪念。View Code 1 /*{ 2 ID:jzy3209981 3 PROG:sort3 4 LANG:C++ 5 }*/ 6 #include<stdio.h> 7 #include<iostream> 8 #include<string.h> 9 #include<math.h>10 using namespace std;11 int num[1000];12 int sign[3][2];13 14 int main()15 {16 freopen (" 阅读全文
posted @ 2012-07-20 16:47
醉春雨
阅读(159)
评论(0)
推荐(0)
摘要:
呃 貌似这道题有很好的方法,不过我已经用笨方法一次过了,就没有再多研究了。我的方法就是枚举加排列,用结构体存分子分母和值,遇到可以约分的略过……下面贴出代码,以作纪念。View Code 1 /*{ 2 ID:jzy3209981 3 PROG:frac1 4 LANG:C++ 5 }*/ 6 #include<stdio.h> 7 #include<iostream> 8 #include<string.h> 9 #include<math.h>10 using namespace std;11 12 13 struct fraction14 阅读全文
posted @ 2012-07-20 11:12
醉春雨
阅读(168)
评论(0)
推荐(0)
浙公网安备 33010602011771号