結果
問題 |
No.2000 Distanced Characters
|
ユーザー |
![]() |
提出日時 | 2022-07-08 21:37:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 670 bytes |
コンパイル時間 | 667 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 30,464 KB |
最終ジャッジ日時 | 2024-12-28 04:26:26 |
合計ジャッジ時間 | 16,316 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 TLE * 4 |
ソースコード
import sys input = sys.stdin.readline import bisect S=input().strip() D=[list(map(int,input().split())) for i in range(26)] LIST=[[] for i in range(26)] for i in range(len(S)): LIST[ord(S[i])-97].append(i) ANS=[["Y"]*26 for i in range(26)] for i in range(26): for j in range(26): flag=1 for x in LIST[i]: y=bisect.bisect_right(LIST[j],x) if y==len(LIST[j]): continue else: z=LIST[j][y] if x+D[i][j]>z: flag=0 break if flag==0: ANS[i][j]="N" for i in range(26): print(*ANS[i])