結果

問題 No.467 隠されていたゲーム
ユーザー t98slidert98slider
提出日時 2023-02-06 04:36:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 607 bytes
コンパイル時間 2,237 ms
コンパイル使用メモリ 170,408 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-17 17:26:29
合計ジャッジ時間 3,565 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,388 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,384 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<ll> d(n);
    for(auto &v:d) cin >> v;
    ll x, y, d2;
    cin >> x >> y;
    d2 = max(x, y);
    if(d2 == 0){
        cout << 0 << '\n';
        return 0;
    }
    for(int i = 0; i < n; i++){
        if(d2 == d[i]){
            cout << 1 << '\n';
            return 0;
        }
    }
    sort(d.begin(), d.end());
    if(d2 < d[0]){
        cout << 2 << '\n';
        return 0;
    }
    cout << (d2 + d.back() - 1) / d.back() << '\n';
}
0