- 博客(7)
- 收藏
- 关注
原创 hdu1009
贪心水题,先在nefu上做的,粘到hdu上re,数组应该开大点。#include <iostream>#include <algorithm>#include <stdio.h>using namespace std;struct sa{ int f; int j; double awk;}data[4000];int cmp(const sa &a,const
2015-07-11 22:15:58 307
原创 hdu2438
汽车的左边尽量贴着那个直角点,而汽车的右下后方的点尽量贴着最下面的边。 以O点为原点建立直角坐标系,以角a给出P点横坐标的函数F(a) F(a)= l*cos(a)+(d-x*cos(a))/sin(a); 经求导可证是凸函数,三分查找#include <iostream>#include <stdio.h>#include <math.h>#include <algorithm
2015-07-11 21:59:05 449
原创 hdu4355
三分;#include <iostream>#include <stdio.h>#include <math.h>#include <algorithm>using namespace std;const double eps=1e-5;const int MAX=50010;double p[MAX],w[MAX];int n;double equ(double x){ do
2015-07-11 21:34:36 424
原创 学生信息管理系统
c语言实习要求做学生信息管理系统,完全没有概念,试着写了一下,都是用结构体,链表不会用,感觉挺烂的。#include <iostream>#include <cstring>#include <algorithm>#include <cstdio>using namespace std;struct stu{ int num; char name[100]; ch
2015-07-11 20:56:18 1027
原创 三分搜索
二分所查找的序列是单调的,把区间分为相等的两段,三分所查找的序列是凸型或凹形函数,为了查找函数的最值。hdu 4355#include <iostream>#include <string.h>#include <stdio.h>#include <math.h>#include <algorithm>using namespace std;const double eps=1e-5;c
2015-07-10 10:14:41 361
原创 大数加法
#include<iostream>#include<string>using namespace std;string sum(string s1,string s2){ if(s1.length()<s2.length()) { string temp=s1; s1=s2; s2=temp; }
2015-07-09 16:58:45 297
原创 校内ACM上出现Presentation Error的一点经验
现在很多学校校内都有Online Judge平台(类似ACM平台),通常在电脑上写的程序运行成功后,在Online Judge平台上同样能Accepted。但是有时候,明明电脑上运行的结果正确,但在OJ平台上却会出错,当然,最常见也最纠结的,估计也就是Presentation Error。Presentation Error,和老师讨论了一下修改了代码,得到了关于这个错误的一点新的认识。想到这个问题
2015-07-05 23:37:40 30053 7
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人