結果

問題 No.268 ラッピング(Easy)
ユーザー cureskol
提出日時 2020-04-19 01:01:21
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 324 bytes
コンパイル時間 1,745 ms
コンパイル使用メモリ 175,608 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-04 00:37:02
合計ジャッジ時間 2,472 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


signed main(){
    vector<int> v(3),w(3),u(3);
    for(int i=0;i<3;i++)cin>>v[i];
    for(int i=0;i<3;i++)u[i]=(v[i]+v[(i+1)%3])*2;
    sort(u.begin(),u.end());
    for(int i=0;i<3;i++)cin>>w[i];
    sort(w.rbegin(),w.rend());
    cout<<u[0]*w[0]+u[1]*w[1]+u[2]*w[2]<<endl;
}
0