結果
| 問題 |
No.944 煎っぞ!
|
| コンテスト | |
| ユーザー |
iqueue02
|
| 提出日時 | 2019-12-07 00:32:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 1,633 ms |
| コンパイル使用メモリ | 167,380 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 04:47:32 |
| 合計ジャッジ時間 | 3,315 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int,int> P;
int main(){
int n;
cin >> n;
vector<int> cum(n+1,0);
rep(i,n) {
int a;
cin >> a;
cum[i+1] = cum[i] + a;
}
int res = 0;
for (int i = 1; i <= n; i++) {
int x = cum[i];
int y = cum[n] - cum[i];
if (y % x != 0) continue;
res = max(res, y / x + 1);
}
cout << res << endl;
return 0;
}
iqueue02