結果
| 問題 |
No.467 隠されていたゲーム
|
| コンテスト | |
| ユーザー |
__NCAstar
|
| 提出日時 | 2016-12-17 23:12:38 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 607 bytes |
| コンパイル時間 | 843 ms |
| コンパイル使用メモリ | 63,988 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-14 04:34:43 |
| 合計ジャッジ時間 | 1,950 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 1 |
ソースコード
#include<iostream>
#include<cmath>
#include<algorithm>
#include<climits>
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
using namespace std;
typedef long long ll;
#define MAX 30
int n;
ll d[MAX];
ll x,y;
void compute() {
x = llabs(x), y = llabs(y);
sort(d,d+n);
if( max(x,y) < d[n-1] ) {
rep(i,n) {
if( max(x,y) == d[i] ) {
cout << 1 << endl;
return;
}
}
cout << 2 << endl;
} else {
ll ans = ceil( max(x,y) / (double)d[n-1] );
cout << ans << endl;
}
}
int main() {
cin >> n;
rep(i,n) cin >> d[i];
cin >> x >> y;
compute();
}
__NCAstar