标签:tput cti relative hat -o position padding images algorithm
Time Limit:2s Memory Limit:64MByte
Submissions:594Solved:227
You are the god of cars, standing at (a, b) point.There are some cars at point (xi,yi),
. If lots of cars and you are in one line, you can only see the car that is nearest to yourself. How many cars can you see?
It is guaranteed that xi>a && yi>b;
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <vector> #include <queue> #include <cmath> #include <ctime> #include <map> #include <set> using namespace std; #define lowbit(x) (x&(-x)) #define max(x,y) (x>y?x:y) #define min(x,y) (x<y?x:y) #define MAX 100000000000000000 #define MOD 1000000007 #define pi acos(-1.0) #define ei exp(1) #define PI 3.141592653589793238462 #define INF 0x3f3f3f3f3f #define mem(a) (memset(a,0,sizeof(a))) typedef long long ll; int a,b,n,t,x,y; set<double>s; int main() { scanf("%d",&t); while(t--) { scanf("%d%d%d",&a,&b,&n); for(int i=1;i<=n;i++) { scanf("%d%d",&x,&y); double k=((y-b)*1.0)/((x-a)*1.0); s.insert(k); } printf("%d\n",s.size()); s.clear(); } return 0; }
标签:tput cti relative hat -o position padding images algorithm
原文地址:http://www.cnblogs.com/shinianhuanniyijuhaojiubujian/p/7220362.html