結果

問題 No.1139 Slime Race
ユーザー NNMochiNNMochi
提出日時 2020-07-31 21:23:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 1,079 bytes
コンパイル時間 1,503 ms
コンパイル使用メモリ 165,984 KB
実行使用メモリ 4,688 KB
最終ジャッジ日時 2023-09-15 02:45:03
合計ジャッジ時間 3,061 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 20 ms
4,688 KB
testcase_11 AC 19 ms
4,668 KB
testcase_12 AC 23 ms
4,624 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 20 ms
4,556 KB
testcase_15 AC 21 ms
4,384 KB
testcase_16 AC 23 ms
4,564 KB
testcase_17 AC 21 ms
4,560 KB
testcase_18 AC 16 ms
4,392 KB
testcase_19 AC 12 ms
4,376 KB
testcase_20 AC 11 ms
4,376 KB
testcase_21 AC 16 ms
4,384 KB
testcase_22 AC 20 ms
4,664 KB
testcase_23 AC 26 ms
4,568 KB
testcase_24 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
#define pb push_back
using namespace std;
using ll=long long;
using ld=long double;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
struct edge{ll to,cost;};
struct edge2{ll from,to,cost;};

template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll N,D;
    cin >> N >> D;
    vl X(N),V(N);
    ll res=0;
    rep(i,N){
        cin >> X[i];
    }
    rep(i,N){
        cin >> V[i];
        res+=V[i];
    }
    cout << (D+res-1)/res << endl;
}
0