結果
| 問題 |
No.1808 Fullgold Alchemist
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-25 02:10:13 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 326 bytes |
| コンパイル時間 | 1,890 ms |
| コンパイル使用メモリ | 195,600 KB |
| 最終ジャッジ日時 | 2025-02-07 14:40:18 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
long long N,M;
cin>>N>>M;
vector<long long>A(N);
for(auto &i:A)cin>>i;
for(int i=1;i<N;i++)A[i]+=A[i-1];
long long ans=1e9;
for(int i=0;i<N;i++){
ans=min(ans,A[i]/((i+1)*M));
}
cout<<ans<<'\n';
}