0w1

Convex Hull

Yuki 96 圏外です。( Union Find, Bucket, Furthest Pair, Convex Hull )

No.96 圏外です。 - yukicoder題意: 兩個人各拿著一台無線電要通話,無線電之間最遠可通話距離為 1 km,基地台之間則是 10 km,無線電與基地台之間則是 1 km。在兩人可通話的前提下求最大可能的歐幾里德距離。資料規模: 基地台數量 0≤N≤120000 基地台座標 …

Math Vector Template

Haven't yet tested well, might have some bugs. #include <bits/stdc++.h> using namespace std; const double EPS = 1e-10; const double PI = acos( -1.0 ); int dcmp(double x){ if( fabs( x ) < EPS ) return 0; return x < 0 ? -1 : 1; } struct Vector{ double x, y</bits/stdc++.h>…

UVA 11626 Convex Hull ( 凸包模板 )

UVa Online Judge 不太懂告訴我們一個點是否在凸包上到底有何意義。。嘛反正也是無恥水過去。注意座標會過大要用ll。 #include <bits/stdc++.h> using namespace std; const int MAXN = 1e5 + 5; typedef long long ll; struct Vector{ int x, y; Vector(){} Vector(int _x,</bits/stdc++.h>…

UVA 681 Convex Hull Finding ( 凸包模板 )

UVa Online Judge 沒有變化的單純求凸包。比較特別的要求是起點要印兩次,且必須是 y值最小的,若有多個相同則 x值最小的。這部分很容易解決,將點排序的時候照他要求排就行了。 碎念:以為每次後面都要吐出 -1,沒想到是測資與測資之間啊。。。 #include <bits/stdc++.h> u</bits/stdc++.h>…