結果
| 問題 |
No.268 ラッピング(Easy)
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-08-25 15:22:59 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 213 ms |
| コンパイル使用メモリ | 36,704 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 13:20:54 |
| 合計ジャッジ時間 | 732 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:28: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | int l[3],t[3];scanf("%d%d%d",&l[0],&l[1],&l[2]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d%d%d",&t[0],&t[1],&t[2]);sort(l,l+3);sort(t,t+3);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <algorithm>
using namespace std;
//namaega184
int main(){
int l[3],t[3];scanf("%d%d%d",&l[0],&l[1],&l[2]);
scanf("%d%d%d",&t[0],&t[1],&t[2]);sort(l,l+3);sort(t,t+3);
printf("%d\n",(t[0]*(l[2]+l[1])+t[1]*(l[2]+l[0])+t[2]*(l[0]+l[1]))*2);
return 0;
}
184