結果
| 問題 | No.1517 Party Location |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-16 19:25:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 242 bytes |
| 記録 | |
| コンパイル時間 | 491 ms |
| コンパイル使用メモリ | 52,632 KB |
| 最終ジャッジ日時 | 2025-12-10 03:43:16 |
| 合計ジャッジ時間 | 1,202 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:16: error: ‘INT32_MAX’ was not declared in this scope
8 | int minv = INT32_MAX;
| ^~~~~~~~~
main.cpp:2:1: note: ‘INT32_MAX’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
1 | #include <iostream>
+++ |+#include <cstdint>
2 | using namespace std;
ソースコード
#include <iostream>
using namespace std;
int main()
{
int d, a, b;
cin >> d >> a >> b;
int minv = INT32_MAX;
for (int i = 0; i <= d; i++)
{
minv = min(minv, i * a + (d - i) * b);
}
cout << minv << endl;
}