結果

問題 No.467 隠されていたゲーム
ユーザー nanophoto12nanophoto12
提出日時 2017-01-03 00:35:03
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,006 bytes
コンパイル時間 758 ms
コンパイル使用メモリ 96,676 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-22 09:36:33
合計ジャッジ時間 2,104 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <queue>
#include <iostream>
#include <string.h>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdint>
#include <climits>
#include <unordered_set>
#include <sstream>

using namespace std;

#define ll long long int
#define pll pair<double,ll>

vector<vector<ll>> dp;

int main()
{
    ll n;
    cin >> n;
    vector<ll> d(n);
    for(int i = 0;i < n;i++)
    {
        cin >> d[i];
    }
    ll x,y;
    cin >> x >> y;
    ll upper = max(x,y);
    sort(d.begin(), d.end());
    for(int i = 0;i < d.size();i++)
    {
        if(upper == d[i])
        {
            cout << 1 << endl;
            return 0;
        }
    }
    if(upper < d.front())
    {
        cout << 2 << endl;
        return 0;
    }
    ll div = upper / d.back();
    ll mod = upper % d.back();
    if(mod > 0)
    {
        cout << div + 1 << endl;
        return 0;
    }
    cout << div << endl;
    return 0;
}
0