- 博客(4)
- 收藏
- 关注
原创 hdu1787
水题,直接欧拉数模板。 #include #include __int64 ea(__int64 n) { __int64 sum=n,a; for(a=2;a<=sqrt(n+0.5);a++) { if(n%a==0) { sum=sum*(a-1)/a; while(n%a==0)
2013-01-21 15:13:48 656
原创 hdu1007最小点对
讲解网上都有。 代码: #include #include #include #include #define maxn 100002 struct ss { double x; double y; }; ss px[maxn],py[maxn]; bool cmpx(ss p1,ss p2) { return p1.x<p2.x; } bool cmpy(ss p
2013-01-19 19:11:21 529
原创 hdu2108判断多边形是否为凸多边形
矢量的叉积,来判断拐向。 代码如下: #include #include #include using namespace std; struct coordinate { double x; double y; }; int cross(coordinate p1,coordinate p2,coordinate p3) { if((p2.x-p1.x)*(p3.y-
2013-01-19 19:02:50 1952
原创 c++课程设计
#ifndef STUDENT_H #define STUDENT_H class Person //人员数据信息类 { protected: string name; //姓名 string phone; //电话 string address;//地址 string email; //邮箱 }; class Node:public Pers
2013-01-04 13:28:24 578
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人