結果
問題 | No.1994 Confusing Name |
ユーザー | terasa |
提出日時 | 2022-07-02 12:08:28 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,143 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 82,096 KB |
実行使用メモリ | 98,996 KB |
最終ジャッジ日時 | 2024-05-05 09:41:11 |
合計ジャッジ時間 | 6,504 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 68 ms
76,952 KB |
testcase_01 | AC | 65 ms
69,732 KB |
testcase_02 | AC | 65 ms
69,472 KB |
testcase_03 | AC | 61 ms
66,196 KB |
testcase_04 | AC | 57 ms
64,920 KB |
testcase_05 | AC | 126 ms
77,872 KB |
testcase_06 | AC | 295 ms
78,520 KB |
testcase_07 | AC | 91 ms
77,832 KB |
testcase_08 | AC | 200 ms
78,436 KB |
testcase_09 | AC | 313 ms
78,500 KB |
testcase_10 | AC | 143 ms
78,248 KB |
testcase_11 | AC | 127 ms
77,972 KB |
testcase_12 | TLE | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
import sys import pypyjit import itertools import heapq import math from collections import deque, defaultdict import bisect import string input = sys.stdin.readline sys.setrecursionlimit(10 ** 6) pypyjit.set_param('max_unroll_recursion=-1') def index_lt(a, x): 'return largest index s.t. A[i] < x or -1 if it does not exist' return bisect.bisect_left(a, x) - 1 def index_le(a, x): 'return largest index s.t. A[i] <= x or -1 if it does not exist' return bisect.bisect_right(a, x) - 1 def index_gt(a, x): 'return smallest index s.t. A[i] > x or len(a) if it does not exist' return bisect.bisect_right(a, x) def index_ge(a, x): 'return smallest index s.t. A[i] >= x or len(a) if it does not exist' return bisect.bisect_left(a, x) N = int(input()) S = [input()[:-1] for _ in range(N)] A = [list(s) for s in S] for i in range(N): ans = 0 for j in range(len(S[i])): for c in string.ascii_lowercase: a = list(S[i]) if a[j] == c: continue a[j] = c s = ''.join(a) if s in S: ans += 1 print(ans)