結果
| 問題 | 
                            No.467 隠されていたゲーム
                             | 
                    
| コンテスト | |
| ユーザー | 
                             teketeke5000
                         | 
                    
| 提出日時 | 2017-09-01 00:21:25 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 464 bytes | 
| コンパイル時間 | 1,949 ms | 
| コンパイル使用メモリ | 158,884 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-06 16:49:21 | 
| 合計ジャッジ時間 | 2,314 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 14 WA * 10 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
    ll n,tmp,x,y,flg;
    ll dmax = 0;
    ll ans = 0;
    cin >> n;
    for (int i=0; i<n; i++) {
        cin >> tmp;
        if (dmax < tmp) dmax = tmp;
    }
    cin >> x >> y;
    tmp = max(x,y);
    ans += tmp / dmax - 1;
    flg  = tmp % dmax + dmax;
    if (flg == 0) ans = ans;
    else if(flg == dmax) ans++;
    else ans += 2;
    cout << ans << endl;
    return 0;
}
            
            
            
        
            
teketeke5000