結果

問題 No.8061 uxs hxixtya pyuyn ixc hyixa kxuyn
ユーザー chocorusk
提出日時 2020-04-01 22:59:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 887 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-27 12:25:40
合計ジャッジ時間 1,520 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 5
other WA * 17 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
n=len(s)
for i in range(n):
    if ord(s[i])>=ord("a") and ord(s[i])<=ord("z"):
        continue
    if s[i]==' ' or s[i]==' ':
        continue
    assert False
exit()
if n==1:
    print("NO")
    exit()
ok=0
for i in range(n-1):
    for j in range(i, n):
        if (j-i)%2==1:
            continue
        b=0
        dame=0
        for k in range(i, j+1):
            if (k-i)%2==0:
                if s[k]==' ':
                    dame=1
                    break
                b|=(1<<(ord(s[k])-ord("a")))
        if dame==1:
            continue
        for k in range(n):
            if (k-i)%2==0 and k>=i and k<=j:
                continue
            if s[k]==' ':
                continue
            if b&(1<<(ord(s[k])-ord("a"))):
                dame=1
                break
        if dame==0:
            ok=1
if ok:
    print("Yes")
else:
    print("NO")
0