結果
問題 |
No.1139 Slime Race
|
ユーザー |
![]() |
提出日時 | 2020-07-25 14:23:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 92 ms / 2,000 ms |
コード長 | 563 bytes |
コンパイル時間 | 2,097 ms |
コンパイル使用メモリ | 198,188 KB |
最終ジャッジ日時 | 2025-01-12 05:26:34 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#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; cin >> n >> d; ll sum = 0; vector<int> x(n); REP(i, n) cin >> x[i]; vector<int> y = x; sort(y.begin(),y.end()); assert(x == y); REP(i, n - 1) assert(y[i] != y[i+1]); REP(i, n){ ll a; cin >> a; assert(a >= 1 and a <= 1e9); sum += a; } cout << Roundup_div(d, sum) << '\n'; }