- 博客(5)
- 收藏
- 关注
原创 浮点数的比较
const double eps =1e-8; #define Equ(a,b) (fabs((a)-(b))<(eps)) #define More(a,b) ((a)-(b)>(eps)) #define Less(a,b) ((a)-(b)<(-eps))
2017-02-25 14:28:46 327
原创 算法之路四:codeforces 71A
#include<cstdio> #include<iostream> #include<cstring> using namespace std;const int maxn=105; int main() { int n; cin>>n; while(n--) { char word[maxn]; scanf("%s",word);
2017-02-11 15:03:24 594
转载 算法之路二:刘汝佳算法竞赛入门经典:链表 悲剧文本UVa11988
#include<cstdio> #include<cstring> using namespace std; const int maxn=100005; int last,cur,next[maxn]; char s[maxn];int main() { while(scanf("%s",s+1)==1) { int n=strlen(s+1);
2017-02-09 17:54:43 667
转载 算法之路二:刘汝佳算法竞赛入门经典:栈和队列 矩阵链乘UVA442
#include<cstdio> #include<stack> #include<iostream> #include<cstring> using namespace std;struct Matrix{ int a,b; Matrix(int a=0,int b=0):a(a),b(b) {} }m[26];stack<Matrix>s;int main() { int
2017-02-09 17:42:58 425
转载 算法之路二:刘汝佳算法竞赛入门经典:栈和队列 铁轨UVa514
#include<cstdio> #include<stack> using namespace std; const int maxn=1010;int n,target[maxn];int main() { while(scanf("%d",&n)==1) { stack<int>s; int A=1,B=1; for(int i=
2017-02-09 17:26:29 1152
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人