Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:这怎么会错呢!大神给点解释In Reply To:这怎么会错呢!大神给点解释 Posted by:eagledoit at 2014-06-13 20:33:40 > #include <iostream> > #include <cstdio> > > using namespace std; > typedef long long ll; > > struct MM > { > ll x; > ll y; > }s[50050]; > > int main() > { > int _; > ll sum=0; > cin>>_; > for(int i=0;i<_;i++) > { > scanf("%lld %lld",&s[i].x,&s[i].y); > sum+=s[i].x; > } > ll ans=sum; > for(int i=0;i<_;i++) > { > ans=min(ans,sum-s[i].x-s[i].y); > } > cout<<ans<<endl; > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator