結果
| 問題 | 
                            No.268 ラッピング(Easy)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-02-18 11:52:21 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 685 bytes | 
| コンパイル時間 | 1,517 ms | 
| コンパイル使用メモリ | 168,840 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-24 12:41:40 | 
| 合計ジャッジ時間 | 2,115 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
ソースコード
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for(int i = (n) - 1; (i) >= 0; --i)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD LL(1e9 + 7)
#define INF 1000000
using namespace std;
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PI;
int main() {
	int l[3];
	cin >> l[0] >> l[1] >> l[2];
	int c[3];
	cin >> c[0] >> c[1] >> c[2];
	int nl[3] = {};
	nl[0] = 2 * (l[0] + l[1]);
	nl[1] = 2 * (l[1] + l[2]);
	nl[2] = 2 * (l[2] + l[0]);
	sort(nl, nl + 3);
	sort(c, c + 3);
	int ans = nl[0] * c[2] + nl[1] * c[1] + nl[2] * c[0];
	cout << ans << endl;
	return 0;
}