結果

問題 No.467 隠されていたゲーム
ユーザー pekempey
提出日時 2016-12-17 02:05:08
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 474 bytes
コンパイル時間 1,431 ms
コンパイル使用メモリ 168,208 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 22:34:02
合計ジャッジ時間 2,206 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;

    vector<int> d(n);
    for (int i = 0; i < n; i++) {
        cin >> d[i];
    }

    int x, y;
    cin >> x >> y;
    x = abs(x);
    y = abs(y);

    for (int i = 0; i < n; i++) {
        if (max(x, y) == d[i]) {
            cout << 1 << endl;
            return 0;
        }
    }

    int m = *max_element(d.begin(), d.end());
    cout << max(2, (max(x, y) + m - 1) / m) << endl;
}
0