题目要去掉一些的a[i],b[i]对,使得sigma(a[i])/sigma(b[i])最大,设100*sigma(a[i])/sigma(b[i])=r 最大,则100*sigma(a[i])-sigma(b[i])*r=0时r最大。因为这个式子是单调的,所以二分枚举答案,sigma(100*ai-mid*bi)==0时就为答案View Code #include<cstdio>#include<cstring>#include<cmath>#include<algorithm>using namespace std;struct node{ Read More
posted @ 2012-04-12 16:07
Because Of You
Views(331)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号