結果
| 問題 | No.268 ラッピング(Easy) |
| コンテスト | |
| ユーザー |
nopperi
|
| 提出日時 | 2015-09-09 08:47:22 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 516 bytes |
| コンパイル時間 | 596 ms |
| コンパイル使用メモリ | 64,952 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 05:01:50 |
| 合計ジャッジ時間 | 1,065 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void) {
vector<int> l;
vector<int> color;
for (int i = 0; i < 3; i++) {
int n;
cin >> n;
l.push_back(n);
}
for (int i = 0; i < 3; i++) {
int n;
cin >> n;
color.push_back(n);
}
sort(l.begin(), l.end());
sort(color.begin(), color.end());
cout << (l[0]+l[1])*2*color[2] + (l[0]+l[2])*2*color[1] + (l[1]+l[2])*2*color[0] << endl;
return 0;
}
nopperi