結果

問題 No.1139 Slime Race
ユーザー yutasyutas
提出日時 2020-07-31 21:24:42
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 833 bytes
コンパイル時間 1,387 ms
コンパイル使用メモリ 164,160 KB
実行使用メモリ 5,076 KB
最終ジャッジ日時 2023-09-15 02:46:08
合計ジャッジ時間 3,332 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 54 ms
4,888 KB
testcase_11 AC 47 ms
5,052 KB
testcase_12 AC 67 ms
4,952 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 54 ms
4,940 KB
testcase_15 AC 61 ms
4,756 KB
testcase_16 AC 66 ms
4,880 KB
testcase_17 AC 55 ms
4,856 KB
testcase_18 AC 45 ms
4,568 KB
testcase_19 AC 30 ms
4,380 KB
testcase_20 AC 29 ms
4,380 KB
testcase_21 AC 42 ms
4,760 KB
testcase_22 AC 54 ms
4,896 KB
testcase_23 AC 75 ms
5,076 KB
testcase_24 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<int, ll> Pil;
typedef pair<ll, ll> Pll;
typedef pair<ll, int> Pli;

#define fi first
#define se second

const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;
const ll MOD3 = 1812447359;
const ll INF = 1ll << 62;
const double PI = 2 * asin(1);

void yes() {printf("yes\n");}
void no() {printf("no\n");}
void Yes() {printf("Yes\n");}
void No() {printf("No\n");}
void YES() {printf("YES\n");}
void NO() {printf("NO\n");}

int N;
ll D, X[int(1e5+5)], V[int(1e5+5)];

int main(){
  cin >> N >> D;
  for (int i = 0; i < N; i++) cin >> X[i];
  ll sum = 0;
  for (int i = 0; i < N; i++){
    cin >> V[i]; sum += V[i];
  }

  ll ans = D / sum;
  if (D % sum != 0) ans++;
  cout << ans << endl;

  return 0;
}
0