結果

問題 No.3061 uxs hxixtya pyuyn ixc hyixa kxuyn
ユーザー googol_S0googol_S0
提出日時 2021-03-25 01:18:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 165 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 77,556 KB
最終ジャッジ日時 2023-08-17 22:52:00
合計ジャッジ時間 4,267 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,136 KB
testcase_01 AC 71 ms
71,280 KB
testcase_02 AC 73 ms
71,296 KB
testcase_03 AC 94 ms
76,556 KB
testcase_04 AC 79 ms
76,392 KB
testcase_05 AC 165 ms
77,328 KB
testcase_06 AC 113 ms
77,556 KB
testcase_07 AC 71 ms
71,348 KB
testcase_08 AC 74 ms
71,392 KB
testcase_09 AC 92 ms
76,552 KB
testcase_10 AC 91 ms
76,812 KB
testcase_11 AC 95 ms
76,776 KB
testcase_12 AC 82 ms
76,252 KB
testcase_13 AC 72 ms
71,276 KB
testcase_14 AC 96 ms
76,816 KB
testcase_15 AC 71 ms
71,436 KB
testcase_16 AC 72 ms
71,540 KB
testcase_17 AC 96 ms
77,060 KB
testcase_18 AC 88 ms
76,400 KB
testcase_19 AC 72 ms
71,144 KB
testcase_20 AC 72 ms
71,560 KB
testcase_21 AC 74 ms
71,272 KB
testcase_22 AC 74 ms
71,436 KB
testcase_23 AC 75 ms
76,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

try:
  S=list(input())
except:
  print('NO')
  exit()
N=len(S)
for l in range(N+1):
  for r in range(l+1,N+1):
    if (r-l)==1 and r==N:
      continue
    X=set(S[:l]+S[r:])
    T=S[:]
    for i in range(N):
      if T[i] in X:
        T[i]=' '
    F=1
    for i in range(l,min(r+1,N)):
      if (i-r)&1==0:
        if T[i]!=' ':
          F=0
      else:
        if T[i]==' ':
          F=0
    if F:
      print('Yes')
      exit()
print('NO')
0