結果
| 問題 | No.3234 Infinite Propagation |
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-08-16 00:55:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 91,408 KB |
| 最終ジャッジ日時 | 2025-08-16 00:55:50 |
| 合計ジャッジ時間 | 2,639 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 RE * 5 |
ソースコード
T=int(input())
for _ in range(T):
n=int(input())
p=[]
for i in range(n):
x,y=input().split()
p+=[(x,y)]
if all(x!="a" for x,y in p):
print("No")
continue
if any("a" in y for x,y in p if x=="a"):
print("Yes")
continue
b=max(len(y) for x,y in p if x=="a")
if b>=min(len(x) for x,y in p if "a" not in x):
print("Yes")
continue
print("No")
sasa8uyauya