问有多少个点在多边形内 求一遍叉积 小于零计数就好了~ #include<stdio.h> #include<iostream> #include<algorithm> #include<math.h> #include<string.h> #include<string> #include<map> #include<set> #include<vector> #include<queue&…
D - Bicycle Race Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 659D Description Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repea…
题目链接 对相邻的三个点叉积判断一下就好. #include <iostream> #include <vector> #include <cstdio> #include <cstring> #include <algorithm> #include <complex> #include <cmath> #include <map> #include <set> #include <stri…
题目链接: http://codeforces.com/contest/659/problem/D 题意: 若干条直线围城的湖,给定直线的端点,判断多少个转点会有危险?(危险是指直走的的话会掉进水里) 分析: 观察法:减去竖直水平的四条边,剩下的每两条边的交点就是答案. 求叉积:看两个向量夹角,如果夹角小于90度,则直走的话会掉进水里. 代码: #include<cstdio> #define sa(m) scanf("%d",&m) int main (void)…
题目链接: D. Bicycle Race time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repeating its contou…
D. Bicycle Race 题目链接http://codeforces.com/contest/659/problem/D Description Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repeating its contour. As you know, the lake shore consists only of straigh…
http://codeforces.com/contest/659/problem/D     Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repeating its contour. As you know, the lake shore consists only of straight sections, directed to the…
D. Bicycle Race 题目连接: http://www.codeforces.com/contest/659/problem/D Description Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repeating its contour. As you know, the lake shore consists only of s…
Description Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repeating its contour. As you know, the lake shore consists only of straight sections, directed to the north, south, east or west. Let's in…
ShitáliaTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=88994#problem/A Description After suddenly becoming a billionaire, Shi adopted YOLO as his motto and decided to buy a small european island, wh…