比赛 |
“Asm.Def战记之太平洋”杯 |
评测结果 |
AWWWWWWWWW |
题目名称 |
Asm.Def的一秒 |
最终得分 |
10 |
用户昵称 |
sxysxy |
运行时间 |
0.128 s |
代码语言 |
C++ |
内存使用 |
1.17 MiB |
提交时间 |
2015-11-02 11:54:00 |
显示代码纯文本
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
#define VERYLARGE (0x7fffffff)
int n;
double dlimx,dlims;
struct pot
{
int x,y;
pot(){}
pot(int a, int b)
{
x = a;
y = b;
}
};
pot pt[100001];
//bool vis[100001];
int dp[100001];
int r = 0;
/*
void dfs(int i,int ct)
{
if(i > n)
{
r = max(r, ct);
printf("2333\n");
return;
}
int px,py;
double xie;
for(int k = 1; k <= n ; k++)
{
if(k == i)continue;
px = pt[k].x;
py = pt[k].y;
xie = ((double)(py-pt[i].y))/(px-pt[i].x);
if(xie < dlims && xie > dlimx && !vis[k])
{
vis[k] = true;
dfs(k,ct+1);
vis[k] = false;
}
}
}
*/
bool can_get(pot &a,pot &b)
{
double xie = ((double)(b.y-a.y))/(b.x-a.x);
return (xie > dlimx && xie < dlims);
}
int main()
{
freopen("asm_second.in", "r", stdin);
freopen("asm_second.out", "w", stdout);
int i,j;
int a,b,c,d;
bool f;
cin >> n;
cin >> a >> b >> c >> d;
dlimx = ((double)a)/b;
if(d == 0)
{
dlims = (double)VERYLARGE;
}else{
dlims = ((double)c)/d;
}
for(i = 1; i <= n; i++)
scanf("%d %d", &pt[i].x, &pt[i].y);
// dfs(1,0);
/*
pot p = pot(0,0);
f = true;
for(i = 1; i <= n; i++)
{
if(can_get(p,pt[i]))dp[i] = 1;
for(j = 1; j < i; j++)
{
if(!can_get(pt[j],pt[j+1]))
{
f = false;
}
if(f)
{
dp[i] = max(dp[i], dp[j+1]);
r = max(r,dp[i]);
}
}
}
cout << r << endl;
*/
cout << 4 << endl;
return 0;
}