枚举直线,计算斜率,排序,统计答案. #include<cstdio> #include<cmath> #include<algorithm> using namespace std; #define EPS 0.00000001 #define INF 99999999999999999999.0 #define N 201 typedef double db; int n,m,sta,ans; db xs[N],ys[N],line[N*N]; int main()…
P2665 [USACO08FEB]连线游戏Game of Lines 题目背景 Farmer John最近发明了一个游戏,来考验自命不凡的贝茜. 题目描述 Farmer John has challenged Bessie to the following game: FJ has a board with dots marked at N (2 ≤ N ≤ 200) distinct lattice points. Dot i has the integer coordinates Xi a…
题目背景 Farmer John最近发明了一个游戏,来考验自命不凡的贝茜. 题目描述 Farmer John has challenged Bessie to the following game: FJ has a board with dots marked at N ( ≤ N ≤ ) distinct lattice points. Dot i has the integer coordinates Xi and Yi (-, ≤ Xi ≤ ,; -, ≤ Yi ≤ ,). Bessie…
求LIS , 然后用 n 减去即为answer ---------------------------------------------------------------------------- #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #define rep( i , n ) for( int i = 0 ; i < n ; ++i…