結果

問題 No.467 隠されていたゲーム
ユーザー face4
提出日時 2018-09-04 14:33:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 444 bytes
コンパイル時間 755 ms
コンパイル使用メモリ 74,736 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-13 09:59:53
合計ジャッジ時間 1,498 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

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

    vector<int> d(n);
    for(int i = 0; i < n; i++)  cin >> d[i];
    sort(d.begin(), d.end());

    int x, y;
    cin >> x >> y;

    int m = max(abs(x), abs(y));
    if(*lower_bound(d.begin(), d.end(), m) == m){
        cout << 1 << endl;
    }else{
        cout << max(2, (m+d[n-1]-1)/d[n-1]) << endl;
    }

    return 0;
}
0