Vasya and Public Transport
2013-10-14 19:42
183 查看
http://codeforces.com/contest/355/problem/B
// File Name: cf_b.cpp // Author: bo_jwolf // Created Time: 2013年10月14日 星期一 19:37:15 #include<vector> #include<list> #include<map> #include<set> #include<deque> #include<stack> #include<bitset> #include<algorithm> #include<functional> #include<numeric> #include<utility> #include<sstream> #include<iostream> #include<iomanip> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<ctime> using namespace std; int main(){ int n, m, c1, c2, c3, c4, temp, sum_bus = 0, sum_troll = 0; cin >> c1 >> c2 >> c3 >> c4; cin >> n >> m; for( int i = 0; i < n; ++i ){ cin >> temp; sum_bus += min( c2, c1 * temp ); } for( int i = 0; i < m; ++i ){ cin >> temp; sum_troll += min( c2, c1 * temp ); } printf( "%d\n", min( c4, min( c3, sum_bus ) + min( c3, sum_troll ) ) ); return 0; }
相关文章推荐
- B. Vasya and Public Transport
- codeforces B. Vasya and Public Transport 解题报告
- Codeforces Round #206 (Div. 2) B. Vasya and Public Transport
- B. Vasya and Public Transport
- Codeforces_355B_Vasya and Public Transport(贪心)
- cf B. Vasya and Public Transport
- ZCMU-1309-Vasya and Public Transport
- 如何让OpenSSL得到JKS格式的keystore中的public and private key
- A. Vasya and the Bus
- The public key and the private key
- Codeforces Round #281 (Div. 2) C. Vasya and Basketball 排序
- A. Vasya and Football
- JAVA "Public", "Protected", "Private" and "Friendly"的区别--笔记
- Java public private and protected
- Telephone and Network, transport on one Cat-5 cable.
- public,private and protected
- A Vasya and Football
- [文章摘要]iVizTRANS: Interactive visual learning for home and work place detection from massive public t
- B. Vasya and Wrestling