c语言实习要求做学生信息管理系统,完全没有概念,试着写了一下,都是用结构体,链表不会用,感觉挺烂的。 #include <iostream> #include <cstring> #include…
分类:B树
hdu4355
三分; #include <iostream> #include <stdio.h> #include <math.h> #include <algorithm> usin…
hdu2438
汽车的左边尽量贴着那个直角点,而汽车的右下后方的点尽量贴着最下面的边。 以O点为原点建立直角坐标系,以角a给出P点横坐标的函数F(a) F(a)= l*cos(a)+(d-x*cos(a))/sin(a); 经求导可证是…
n!素因子分解
题目 #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> using…
叉积
1.叉积判断线段拐向 如上图,可以通过计算向量的叉积来判断拐向,即判断(C-B)×(A-B)的符号。 #若(C-B)×(A-B)> 0 ,则CB在B点顺时针得到AB #若(C-B)×(A-B)< 0 ,则CB…
hdu1250 Hat's Fibonacci 高精度
题目(http://acm.hdu.edu.cn/showproblem.php?pid=1250) Problem Description A Fibonacci sequence is calculated by a…
hdu1995汉诺塔V
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1995 Problem Description 用1,2,...,n表示n个盘子,称为1号盘,2号盘,...。号数大盘子就大。…
hdu1996汉诺塔VI
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1996 Problem Description n个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产生2^n个系…
hdu1997汉诺塔VII
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1997 Problem Description n个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产生2^n个系…
hdu2516
斐波那契数列。 #include<iostream> #include<cstdio> using namespace std; int num[50]; void init() { int i;…
hdu1907John尼姆博弈
http://acm.hdu.edu.cn/showproblem.php?pid=1907 Problem Description Little John is playing very funny game with…
sg函数
如果把Nim的规则略加改变,你还能很快找出必胜策略吗?比如说:有n堆石子,每次可以从第1堆石子里取1颗、2颗或3颗,可以从第2堆石子里取奇数颗,可 以从第3堆及以后石子里取任意颗„„这时看上去问题复杂了很多,但相信你如果…