結果
| 問題 |
No.1823 Tricolor Dango
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-24 21:42:36 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 520 bytes |
| コンパイル時間 | 956 ms |
| コンパイル使用メモリ | 89,464 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-02 00:44:07 |
| 合計ジャッジ時間 | 3,467 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 24 |
ソースコード
#include <iostream>
#include <vector>
#include <numeric>
int main() {
int T;
std::cin >> T;
for (int t = 0; t < T; t++) {
int N;
std::cin >> N;
std::vector<int> A(N);
for (int i = 0; i < N; i++) {
std::cin >> A[i];
}
int S = std::accumulate(A.begin(), A.end(), 0);
bool isOK = (S % 3 == 0);
for (int a : A) {
isOK &= (a <= S / 3);
}
std::cout << (isOK ? "Yes" : "No") << std::endl;
}
return 0;
}