每个发射器都安置在多边形的点上.
不难想到每个发射的光线一定会最终射向另一个点而截止.
发射出的每条光线也只能射到一个点上,答案即为点数/2
Code:
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; cout<<(n>>1); return 0; }
每个发射器都安置在多边形的点上.
不难想到每个发射的光线一定会最终射向另一个点而截止.
发射出的每条光线也只能射到一个点上,答案即为点数/2
Code:
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; cout<<(n>>1); return 0; }