結果
| 問題 |
No.944 煎っぞ!
|
| コンテスト | |
| ユーザー |
hitonanode
|
| 提出日時 | 2019-12-07 01:27:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 649 bytes |
| コンパイル時間 | 2,085 ms |
| コンパイル使用メモリ | 173,008 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2024-12-24 06:00:03 |
| 合計ジャッジ時間 | 5,376 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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