結果

問題 No.268 ラッピング(Easy)
ユーザー newlife171128newlife171128
提出日時 2018-01-28 20:27:07
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 818 bytes
コンパイル時間 1,293 ms
コンパイル使用メモリ 151,696 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-28 14:36:50
合計ジャッジ時間 2,175 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <stdio.h>
#include <map>
#include <string.h>
#include <utility>

typedef long long ll;
using namespace std;

typedef pair<int, int> P;



int main() {

	int a,b,c;

	int red,blue,yellow;

	cin>>a>>b>>c>>red>>blue>>yellow;

	vector<int> around;

	around.push_back(2*a+2*b);
	around.push_back(2*a+2*c);
	around.push_back(2*b+2*c);

	sort(around.begin(),around.end());

	vector<int> rby;
	rby.push_back(red);
	rby.push_back(blue);
	rby.push_back(yellow);

	sort(rby.begin(),rby.end(),greater<int>());

	int ans=0;
	for(int i=0; i<3;i++){
		ans = ans+ around[i]*rby[i];
	}

	cout<<ans<<endl;
	return 0;
}
0