結果
問題 |
No.920 あかあお
|
ユーザー |
|
提出日時 | 2019-11-08 23:40:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 466 ms |
コンパイル使用メモリ | 30,848 KB |
最終ジャッジ日時 | 2025-01-08 03:16:26 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:4:23: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | int x, y, z; scanf("%d%d%d", &x, &y, &z); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <utility> int main(void){ int x, y, z; scanf("%d%d%d", &x, &y, &z); if(x > y) std::swap(x, y); int res = x; y -= x; int d = y > z ? z : y; res += d; y -= d; z -= d; res += (z / 2); printf("%d\n", res); return 0; }