#include
#include
#include
using namespace std;
const double eps=1e-8;
const double PI=acos(-1.0);
struct Circle{
double x,y,r;
Circle(){}
Circle(double xx,double yy){x=xx;y=yy;}
};
struct...
分类:
其他好文 时间:
2015-03-28 14:27:03
阅读次数:
148
1) #define是预处理指令,在编译预处理时进行简单的替换,不作正确性检查,不关含义是否正确照样带入,仅仅有在编译已被展开的源程序时才会发现可能的错误并报错。比如: #define PI 3.1415926 程序中的:area=PI*r*r 会替换为3.1415926*r*r 假设你把#defi...
分类:
其他好文 时间:
2015-03-28 11:24:31
阅读次数:
108
所谓的局域网(Local Area Network,LAN),用于将有限范围内(例如一个实验室、一层办公楼或者校园)的各种计算机、终端与外部设备互联成网。一般情况下: 10人以下,规模比较小的公司一般对网络应用需求较低,由于人数少,基本也不存在划分VLAN(虚拟局域网)的需求,所以,选择一个多...
分类:
其他好文 时间:
2015-03-27 23:46:42
阅读次数:
301
这题就海伦公式带进去就可以了。。
要注意的是,这题的样例,是输入n次错误的输入才停止。。,输入的可能是负数。
代码:
#include
#include
#include
#include
using namespace std;
const double eps = 1e-8;
int t;
double Ha, Hb, Hc;
int dcmp(double x) {
...
分类:
其他好文 时间:
2015-03-27 22:17:09
阅读次数:
149
Go中使用*号表示指针,但是没有指针算数,不能对其进行加减。同时内存管理都由Go来负责,不需要拖动释放内存。Go中的函数接收者,可以为值类型,也可以是引用类型。看代码:package main import ("fmt") type Rect struct {X, Y,Area,Length flo...
分类:
其他好文 时间:
2015-03-20 23:25:34
阅读次数:
187
MVC开发中几种以AOP方式实现的Filters是非常好用的,默认情况下,我们通过App_Start中的FilterConfig来实现的过滤器注册是全局的,也就是整个应用程序都会使用的,针对单独的Filter我们不得不去单独的Controller或者Action去定义如图:那么问题来了,我现在想在F...
分类:
Web程序 时间:
2015-03-19 13:04:46
阅读次数:
191
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:
其他好文 时间:
2015-03-18 01:08:26
阅读次数:
196
OSPF对接两方,对设置的要求,哪些参数必须相同(HELLO &dead interval, area ID, authentation, 末节区域(option中的E位), network mask) 末梢区域中E位为0,此位不相同,不能建立邻接关系Hello interval 和 hello t...
分类:
其他好文 时间:
2015-03-17 23:31:46
阅读次数:
272
1. Overview / What is Socket CAN--------------------------------The socketcan package is an implementation of CAN protocols (Controller Area Network) ...
分类:
系统相关 时间:
2015-03-17 19:45:21
阅读次数:
494
Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules...
分类:
其他好文 时间:
2015-03-17 17:37:40
阅读次数:
110