結果
問題 | No.1517 Party Location |
ユーザー |
|
提出日時 | 2021-05-29 07:04:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 1,725 ms |
コンパイル使用メモリ | 165,512 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 10:55:31 |
合計ジャッジ時間 | 1,836 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
//ethan_h#include<bits/stdc++.h>using namespace std;#define ll long long/*void test(){int n;cin>>n;string s;cin>>s;vector<int>a(n);for(int i=0;i<n;i++){cin>>a[i];}}*/int main(){ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);int t,a,b;cin>>t>>a>>b;int mi=1000000009;for(int i=0;i<=t;i++){mi=min(mi,i*a + (t-i)*b);}cout<<mi;/*while(t--){test();}*/return 0;}