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

每个发射器都安置在多边形的点上. 

不难想到每个发射的光线一定会最终射向另一个点而截止. 

发射出的每条光线也只能射到一个点上,答案即为点数/2

Code:

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n; 
    cin>>n; 
    cout<<(n>>1); 
    return 0; 
}

  

猜你喜欢

转载自www.cnblogs.com/guangheli/p/10903688.html