結果
| 問題 | No.2386 Udon Coupon (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-21 22:42:39 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 307 bytes |
| 記録 | |
| コンパイル時間 | 1,079 ms |
| コンパイル使用メモリ | 179,668 KB |
| 実行使用メモリ | 9,728 KB |
| 最終ジャッジ日時 | 2026-04-10 05:40:43 |
| 合計ジャッジ時間 | 4,972 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 TLE * 1 -- * 32 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
ll n;
cin>>n;
ll a,b,c;
cin>>a>>b>>c;
ll ans=0;
for(ll z=0;z<=n/10;z++){
for(ll y=0;5*y+10*z<=n;y++){
for(ll x=0;3*x+5*y+10*z<=n;x++){
ans=max(ans,a*x+b*y+c*z);
}
}
}
cout<<ans<<endl;
}