摘要: 题目 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 double G[110][110], sum; 9 const double pi = acos(-1); 10 const int INF = (1= pi+pi) 21 dlng -= (pi+pi); 22 if(dlng > pi) 23 dlng = pi+pi-dlng; 24 lat1 *= pi/180; 25 ... 阅读全文
posted @ 2014-04-11 21:20 水门 阅读(228) 评论(0) 推荐(0) 编辑
摘要: next_permutation功能: 求一个排序的下一个排列的函数,可以遍历全排列,要包含头文件 与之完全相反的函数还有prev_permutation这个博客介绍的比较好自己写了一个用法的样例: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() 7 { 8 char s[100]; 9 int len, cnt;10 while(cin>>s)11 {12 len = strlen(s);13 cnt = 0;14 ... 阅读全文
posted @ 2014-04-11 20:57 水门 阅读(205) 评论(0) 推荐(0) 编辑