結果

問題 No.467 隠されていたゲーム
ユーザー kotamanegikotamanegi
提出日時 2016-12-17 00:26:45
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 896 bytes
コンパイル時間 695 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-08 00:44:01
合計ジャッジ時間 1,645 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 2 ms
5,376 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
5,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 1 ms
5,376 KB
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream> 
#include<map>
#include <iomanip>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
using namespace std;
#define MAX_MOD 1000000007
#define REP(i,n) for(long long i = 0;i < n;++i)
#define LONG_INF 100000000000000
int main() {
	long long n;
	cin >> n;
	vector<long long> d;
	REP(i, n) {
		long long tmp;
		cin >> tmp;
		d.push_back(tmp);
	}
	long long x, y;
	cin >> x >> y;
	if (x > y) swap(x, y);
	long long ans = LONG_INF;
	for (int i = 0;i < n;++i) {
		int tmp = 0;
		if (x % d[i] != 0)tmp++;
		ans = min(ans,(x / d[i])+tmp);
	}
	cout << ans << endl;
	return 0;
}
0