結果

問題 No.3061 uxs hxixtya pyuyn ixc hyixa kxuyn
ユーザー chocoruskchocorusk
提出日時 2020-04-01 21:44:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 646 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,948 KB
実行使用メモリ 7,960 KB
最終ジャッジ日時 2023-09-09 17:33:52
合計ジャッジ時間 1,974 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
7,832 KB
testcase_02 AC 16 ms
7,828 KB
testcase_03 AC 18 ms
7,792 KB
testcase_04 AC 50 ms
7,792 KB
testcase_05 AC 156 ms
7,944 KB
testcase_06 AC 58 ms
7,796 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 62 ms
7,792 KB
testcase_10 AC 28 ms
7,796 KB
testcase_11 AC 39 ms
7,908 KB
testcase_12 AC 31 ms
7,868 KB
testcase_13 RE -
testcase_14 AC 46 ms
7,780 KB
testcase_15 RE -
testcase_16 AC 36 ms
7,856 KB
testcase_17 AC 57 ms
7,884 KB
testcase_18 AC 35 ms
7,932 KB
testcase_19 AC 15 ms
7,884 KB
testcase_20 AC 15 ms
7,812 KB
testcase_21 AC 15 ms
7,960 KB
testcase_22 AC 16 ms
7,820 KB
testcase_23 AC 18 ms
7,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
n=len(s)
ok=0
for i in range(n):
    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")))
        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