結果
| 問題 | No.944 煎っぞ! |
| コンテスト | |
| ユーザー |
👑 hitonanode
|
| 提出日時 | 2019-12-07 01:27:25 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 649 bytes |
| 記録 | |
| コンパイル時間 | 1,008 ms |
| コンパイル使用メモリ | 186,628 KB |
| 実行使用メモリ | 9,900 KB |
| 最終ジャッジ日時 | 2026-10-07 02:43:28 |
| 合計ジャッジ時間 | 4,587 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
#define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++)
#define REP(i, n) FOR(i,0,n)
int main()
{
int N;
cin >> N;
int t = 0;
unordered_set<int> s;
while (N--)
{
int a;
cin >> a;
t += a;
s.insert(t);
}
int ret = 1;
FOR(i, 2, t) if (t % i == 0)
{
bool f = true;
FOR(j, 1, i + 1) if (!s.count(t / i * j)) f = false;
if (f) ret = i;
}
cout << ret << endl;
}
hitonanode