如果同学们执意要水的话...

P2771 [USACO16JAN] Build Gates S

不如要求输出方案喽,或者多组数据也行,能骗数据本来就是一个漏洞
by 一UNowen一 @ 2016-04-07 19:37:34


廖同学6欧
by 石室学子 @ 2016-04-07 20:11:01


@[url=/space/show?uid=6128]一UNowen一[/url] 马上就有抽签二,就是求那个,那些人水不了
by Ghost_lzy @ 2016-04-07 20:12:03


tesy
by kkksc03 @ 2016-04-11 16:50:40


#inclu #hwle # dsdsds
by kkksc03 @ 2016-04-19 17:22:01


```cpp #include sasa ``` ```cpp #include<iostream> #include<algorithm> using namespace std; int n,m,ans,i,t; int main() { ios::sync_with_stdio(false); cin.tie(0); cin>>n>>m; pair<int,int> a[m]; for(;i<m;i++)cin>>a[i].first>>a[i].second; sort(a,a+m); for(i=0;n>0;i++)t=min(n,a[i].second),n-=t,ans+=t*a[i].first; cout<<ans; return 0; } ```
by kkksc03 @ 2016-04-19 17:22:40


2771不是我出的题目 “建门” 吗@Ghost\_lzy
by 1124828077ccj @ 2016-04-30 20:24:19


@Ghost\_lzy
by 1124828077ccj @ 2016-04-30 20:26:45


@Ghost\_lzy
by 1124828077ccj @ 2016-05-10 18:48:45


@[Ghost\_lzy](/space/show?uid=14410) 2771不是我出的题目 “建门” 吗
by 1124828077ccj @ 2016-06-30 18:37:39


| 下一页