結果
| 問題 |
No.467 隠されていたゲーム
|
| コンテスト | |
| ユーザー |
sugarrr
|
| 提出日時 | 2018-07-22 23:03:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,097 bytes |
| コンパイル時間 | 800 ms |
| コンパイル使用メモリ | 80,640 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 05:26:20 |
| 合計ジャッジ時間 | 1,726 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
#include<set>
#include<map>
#include<bitset>
using namespace std;
typedef long long ll;
#define i_7 1000000007
#define i_5 1000000005
ll mod(ll a){
ll c=a%i_7;
if(c>=0)return c;
else return c+i_7;
}
typedef pair<int,int> i_i;
typedef pair<ll,ll> l_l;
ll inf=1000000000000;/*10^12*/
#define rep(i,l,r) for(ll i=l;i<=r;i++)
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
//////////////////////////////////////
int main(){
int n;cin>>n;
ll d[n];rep(i,0,n-1)cin>>d[i];
ll x,y;cin>>x>>y;
x=abs(x);y=abs(y);
x=max(x,y);
if(x==0){
cout<<0<<endl;return 0;
}
sort(d,d+n);
rep(i,0,n-1){
if(x==d[i]){
cout<<1<<endl;
return 0;
}
}
ll dmax=d[n-1];
if(x<=dmax*2){
cout<<2<<endl;
return 0;
}
cout<<(x+dmax-1)/dmax<<endl;
return 0;
}
sugarrr