結果
問題 |
No.467 隠されていたゲーム
|
ユーザー |
|
提出日時 | 2023-02-06 04:36:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 607 bytes |
コンパイル時間 | 1,732 ms |
コンパイル使用メモリ | 172,096 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-04 12:05:57 |
合計ジャッジ時間 | 2,794 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<ll> d(n); for(auto &v:d) cin >> v; ll x, y, d2; cin >> x >> y; d2 = max(x, y); if(d2 == 0){ cout << 0 << '\n'; return 0; } for(int i = 0; i < n; i++){ if(d2 == d[i]){ cout << 1 << '\n'; return 0; } } sort(d.begin(), d.end()); if(d2 < d[0]){ cout << 2 << '\n'; return 0; } cout << (d2 + d.back() - 1) / d.back() << '\n'; }