結果
問題 |
No.467 隠されていたゲーム
|
ユーザー |
![]() |
提出日時 | 2017-09-01 00:24:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 1,325 ms |
コンパイル使用メモリ | 159,008 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-06 16:49:24 |
合計ジャッジ時間 | 2,067 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 14 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(void) { ll n,tmp,x,y,flg; ll dmax = 0; ll ans = 0; cin >> n; for (int i=0; i<n; i++) { cin >> tmp; if (dmax < tmp) dmax = tmp; } cin >> x >> y; tmp = max(x,y); ans += (tmp / (dmax * 2)) * 2; flg = tmp % (dmax * 2); if (flg == 0) ans = ans; else if (flg <= dmax) ans++; else ans += 2; cout << ans << endl; return 0; }