結果
問題 |
No.1808 Fullgold Alchemist
|
ユーザー |
![]() |
提出日時 | 2024-04-02 13:35:51 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 497 bytes |
コンパイル時間 | 2,205 ms |
コンパイル使用メモリ | 195,020 KB |
最終ジャッジ日時 | 2025-02-20 19:38:47 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
#include <bits/stdc++.h> using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } int main() { fast_io(); int n, m; cin >> n >> m; long long ans = 9e18; vector<long long> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i <= n - 2; i++) { a[i + 1] += a[i]; } for (int i = 0; i < n; i++) { ans = min(ans, a[i] / ((long long)(i + 1) * m)); } cout << ans << endl; }