Container With Most Water问题:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn suc...
分类:
其他好文 时间:
2015-03-08 19:58:18
阅读次数:
123
给定两直线,判定相交,重合,或求出交点
验模板的题目
代码:
#include
#include
#include
#include
using namespace std;
struct Point {
double x, y;
Point() {}
Point(double x, double y) {
this->x = x;...
分类:
其他好文 时间:
2015-03-05 12:57:23
阅读次数:
123
??
Sometimes you just have to color outside the lines. For example, at a job site, an architect might scribble a few notes on the building’s
blueprints to communicate a subtle detail to the c...
分类:
其他好文 时间:
2015-03-05 08:05:02
阅读次数:
243
本题就是判断直线之间的关系,我的思想就是先判断是否共线,然后判断是否平行,剩下的肯定相交,直接求交点就可以了。在判断平行的时候只要看两者的斜率是否相等就可以了,因为在判断平行之前已经判断是否共线,所以只要斜率相等,肯定就是平行了。求交点的时候就是用的数学方法,注意斜率不存在的情况就可以了。
#include
#include
#include
#include
using namespace s...
分类:
其他好文 时间:
2015-03-03 22:14:41
阅读次数:
210
题目大意
A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N. No two places have the same number. The lines a...
分类:
Web程序 时间:
2015-02-24 09:10:29
阅读次数:
159
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such tha...
分类:
其他好文 时间:
2015-02-23 16:38:13
阅读次数:
141
问题及代码:
Problem Description
There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).
Input
Input consists of a sequence of lines, each containing an intege...
分类:
其他好文 时间:
2015-02-16 14:21:25
阅读次数:
297
Cat stands for concatenate.Case 1.When the text files have more blank lines, we want to remove them.We can use regex \s+ '\n'.cat file.txt | tr \s '\n...
分类:
系统相关 时间:
2015-02-15 21:51:16
阅读次数:
185
1.Start-All Programs - 2.execute below lines on that ‘Developer Command Prompt..’ tool makecert -n "CN=vMargeCA" -r -sv vMargeCA.pvk vMargeC...
分类:
Web程序 时间:
2015-02-10 18:40:31
阅读次数:
248
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2015-02-10 15:06:30
阅读次数:
146