結果
| 問題 |
No.1823 Tricolor Dango
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-29 21:21:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 97 ms / 2,000 ms |
| コード長 | 567 bytes |
| コンパイル時間 | 1,252 ms |
| コンパイル使用メモリ | 82,768 KB |
| 実行使用メモリ | 102,292 KB |
| 最終ジャッジ日時 | 2025-01-02 17:26:57 |
| 合計ジャッジ時間 | 4,310 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
from sys import stdin
import heapq
def inputSynario():
input = stdin.readline
num_list = []
T = int(input().rstrip())
for i in range(T * 2):
num_list.append(list(map(int, input().rstrip().split())))
return num_list
synario = inputSynario()
for synarioId in range(len(synario)//2):
N=synario[synarioId * 2]
A=synario[synarioId * 2 + 1]
dangoCountSum = sum(A)
if(dangoCountSum % 3 == 0):
kushiCount = dangoCountSum // 3
if(max(A) <= kushiCount):
print("Yes")
continue
print("No")