結果
問題 |
No.1517 Party Location
|
ユーザー |
![]() |
提出日時 | 2021-08-15 16:39:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 435 bytes |
コンパイル時間 | 1,492 ms |
コンパイル使用メモリ | 166,096 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-07 20:14:16 |
合計ジャッジ時間 | 2,209 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 8 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n, o) for(int i = 0;i < (n);i++) #define ou(x) cout << x << endl #define ll long long #define re return 0 int main(){ int d, a, b; ll ans = 100010100010; cin >> d; cin >> a >> b; rep(i, d, 0){ if(a == 0 || b == 0){ ou(0); re; } ll t = i * a + (d - i) * b; ans = min(ans, t); } ou(ans); re; }