結果
| 問題 | No.1994 Confusing Name |
| コンテスト | |
| ユーザー |
lilictaka
|
| 提出日時 | 2022-07-01 22:30:53 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 924 ms / 2,000 ms |
| + 822µs | |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 64,792 KB |
| 実行使用メモリ | 239,576 KB |
| 最終ジャッジ日時 | 2026-10-16 12:13:15 |
| 合計ジャッジ時間 | 15,504 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
from collections import defaultdict
N = int(input())
cnt = [defaultdict(int) for _ in range(10)]
def f(l,S):
rev = []
for i in range(len(S)):
if i == l:
continue
rev.append(S[i])
return ''.join(rev)
board = []
for i in range(N):
S = list(input())
for l in range(len(S)):
cnt[l][f(l,S)] += 1
board.append((i,l,f(l,S)))
ANS = [0] * N
for i,l,s in board:
ANS[i] += cnt[l][s]-1
print(*ANS,sep='\n')
lilictaka