結果
問題 | No.1139 Slime Race |
ユーザー |
![]() |
提出日時 | 2020-07-31 21:24:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 640 bytes |
コンパイル時間 | 1,902 ms |
コンパイル使用メモリ | 195,864 KB |
最終ジャッジ日時 | 2025-01-12 08:56:03 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(i,n) RREP(i,n-1,0) #define all(v) v.begin(), v.end() const int inf = 1e9+7; const ll longinf = 1LL<<60; const ll mod = 1e9+7; const ld eps = 1e-10; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; ll d; cin >> n >> d; vector<ll> X(n), V(n); rep(i, n) cin >> X[i]; rep(i, n) cin >> V[i]; ll sum = accumulate(all(V), 0LL); cout << (d+sum-1)/sum << "\n"; return 0; }