Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, s…
一道非常简单的贪心算法,但是要注意输入的价值是单位体积的价值,并不是这个物品的总价值!#include <iostream> #include <stdio.h> #include <algorithm> using namespace std; struct CT{ int pi; int mi; }; int cmp( CT p1 , CT p2 ){ return p1.pi > p2.pi ; } int main() { int sum , V , n…