結果
問題 | No.268 ラッピング(Easy) |
ユーザー |
|
提出日時 | 2018-06-18 16:06:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 500 ms |
コンパイル使用メモリ | 65,008 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 16:56:10 |
合計ジャッジ時間 | 1,262 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream>using namespace std;int main(int argc, char* argv[]){int L1,L2,L3;int R,B,Y;cin>>L1>>L2>>L3;cin>>R>>B>>Y;int rb=2*(R+B);int ry=2*(R+Y);int by=2*(B+Y);int MaxL=max(L1,max(L2,L3));int MinL=min(L1,min(L2,L3));int MidL=L1+L2+L3-MaxL-MinL;int MaxRBY=max(rb,max(ry,by));int MinRBY=min(rb,min(ry,by));int MidRBY=rb+ry+by-MaxRBY-MinRBY;cout<<MinRBY*MaxL+MaxRBY*MinL+MidRBY*MidL<<endl;return 0;}