結果

問題 No.467 隠されていたゲーム
ユーザー kzyKT
提出日時 2016-06-04 23:56:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 359 bytes
コンパイル時間 1,237 ms
コンパイル使用メモリ 158,336 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-11 21:19:03
合計ジャッジ時間 2,317 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
  int n,x,y;
  cin >> n;
  int d[n],D=0;
  for(int i=0; i<n; i++) {
    cin >> d[i];
    D=max(D,d[i]);
  }
  cin >> x >> y;
  x=max(x,y);
  for(int i=0; i<n; i++) {
    if(d[i]==x) {
      cout << 1 << endl;
      return 0;
    }
  }
  cout << (!x?0:(int)ceil(fabs(x-D)/D)+1) << endl;
  return 0;
}
0