1121: [POI2008]激光发射器SZK

Time Limit: 10 Sec  Memory Limit: 162 MB
Submit: 916  Solved: 759
[Submit][Status][Discuss]

Description

多边形相邻边垂直,边长为整数,边平行坐标轴。要在多边形的点上放一些激光发射器和接收器。满足下列要求: 1发射器和接收器不能放置在同一点; 2发射器发出激光可以沿壁反射,最终到达一个接收器; 3发射器只能沿角平分线发射激光。求:最多可放置多少对发射器和接收器?点数4<=n<=100000

Input

第一行给出一个数字N,代表有多少个点. 下面N行,用来描述点的坐标.其值在[-1000000,1000000]

Output

最多可放置多少对发射器和接收器

Sample Input

10
1 1
3 1
3 -2
-3 -2
-3 0
-1 0
-1 -1
2 -1
2 0
1 0

Sample Output

5

HINT

感谢YYD大牛贡献译文.

 

题解:因为根据光路的可逆性,从A射到B,必然有从B射到A,所以不可能有两个点同时射到同一个点,因为这样从这个点射出去就有两条路线了。

所以答案必定是n/2.

#include<iostream>
#include<cstdio>
using namespace std;
int n;
int main()
{
scanf("%d",&n);
printf("%d",n>>);
return ;
}

bzoj1121[POI2008]激光发射器SZK(结论)的更多相关文章

  1. BZOJ1121:[POI2008]激光发射器SZK(乱搞)

    Description 多边形相邻边垂直,边长为整数,边平行坐标轴.要在多边形的点上放一些激光发射器和接收器.满足下列要求: 1发射器和接收器不能放置在同一点: 2发射器发出激光可以沿壁反射,最终到达 ...

  2. bzoj1121: [POI2008]激光发射器SZK

    #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #i ...

  3. BZOJ 1121: [POI2008]激光发射器SZK

    1121: [POI2008]激光发射器SZK Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 792  Solved: 653[Submit][Sta ...

  4. 【BZOJ-1121】激光发射器SZK 物理 + 数学 + 乱搞

    1121: [POI2008]激光发射器SZK Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 682  Solved: 565[Submit][Sta ...

  5. 1121: [POI2008]激光发射器SZK

    1121: [POI2008]激光发射器SZK Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 574  Solved: 475[Submit][Sta ...

  6. bzoj 1121: [POI2008]激光发射器SZK 思维_结论

    Description 多边形相邻边垂直,边长为整数,边平行坐标轴.要在多边形的点上放一些激光发射器和接收器.满足下列要求: 1发射器和接收器不能放置在同一点: 2发射器发出激光可以沿壁反射,最终到达 ...

  7. [POI2008]激光发射器SZK

    Description 多边形相邻边垂直,边长为整数,边平行坐标轴.要在多边形的点上放一些激光发射器和接收器.满足下列要求: 1发射器和接收器不能放置在同一点: 2发射器发出激光可以沿壁反射,最终到达 ...

  8. BZOJ 1121 & science

    1121: [POI2008]激光发射器SZK Time Limit: 10 Sec Memory Limit: 162 MB Submit: 647 Solved: 537 [Submit][Sta ...

  9. [原博客] POI系列(1)

    正规.严谨.精妙. -POI 发现POI(波兰信息学奥赛)的题都很有意思.于是开刷bzoj上的poi题目(按ac人数降序..).顺手写一写题解,加深印象. 为了防止一篇文章过于长,打算每五道题另起一篇 ...

随机推荐

  1. 10 Minutes to pandas中文版

    本文是对pandas官方网站上<10 Minutes to pandas>的一个简单的翻译,原文在这里.这篇文章是对pandas的一个简单的介绍,详细的介绍请参考:Cookbook .习惯 ...

  2. redis+php+mysql处理高并发实例

    一.实验环境ubuntu.php.apache或nginx.mysql二.利用Redis锁解决高并发问题,需求现在有一个接口可能会出现并发量比较大的情况,这个接口使用php写的,做的功能是接收 用户的 ...

  3. mesh topology for airfoil, wing, blade, turbo

    ref Ch. 5, Anderson, CFD the basics with applications numerical grid generation foundations and appl ...

  4. 洛谷 4172 [WC2006]水管局长

    [题解] 我们把操作倒过来做,就变成了加边而不是删边.于是用LCT维护动态加边的最小生成树就好了.同样要注意把边权变为点权. #include<cstdio> #include<al ...

  5. PAT 1133 Splitting A Linked List

    Given a singly linked list, you are supposed to rearrange its elements so that all the negative valu ...

  6. 将网络图片转换为base64

    public static function htmlPdf() { $img_path = Env::get('ROOT_PATH').'/public/images/wechat/user.jpg ...

  7. Tensorflow Eager execution and interface

    Lecture note 4: Eager execution and interface Eager execution Eager execution is (1) a NumPy-like li ...

  8. 【BZOJ1014】火星人prefix(splay,Hash)

    题意: . 思路: ; ..,..]of longint; sum,size,fa,a,b,id,mi:..]of longint; n,m,i,x,y,s,k,j,cnt,root:longint; ...

  9. T1683 车厢重组 codevs

    http://codevs.cn/problem/1683/  时间限制: 1 s  空间限制: 1000 KB  题目等级 : 白银 Silver 题目描述 Description 在一个旧式的火车 ...

  10. codevs——2645 Spore

    2645 Spore  时间限制: 1 s  空间限制: 32000 KB  题目等级 : 钻石 Diamond 题解       题目描述 Description 某陈和某Y 最近对一个游戏着迷.那 ...