結果

問題 No.2000 Distanced Characters
ユーザー achapiachapi
提出日時 2022-07-08 21:36:51
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 583 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 90,148 KB
最終ジャッジ日時 2023-08-27 21:00:58
合計ジャッジ時間 5,072 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
78,372 KB
testcase_01 AC 87 ms
76,072 KB
testcase_02 AC 82 ms
71,376 KB
testcase_03 AC 78 ms
71,492 KB
testcase_04 AC 112 ms
76,612 KB
testcase_05 AC 109 ms
76,612 KB
testcase_06 AC 95 ms
76,152 KB
testcase_07 AC 109 ms
76,156 KB
testcase_08 AC 98 ms
90,148 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
d=[[]for i in range(26)]
al="abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)):d[al.index(s[i])].append(i+1)
for i in range(26):
    l=list(map(int,input().split()))
    ans=[]
    for j in range(26):
        if len(d[i])==0 or len(d[j])==0:ans.append("Y")
        else:
            for a in d[i]:
                for b in d[j]:
                    if a<b:
                        if a+l[j]>b:
                            ans.append("N")
                            break
                else:continue
                break
            else:ans.append("Y")
    print(*ans)
0