結果
問題 |
No.1139 Slime Race
|
ユーザー |
|
提出日時 | 2020-07-31 22:00:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 80 ms / 2,000 ms |
コード長 | 1,801 bytes |
コンパイル時間 | 1,162 ms |
コンパイル使用メモリ | 120,492 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-02 08:22:00 |
合計ジャッジ時間 | 2,844 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <algorithm> #include <bitset> #include <tuple> #include <cstdint> #include <cstdio> #include <cctype> #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <limits> #include <map> #include <memory> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define ArraySizeOf(array) (sizeof(array) / sizeof(array[0])) #define res(i,n) for(int i=n;;i++) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i,n) for(int i=1;i<n;i++) #define rev(i,n) for(int i=n-1;i>=0;i--) #define REV(i,n) for(int i=n-1;i>0;i--) #define req(i,n,m) for(int i=n;i<m;i++) #define REQ(i,n,m,l) for(int i=n;i<m;i+=l) #define _GLIBCXX_DEBUG int INF = 1e9 + 7; unsigned NthDayOfWeekToDay(unsigned n, unsigned dow, unsigned dow1) { unsigned day; if (dow < dow1) dow += 7; day = dow - dow1; day += 7 * n - 6; return day; } signed gcd(int x, int y) { if (y == 0)return x; return gcd(y, x % y); } signed lcm(int x, int y) { return x / gcd(x, y) * y; } unsigned DayToWeekNumber(unsigned day) { return (day - 1) / 7 + 1; } unsigned AnotherDayOfWeek(unsigned day, unsigned day0, unsigned dow0) { return (dow0 + 35 + day - day0) % 7; } using namespace std; int main() { int N, D; cin >> N >> D; vector<int>x(N); vector<int>v(N); rep(i, N)cin >> x[i]; long long ans = 0; rep(i, N) { cin >> v[i]; ans += v[i]; } cout << (D + ans - 1) / ans << endl; }