結果
問題 | No.467 隠されていたゲーム |
ユーザー |
![]() |
提出日時 | 2016-12-17 02:20:04 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 927 bytes |
コンパイル時間 | 683 ms |
コンパイル使用メモリ | 93,480 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 22:34:09 |
合計ジャッジ時間 | 1,431 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 WA * 1 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS#include<sstream>#include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>#include<climits>#include<cmath>#include<string>#include<vector>#include<set>#include<map>#include<queue>#include<numeric>#include<functional>#include<algorithm>#include<bitset>#include<tuple>#include<unordered_set>#include<random>using namespace std;#define INF (1<<29)#define rep(i,n) for(int i=0;i<(int)(n);i++)#define all(v) v.begin(),v.end()#define uniq(v) v.erase(unique(all(v)),v.end())int main() {ios::sync_with_stdio(0);cin.tie(0);int n;int d[15];int x, y;cin >> n;rep(i, n)cin >> d[i];cin >> x >> y;x = abs(x);y = abs(y);rep(i,n) {if (max(x,y)==d[i]) {cout << 1 << endl;return 0;}}int md = *max_element(d, d + n);if (max(x,y) < md) {cout << 2 << endl;}else {cout << (max(x, y) + md - 1) / md << endl;}return 0;}