結果

問題 No.3234 Infinite Propagation
ユーザー moon17
提出日時 2025-08-15 22:13:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 359 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 82,632 KB
実行使用メモリ 90,564 KB
最終ジャッジ日時 2025-08-15 22:14:04
合計ジャッジ時間 2,851 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())
for _ in range(t):
  n=int(input())
  xy=[input().split()for _ in range(n)]
  ok=0
  bmin=1<<60
  bmax=0
  for x,y in xy:
    if'a'==x:
      if'a'in y:
        ok=1
        break
      bmax=max(bmax,len(y))
      continue
    if'a'in y and'a'not in x:
      bmin=min(bmin,len(x))
  if ok or bmin<=bmax:
    print('Yes')
  else:
    print('No')
0