結果
| 問題 | No.1808 Fullgold Alchemist |
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2024-04-02 13:35:51 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 497 bytes |
| 記録 | |
| コンパイル時間 | 1,436 ms |
| コンパイル使用メモリ | 214,692 KB |
| 実行使用メモリ | 11,968 KB |
| 最終ジャッジ日時 | 2026-07-04 09:21:10 |
| 合計ジャッジ時間 | 3,431 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
eve__fuyuki