結果

問題 No.1139 Slime Race
ユーザー nok0
提出日時 2020-07-25 14:20:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 545 bytes
コンパイル時間 1,947 ms
コンパイル使用メモリ 192,720 KB
最終ジャッジ日時 2025-01-12 05:26:16
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,l,r) for(ll i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)
template<class T> T Roundup_div(T x, T y) {return (x+(y-1))/y;}

int main(){
    ll n, d, k; cin >> n >> d;
    assert(n >= 1 and n <= 1e5);
    assert(d >= 1 and d <= 1e9);
    ll sum = 0;
    REP(i, n){
        cin >> k;
        assert(k >= 1 and k <= 1e9);
    }
    REP(i, n){
        ll a; cin >> a;
        assert(a >= 1 and a <= 1e9);
        sum += a;
    }
    cout << Roundup_div(d, sum) << '\n';
}
0