結果

問題 No.2000 Distanced Characters
ユーザー ああいいああいい
提出日時 2022-07-10 17:57:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 76,944 KB
最終ジャッジ日時 2023-09-02 01:08:30
合計ジャッジ時間 2,987 ms
ジャッジサーバーID
(参考情報)
judge15 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,188 KB
testcase_01 AC 74 ms
76,636 KB
testcase_02 AC 69 ms
71,536 KB
testcase_03 AC 68 ms
71,100 KB
testcase_04 AC 78 ms
76,396 KB
testcase_05 AC 74 ms
76,496 KB
testcase_06 AC 76 ms
76,500 KB
testcase_07 AC 74 ms
76,576 KB
testcase_08 AC 126 ms
76,832 KB
testcase_09 AC 147 ms
76,900 KB
testcase_10 AC 148 ms
76,908 KB
testcase_11 AC 137 ms
76,944 KB
testcase_12 AC 116 ms
76,236 KB
testcase_13 AC 116 ms
76,288 KB
testcase_14 AC 126 ms
76,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
n = 26

D = [list(map(int,input().split())) for _ in range(n)]
dat = [-1] * n
ans = [['Y'] * n for _ in range(n)]

for i in range(len(S)):
    c = ord(S[i]) - ord('a')
    for cc in range(n):
        if dat[cc] == -1:continue
        if dat[cc] + D[cc][c] > i:
            ans[cc][c] = 'N'
    dat[c] = i
for l in ans:
    print(*l)
    
0