結果
| 問題 |
No.467 隠されていたゲーム
|
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2016-12-24 04:25:07 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,008 bytes |
| コンパイル時間 | 864 ms |
| コンパイル使用メモリ | 85,268 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-14 17:14:22 |
| 合計ジャッジ時間 | 1,783 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 6 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 467.cc: No.467 隠されていたゲーム - yukicoder
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
/* constant */
const int MAX_N = 15;
/* typedef */
/* global variables */
int ds[MAX_N];
/* subroutines */
/* main */
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) cin >> ds[i];
int x, y;
cin >> x >> y;
int maxxy = max(x, y);
bool eqd = false;
int maxd = 0;
for (int i = 0; i < n; i++) {
if (maxxy == ds[i]) eqd = true;
if (maxd < ds[i]) maxd = ds[i];
}
int ans;
if (x == 0 && y == 0) ans = 0;
else if (eqd) ans = 1;
else if (maxxy < maxd) ans = 2;
else ans = (maxxy + maxd - 1) / maxd;
printf("%d\n", ans);
return 0;
}
tnakao0123