2014年4月7日

codeforces #240 div 2

摘要: A:语文题,估计大家都会,B题:假如答案是ans,求最大的ans,是w*a/b==(w-ans)*a/b;明显的二分,可是我的二分写的没水准,还有是直接做: #include#include#include#include#include#includeusingnamespacestd;intmain(){intn;longlonga,b;;cin>>n>>a>>b;for(inti=1;i>x;longlongw=x*a/b;coutusingnamespacestd;inta[200000];intn,k;intmain(){cin>> 阅读全文

posted @ 2014-04-07 20:59 forgot93 阅读(203) 评论(0) 推荐(0) 编辑

导航