
计算几何
幽殇默
他时若遂凌云志,敢笑黄巢不丈夫。
展开
-
B. Han Solo and Lazer Gun【1400 / 计算几何】
https://codeforces.com/problemset/problem/514/B 就是求每个点和我们的点的斜率,求有多少个不同的斜率即可。 #include<bits/stdc++.h> using namespace std; typedef pair<int,int> PII; map<PII,int>mp; int n,x,y,a,b; int gcd(int a,int b) {return b?gcd(b,a%b):a;} int main(vo.原创 2021-11-09 20:06:57 · 93 阅读 · 0 评论 -
Kanade Doesn‘t Want to Learn CG【ccpc网络赛 计算机几何 未完成】
http://acm.hdu.edu.cn/showproblem.php?pid=7127 #include<bits/stdc++.h> using namespace std; #define int long long signed main() { int T; cin>>T; while(T--) { int a,b,c; cin>>a>>b>>c; int x.原创 2021-10-28 22:19:05 · 213 阅读 · 0 评论 -
B. Water Lily【1000 / 计算几何】
https://codeforces.com/problemset/problem/1199/B #include<bits/stdc++.h> using namespace std; int main(void) { double h,l; cin>>h>>l; printf("%.13lf",(l*l-h*h)/2/h); return 0; }原创 2021-10-28 09:29:50 · 98 阅读 · 0 评论